Advertisement
Guest User

Untitled

a guest
Jul 29th, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. root : statement? (SEMICOLON!)? EOF!;
  2. statement : create | ...;
  3. create : CREATE | ( TABLE table_create | USER user_create | ....);
  4.  
  5. try {
  6. int alt6=16;
  7. alt6 = dfa6.predict(input);
  8. switch (alt6) {
  9. case 1 :
  10. {
  11. root_0 = (CommonTree)adaptor.nil();
  12.  
  13. pushFollow(FOLLOW_create_in_statement1088);
  14. create8=create();
  15.  
  16. state._fsp--;
  17.  
  18. adaptor.addChild(root_0, create8.getTree());
  19.  
  20. }
  21. break;
  22. case 2 :
  23. ...
  24.  
  25. /** A (...) subrule with multiple alternatives */
  26. block(alts,decls,decision,enclosingBlockLevel,blockLevel,decisionNumber,maxK,maxAlt,description) ::= <<
  27. // <fileName>:<description>
  28. int alt<decisionNumber>=<maxAlt>;
  29. <decls>
  30. <@predecision()>
  31. <decision>
  32. <@postdecision()>
  33. <@prebranch()>
  34. switch (alt<decisionNumber>) {
  35. <alts:{a | <altSwitchCase(i,a)>}>
  36. }
  37. <@postbranch()>
  38. >>
  39.  
  40. /** A case in a switch that jumps to an alternative given the alternative
  41. * number. A DFA predicts the alternative and then a simple switch
  42. * does the jump to the code that actually matches that alternative.
  43. */
  44. altSwitchCase(altNum,alt) ::= <<
  45. case <altNum> :
  46. <@prealt()>
  47. <alt>
  48. break;<n>
  49. >>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement