Added ability to order the execution of dictionary adapter behaviors.
[castle.git] / Experiments / Attic / Rook / Castle.Rook.Compiler / Parser / RookBaseParser.cs
blob2a1f2c584fddbc75cebb5f09092d2f8c02a3570c
1 // $ANTLR 2.7.5 (20050128): "lang4.g" -> "RookBaseParser.cs"$
3 using System.Text;
4 using System.Collections;
6 using Castle.Rook.Compiler.AST;
7 using Castle.Rook.Compiler.Services;
9 namespace Castle.Rook.Compiler.Parser
11 // Generate the header common to all output files.
12 using System;
14 using TokenBuffer = antlr.TokenBuffer;
15 using TokenStreamException = antlr.TokenStreamException;
16 using TokenStreamIOException = antlr.TokenStreamIOException;
17 using ANTLRException = antlr.ANTLRException;
18 using LLkParser = antlr.LLkParser;
19 using Token = antlr.Token;
20 using IToken = antlr.IToken;
21 using TokenStream = antlr.TokenStream;
22 using RecognitionException = antlr.RecognitionException;
23 using NoViableAltException = antlr.NoViableAltException;
24 using MismatchedTokenException = antlr.MismatchedTokenException;
25 using SemanticException = antlr.SemanticException;
26 using ParserSharedInputState = antlr.ParserSharedInputState;
27 using BitSet = antlr.collections.impl.BitSet;
29 public class RookBaseParser : antlr.LLkParser
31 public const int EOF = 1;
32 public const int NULL_TREE_LOOKAHEAD = 3;
33 public const int CLASS = 4;
34 public const int DO = 5;
35 public const int END = 6;
36 public const int DEF = 7;
37 public const int OPERATOR = 8;
38 public const int BEGIN = 9;
39 public const int WHILE = 10;
40 public const int TYPE = 11;
41 public const int METHOD_CALL = 12;
42 public const int SUPER_CTOR_CALL = 13;
43 public const int POST_INC = 14;
44 public const int POST_DEC = 15;
45 public const int EXPR = 16;
46 public const int ELIST = 17;
47 public const int INDEX_OP = 18;
48 public const int UNARY_MINUS = 19;
49 public const int UNARY_PLUS = 20;
50 public const int TYPECAST = 21;
51 public const int ARRAY_DECLARATOR = 22;
52 public const int NUM_INT = 23;
53 public const int NUM_DOUBLE = 24;
54 public const int NUM_FLOAT = 25;
55 public const int NUM_LONG = 26;
56 public const int STATEMENT_END = 27;
57 public const int IDENT = 28;
58 public const int DOT = 29;
59 public const int COLONCOLON = 30;
60 public const int COLON = 31;
61 public const int STATICIDENT = 32;
62 public const int INSTIDENT = 33;
63 public const int SEMI = 34;
64 public const int LITERAL_namespace = 35;
65 public const int SL = 36;
66 public const int LITERAL_self = 37;
67 public const int LITERAL_override = 38;
68 public const int LITERAL_abstract = 39;
69 public const int LITERAL_new = 40;
70 public const int LITERAL_final = 41;
71 public const int LITERAL_public = 42;
72 public const int LITERAL_private = 43;
73 public const int LITERAL_protected = 44;
74 public const int LITERAL_internal = 45;
75 public const int COMMA = 46;
76 public const int ASSIGN = 47;
77 public const int LITERAL_initialize = 48;
78 public const int LPAREN = 49;
79 public const int RPAREN = 50;
80 public const int LITERAL_require = 51;
81 public const int LTHAN = 52;
82 public const int STAR = 53;
83 public const int BAND = 54;
84 public const int PLUS_ASSIGN = 55;
85 public const int MINUS_ASSIGN = 56;
86 public const int STAR_ASSIGN = 57;
87 public const int DIV_ASSIGN = 58;
88 public const int MOD_ASSIGN = 59;
89 public const int BAND_ASSIGN = 60;
90 public const int BOR_ASSIGN = 61;
91 public const int BXOR_ASSIGN = 62;
92 public const int LITERAL_if = 63;
93 public const int LITERAL_unless = 64;
94 public const int LITERAL_until = 65;
95 public const int LITERAL_redo = 66;
96 public const int LITERAL_break = 67;
97 public const int LITERAL_next = 68;
98 public const int LITERAL_retry = 69;
99 public const int LITERAL_lambda = 70;
100 public const int LCURLY = 71;
101 public const int RCURLY = 72;
102 public const int LITERAL_raise = 73;
103 public const int LITERAL_yield = 74;
104 public const int BOR = 75;
105 public const int LITERAL_or = 76;
106 public const int LITERAL_and = 77;
107 public const int LITERAL_not = 78;
108 public const int LNOT = 79;
109 public const int GT = 80;
110 public const int EQUAL = 81;
111 public const int GE = 82;
112 public const int LE = 83;
113 public const int NOT_EQUAL = 84;
114 public const int LITERAL_is = 85;
115 public const int BXOR = 86;
116 public const int PLUS = 87;
117 public const int MINUS = 88;
118 public const int SLASH = 89;
119 public const int PERCENT = 90;
120 public const int BNOT = 91;
121 public const int LBRACK = 92;
122 public const int RBRACK = 93;
123 public const int LITERAL_base = 94;
124 public const int STRING_LITERAL = 95;
125 public const int CHAR_LITERAL = 96;
126 // "nil?" = 97
127 public const int DOTDOT = 98;
128 public const int DOTDOTDOT = 99;
129 public const int MAPASSIGN = 100;
130 public const int QUESTION = 101;
131 public const int DIV = 102;
132 public const int INC = 103;
133 public const int DEC = 104;
134 public const int MOD = 105;
135 public const int SR = 106;
136 public const int SR_ASSIGN = 107;
137 public const int BSR = 108;
138 public const int BSR_ASSIGN = 109;
139 public const int SL_ASSIGN = 110;
140 public const int LOR = 111;
141 public const int LAND = 112;
142 public const int NEWLINE = 113;
143 public const int SL_NEWLINE = 114;
144 public const int SL_COMMENT = 115;
145 public const int WS = 116;
146 public const int ESC = 117;
147 public const int HEX_DIGIT = 118;
148 public const int VOCAB = 119;
149 public const int NUMBER = 120;
150 public const int Int = 121;
151 public const int NonZeroDigit = 122;
152 public const int FloatTrailer = 123;
153 public const int Exponent = 124;
154 public const int CONTINUED_LINE = 125;
157 public IErrorReport ErrorReport;
159 private bool withinStatic, withinFinal, withinAbstract, withinNew, withinOverride;
161 private ISymbolTable topLevelScope;
163 AccessLevel currentAccessLevel = AccessLevel.Public;
165 public override void reportError(RecognitionException ex)
167 LexicalPosition lpos = new LexicalPosition( ex.getLine(), ex.getColumn() );
169 ErrorReport.Error( ex.getFilename(), lpos, ex.Message );
172 // TODO: Research for a better way to set lexical information
173 // on our AST
174 private void SetLexical(IASTNode node, IToken t)
176 node.Position.Line = t.getLine();
177 node.Position.Column = t.getColumn();
180 private Stack scopes = new Stack();
182 private void PushScope(IASTNode node, ScopeType scopeType)
184 if (node.DefiningSymbolTable != null)
186 throw new ArgumentException("We can't override a scope");
189 node.DefiningSymbolTable = new SymbolTable( GetCurrentScope(), scopeType );
191 ISymbolTable scope = node.DefiningSymbolTable;
193 if (scope == null) throw new ArgumentNullException("null scope?");
195 scopes.Push(scope);
198 private void PopScope()
200 scopes.Pop();
203 private ISymbolTable GetCurrentScope()
205 if (scopes.Count == 0) return topLevelScope;
207 return scopes.Peek() as ISymbolTable;
210 protected void initialize()
212 tokenNames = tokenNames_;
216 protected RookBaseParser(TokenBuffer tokenBuf, int k) : base(tokenBuf, k)
218 initialize();
221 public RookBaseParser(TokenBuffer tokenBuf) : this(tokenBuf,2)
225 protected RookBaseParser(TokenStream lexer, int k) : base(lexer,k)
227 initialize();
230 public RookBaseParser(TokenStream lexer) : this(lexer,2)
234 public RookBaseParser(ParserSharedInputState state) : base(state,2)
236 initialize();
239 public String qualified_name() //throws RecognitionException, TokenStreamException
241 String ident;
243 IToken t = null;
244 IToken t2 = null;
245 String name = String.Empty; ident = null;
247 t = LT(1);
248 match(IDENT);
249 if (0==inputState.guessing)
251 name = t.getText();
253 { // ( ... )*
254 for (;;)
256 if ((LA(1)==DOT||LA(1)==COLONCOLON))
259 switch ( LA(1) )
261 case DOT:
263 match(DOT);
264 if (0==inputState.guessing)
266 name += ".";
268 break;
270 case COLONCOLON:
272 match(COLONCOLON);
273 if (0==inputState.guessing)
275 name += "::";
277 break;
279 default:
281 throw new NoViableAltException(LT(1), getFilename());
285 t2 = LT(1);
286 match(IDENT);
287 if (0==inputState.guessing)
289 name += t2.getText();
292 else
294 goto _loop4_breakloop;
298 _loop4_breakloop: ;
299 } // ( ... )*
300 if (0==inputState.guessing)
302 ident = name;
304 return ident;
307 public Identifier identifier() //throws RecognitionException, TokenStreamException
309 Identifier ident;
311 ident = null; TypeReference tr = null;
313 ident=name();
315 switch ( LA(1) )
317 case COLON:
319 tr=type();
320 if (0==inputState.guessing)
322 ident.TypeReference = tr;
324 break;
326 case COMMA:
327 case ASSIGN:
328 case RPAREN:
329 case BOR:
331 break;
333 default:
335 throw new NoViableAltException(LT(1), getFilename());
339 return ident;
342 public Identifier name() //throws RecognitionException, TokenStreamException
344 Identifier ident;
346 IToken t1 = null;
347 IToken t2 = null;
348 IToken t3 = null;
349 ident = null;
351 switch ( LA(1) )
353 case IDENT:
355 t1 = LT(1);
356 match(IDENT);
357 if (0==inputState.guessing)
359 ident = new OpaqueIdentifier(t1.getText());
361 break;
363 case STATICIDENT:
365 t2 = LT(1);
366 match(STATICIDENT);
367 if (0==inputState.guessing)
369 ident = new StaticVarIdentifier(t2.getText());
371 break;
373 case INSTIDENT:
375 t3 = LT(1);
376 match(INSTIDENT);
377 if (0==inputState.guessing)
379 ident = new InstanceVarIdentifier(t3.getText());
381 break;
383 default:
385 throw new NoViableAltException(LT(1), getFilename());
388 return ident;
391 public TypeReference type() //throws RecognitionException, TokenStreamException
393 TypeReference tr ;
395 tr = null; String n;
397 match(COLON);
398 n=qualified_name();
399 if (0==inputState.guessing)
402 tr = new TypeReference(n);
405 return tr ;
408 public Identifier identifier_withtype() //throws RecognitionException, TokenStreamException
410 Identifier ident;
412 ident = null; TypeReference tr = null;
414 ident=name();
415 tr=type();
416 if (0==inputState.guessing)
418 ident.TypeReference = tr;
420 return ident;
423 protected void statement_term() //throws RecognitionException, TokenStreamException
429 switch ( LA(1) )
431 case STATEMENT_END:
433 match(STATEMENT_END);
434 break;
436 case SEMI:
438 match(SEMI);
439 break;
441 case EOF:
443 match(Token.EOF_TYPE);
444 break;
446 default:
448 throw new NoViableAltException(LT(1), getFilename());
455 protected void nothing() //throws RecognitionException, TokenStreamException
460 if ((LA(1)==EOF||LA(1)==STATEMENT_END) && (tokenSet_0_.member(LA(2))))
463 switch ( LA(1) )
465 case STATEMENT_END:
467 match(STATEMENT_END);
468 break;
470 case EOF:
472 match(Token.EOF_TYPE);
473 break;
475 default:
477 throw new NoViableAltException(LT(1), getFilename());
482 else if ((tokenSet_0_.member(LA(1))) && (tokenSet_1_.member(LA(2)))) {
484 else
486 throw new NoViableAltException(LT(1), getFilename());
492 public SourceUnit sourceUnit(
493 CompilationUnit cunit
494 ) //throws RecognitionException, TokenStreamException
496 SourceUnit unit;
499 topLevelScope = cunit.DefiningSymbolTable;
500 unit = new SourceUnit(cunit, getFilename());
501 PushScope(unit, ScopeType.SourceUnit);
504 nothing();
506 switch ( LA(1) )
508 case LITERAL_namespace:
510 namespace_declaration(unit.Namespaces);
511 break;
513 case EOF:
514 case CLASS:
515 case DO:
516 case DEF:
517 case BEGIN:
518 case NUM_INT:
519 case NUM_FLOAT:
520 case NUM_LONG:
521 case STATEMENT_END:
522 case IDENT:
523 case STATICIDENT:
524 case INSTIDENT:
525 case LITERAL_self:
526 case LPAREN:
527 case LITERAL_require:
528 case LITERAL_redo:
529 case LITERAL_break:
530 case LITERAL_next:
531 case LITERAL_retry:
532 case LITERAL_lambda:
533 case LCURLY:
534 case LITERAL_raise:
535 case LITERAL_yield:
536 case LITERAL_not:
537 case LNOT:
538 case PLUS:
539 case MINUS:
540 case BNOT:
541 case LBRACK:
542 case LITERAL_base:
543 case STRING_LITERAL:
544 case CHAR_LITERAL:
546 suite(unit.Statements);
547 break;
549 default:
551 throw new NoViableAltException(LT(1), getFilename());
555 nothing();
556 match(Token.EOF_TYPE);
557 if (0==inputState.guessing)
560 cunit.SourceUnits.Add(unit);
561 PopScope();
562 if (!ErrorReport.HasErrors && scopes.Count != 0)
563 ErrorReport.Error("Invalid scope count. " +
564 "Something seems to be very wrong. Contact Castle's team and report the " +
565 "code that caused this error.");
568 return unit;
571 public void namespace_declaration(
572 IList namespaces
573 ) //throws RecognitionException, TokenStreamException
576 IToken t = null;
578 NamespaceDescriptor nsdec = new NamespaceDescriptor();
579 PushScope(nsdec, ScopeType.Namespace);
580 namespaces.Add(nsdec); String qn = null;
581 TypeDefinitionStatement typeDef = null;
584 try { // for error handling
585 t = LT(1);
586 match(LITERAL_namespace);
587 qn=qualified_name();
588 statement_term();
589 if (0==inputState.guessing)
591 nsdec.Name = qn;
593 { // ( ... )*
594 for (;;)
596 if ((LA(1)==CLASS))
598 typeDef=type_def_statement();
599 if (0==inputState.guessing)
601 nsdec.TypeDefinitions.Add(typeDef);
604 else
606 goto _loop22_breakloop;
610 _loop22_breakloop: ;
611 } // ( ... )*
612 match(END);
613 if (0==inputState.guessing)
615 PopScope();
618 catch (RecognitionException ex)
620 if (0 == inputState.guessing)
622 reportError(ex);
623 recover(ex,tokenSet_2_);
625 else
627 throw ex;
632 public void suite(
633 IList stmts
634 ) //throws RecognitionException, TokenStreamException
637 IStatement stmt = null;
639 { // ( ... )*
640 for (;;)
642 if ((tokenSet_3_.member(LA(1))))
644 stmt=statement();
645 if (0==inputState.guessing)
647 if (stmt != null) stmts.Add(stmt);
650 else
652 goto _loop25_breakloop;
656 _loop25_breakloop: ;
657 } // ( ... )*
660 public TypeDefinitionStatement type_def_statement() //throws RecognitionException, TokenStreamException
662 TypeDefinitionStatement tdstmt;
664 tdstmt = null; currentAccessLevel = AccessLevel.Public;
666 tdstmt=class_def_statement();
667 return tdstmt;
670 public IStatement statement() //throws RecognitionException, TokenStreamException
672 IStatement stmt;
674 stmt = null;
677 switch ( LA(1) )
679 case CLASS:
681 stmt=type_def_statement();
682 break;
684 case LITERAL_require:
686 stmt=require_statement();
687 break;
689 default:
690 bool synPredMatched39 = false;
691 if (((tokenSet_4_.member(LA(1))) && (LA(2)==COLON)))
693 int _m39 = mark();
694 synPredMatched39 = true;
695 inputState.guessing++;
696 try {
698 declaration_statement();
701 catch (RecognitionException)
703 synPredMatched39 = false;
705 rewind(_m39);
706 inputState.guessing--;
708 if ( synPredMatched39 )
710 stmt=declaration_statement();
712 else if ((tokenSet_5_.member(LA(1))) && (tokenSet_6_.member(LA(2)))) {
713 stmt=expression_statement();
715 else
717 throw new NoViableAltException(LT(1), getFilename());
719 break; }
721 statement_term();
722 return stmt;
725 public void type_suite(
726 IList stmts
727 ) //throws RecognitionException, TokenStreamException
730 IStatement stmt = null;
732 { // ( ... )*
733 for (;;)
735 if ((tokenSet_7_.member(LA(1))))
737 access_level();
739 if ((tokenSet_3_.member(LA(1))) && (tokenSet_8_.member(LA(2))))
741 stmt=statement();
742 if (0==inputState.guessing)
744 if (stmt != null) stmts.Add(stmt);
747 else if ((LA(1)==CLASS) && (LA(2)==SL)) {
748 method_scope(stmts);
750 else
752 throw new NoViableAltException(LT(1), getFilename());
757 else
759 goto _loop29_breakloop;
763 _loop29_breakloop: ;
764 } // ( ... )*
767 protected void access_level() //throws RecognitionException, TokenStreamException
772 switch ( LA(1) )
774 case LITERAL_public:
776 match(LITERAL_public);
777 if (0==inputState.guessing)
779 currentAccessLevel = AccessLevel.Public;
781 break;
783 case LITERAL_private:
785 match(LITERAL_private);
786 if (0==inputState.guessing)
788 currentAccessLevel = AccessLevel.Private;
790 break;
792 case LITERAL_protected:
794 match(LITERAL_protected);
795 if (0==inputState.guessing)
797 currentAccessLevel = AccessLevel.Protected;
799 break;
801 case LITERAL_internal:
803 match(LITERAL_internal);
804 if (0==inputState.guessing)
806 currentAccessLevel = AccessLevel.Internal;
808 break;
810 case CLASS:
811 case DO:
812 case DEF:
813 case BEGIN:
814 case NUM_INT:
815 case NUM_FLOAT:
816 case NUM_LONG:
817 case IDENT:
818 case STATICIDENT:
819 case INSTIDENT:
820 case LITERAL_self:
821 case LPAREN:
822 case LITERAL_require:
823 case LITERAL_redo:
824 case LITERAL_break:
825 case LITERAL_next:
826 case LITERAL_retry:
827 case LITERAL_lambda:
828 case LCURLY:
829 case LITERAL_raise:
830 case LITERAL_yield:
831 case LITERAL_not:
832 case LNOT:
833 case PLUS:
834 case MINUS:
835 case BNOT:
836 case LBRACK:
837 case LITERAL_base:
838 case STRING_LITERAL:
839 case CHAR_LITERAL:
841 break;
843 default:
845 throw new NoViableAltException(LT(1), getFilename());
851 protected void method_scope(
852 IList stmts
853 ) //throws RecognitionException, TokenStreamException
856 IStatement stmt = null; int index=0;
858 match(CLASS);
859 match(SL);
861 switch ( LA(1) )
863 case LITERAL_self:
865 match(LITERAL_self);
866 if (0==inputState.guessing)
868 withinStatic = true;
870 break;
872 case LITERAL_override:
874 match(LITERAL_override);
875 if (0==inputState.guessing)
877 index = 1; withinOverride = true;
879 break;
881 case LITERAL_abstract:
883 match(LITERAL_abstract);
884 if (0==inputState.guessing)
886 index = 2; withinAbstract = true;
888 break;
890 case LITERAL_new:
892 match(LITERAL_new);
893 if (0==inputState.guessing)
895 index = 3; withinNew = true;
897 break;
899 case LITERAL_final:
901 match(LITERAL_final);
902 if (0==inputState.guessing)
904 index = 4; withinFinal = true;
906 break;
908 default:
910 throw new NoViableAltException(LT(1), getFilename());
914 statement_term();
915 { // ( ... )*
916 for (;;)
918 if ((tokenSet_7_.member(LA(1))))
920 access_level();
921 stmt=statement();
922 if (0==inputState.guessing)
924 if (stmt != null) stmts.Add(stmt);
927 else
929 goto _loop33_breakloop;
933 _loop33_breakloop: ;
934 } // ( ... )*
935 match(END);
936 statement_term();
937 if (0==inputState.guessing)
940 if (index == 0)
941 withinStatic = false;
942 else if (index == 1)
943 withinOverride = false;
944 else if (index == 2)
945 withinAbstract = false;
946 else if (index == 3)
947 withinNew = false;
948 else if (index == 4)
949 withinFinal = false;
954 public MultipleVariableDeclarationStatement declaration_statement() //throws RecognitionException, TokenStreamException
956 MultipleVariableDeclarationStatement stmt;
959 stmt = new MultipleVariableDeclarationStatement(currentAccessLevel);
960 Identifier ident = null;
961 IExpression initExp = null;
964 ident=identifier_withtype();
965 if (0==inputState.guessing)
967 stmt.AddIdentifier(ident);
969 { // ( ... )*
970 for (;;)
972 if ((LA(1)==COMMA))
974 match(COMMA);
975 ident=identifier_withtype();
976 if (0==inputState.guessing)
978 stmt.AddIdentifier(ident);
981 else
983 goto _loop42_breakloop;
987 _loop42_breakloop: ;
988 } // ( ... )*
990 switch ( LA(1) )
992 case ASSIGN:
994 match(ASSIGN);
995 initExp=test();
996 if (0==inputState.guessing)
998 stmt.AddInitExp(initExp);
1000 { // ( ... )*
1001 for (;;)
1003 if ((LA(1)==COMMA))
1005 match(COMMA);
1006 initExp=test();
1007 if (0==inputState.guessing)
1009 stmt.AddInitExp(initExp);
1012 else
1014 goto _loop45_breakloop;
1018 _loop45_breakloop: ;
1019 } // ( ... )*
1020 break;
1022 case EOF:
1023 case STATEMENT_END:
1024 case SEMI:
1026 break;
1028 default:
1030 throw new NoViableAltException(LT(1), getFilename());
1034 return stmt;
1037 public IStatement expression_statement() //throws RecognitionException, TokenStreamException
1039 IStatement stmt;
1041 stmt = null; PostfixCondition pfc = null; IExpression exp = null; IExpression rhs = null;
1042 AugType rel = AugType.Undefined;
1044 if ((tokenSet_9_.member(LA(1))))
1047 switch ( LA(1) )
1049 case DO:
1050 case BEGIN:
1052 exp=compound();
1053 break;
1055 case NUM_INT:
1056 case NUM_FLOAT:
1057 case NUM_LONG:
1058 case IDENT:
1059 case STATICIDENT:
1060 case INSTIDENT:
1061 case LITERAL_self:
1062 case LPAREN:
1063 case LITERAL_lambda:
1064 case LCURLY:
1065 case LITERAL_raise:
1066 case LITERAL_yield:
1067 case LITERAL_not:
1068 case LNOT:
1069 case PLUS:
1070 case MINUS:
1071 case BNOT:
1072 case LBRACK:
1073 case LITERAL_base:
1074 case STRING_LITERAL:
1075 case CHAR_LITERAL:
1077 exp=test();
1079 switch ( LA(1) )
1081 case PLUS_ASSIGN:
1082 case MINUS_ASSIGN:
1083 case STAR_ASSIGN:
1084 case DIV_ASSIGN:
1085 case MOD_ASSIGN:
1086 case BAND_ASSIGN:
1087 case BOR_ASSIGN:
1088 case BXOR_ASSIGN:
1090 rel=augassign();
1091 rhs=test();
1092 if (0==inputState.guessing)
1094 exp = new AugAssignmentExpression(exp, rhs, rel);
1096 break;
1098 case ASSIGN:
1100 { // ( ... )+
1101 int _cnt75=0;
1102 for (;;)
1104 if ((LA(1)==ASSIGN))
1106 match(ASSIGN);
1107 rhs=test();
1108 if (0==inputState.guessing)
1110 exp = new AssignmentExpression(exp, rhs);
1113 else
1115 if (_cnt75 >= 1) { goto _loop75_breakloop; } else { throw new NoViableAltException(LT(1), getFilename());; }
1118 _cnt75++;
1120 _loop75_breakloop: ;
1121 } // ( ... )+
1122 break;
1124 case EOF:
1125 case WHILE:
1126 case STATEMENT_END:
1127 case SEMI:
1128 case LITERAL_if:
1129 case LITERAL_unless:
1130 case LITERAL_until:
1132 break;
1134 default:
1136 throw new NoViableAltException(LT(1), getFilename());
1140 break;
1142 case LITERAL_redo:
1143 case LITERAL_break:
1144 case LITERAL_next:
1145 case LITERAL_retry:
1147 exp=flow_expressions();
1148 break;
1150 default:
1152 throw new NoViableAltException(LT(1), getFilename());
1157 switch ( LA(1) )
1159 case WHILE:
1160 case LITERAL_if:
1161 case LITERAL_unless:
1162 case LITERAL_until:
1164 pfc=postFixCondition();
1165 if (0==inputState.guessing)
1167 exp.PostfixCondition = pfc;
1169 break;
1171 case EOF:
1172 case STATEMENT_END:
1173 case SEMI:
1175 break;
1177 default:
1179 throw new NoViableAltException(LT(1), getFilename());
1183 if (0==inputState.guessing)
1185 stmt = new ExpressionStatement(exp);
1188 else if ((LA(1)==DEF) && (tokenSet_10_.member(LA(2)))) {
1189 stmt=method_def_statement();
1191 else if ((LA(1)==DEF) && (LA(2)==LITERAL_initialize)) {
1192 stmt=constructor_def_statement();
1194 else
1196 throw new NoViableAltException(LT(1), getFilename());
1199 return stmt;
1202 public RequireDirectiveStatement require_statement() //throws RecognitionException, TokenStreamException
1204 RequireDirectiveStatement rd;
1206 rd = null; String ident = null;
1208 match(LITERAL_require);
1209 ident=qualified_name();
1210 if (0==inputState.guessing)
1212 rd = new RequireDirectiveStatement(ident);
1214 return rd;
1217 public IExpression test() //throws RecognitionException, TokenStreamException
1219 IExpression exp;
1221 exp = null; IExpression rhs = null;
1223 switch ( LA(1) )
1225 case NUM_INT:
1226 case NUM_FLOAT:
1227 case NUM_LONG:
1228 case IDENT:
1229 case STATICIDENT:
1230 case INSTIDENT:
1231 case LITERAL_self:
1232 case LPAREN:
1233 case LCURLY:
1234 case LITERAL_not:
1235 case LNOT:
1236 case PLUS:
1237 case MINUS:
1238 case BNOT:
1239 case LBRACK:
1240 case LITERAL_base:
1241 case STRING_LITERAL:
1242 case CHAR_LITERAL:
1244 exp=and_test();
1245 { // ( ... )*
1246 for (;;)
1248 if ((LA(1)==LITERAL_or))
1250 match(LITERAL_or);
1251 rhs=and_test();
1252 if (0==inputState.guessing)
1254 exp = new BinaryExpression(exp, rhs, BinaryOp.Or);
1257 else
1259 goto _loop100_breakloop;
1263 _loop100_breakloop: ;
1264 } // ( ... )*
1265 break;
1267 case LITERAL_lambda:
1269 exp=lambda();
1270 break;
1272 case LITERAL_raise:
1274 exp=raise();
1275 break;
1277 case LITERAL_yield:
1279 exp=yield();
1280 break;
1282 default:
1284 throw new NoViableAltException(LT(1), getFilename());
1287 return exp;
1290 public ConstructorDefinitionStatement constructor_def_statement() //throws RecognitionException, TokenStreamException
1292 ConstructorDefinitionStatement mdstmt;
1295 mdstmt = new ConstructorDefinitionStatement( currentAccessLevel );
1298 match(DEF);
1299 match(LITERAL_initialize);
1301 switch ( LA(1) )
1303 case LPAREN:
1305 match(LPAREN);
1307 switch ( LA(1) )
1309 case IDENT:
1310 case STATICIDENT:
1311 case INSTIDENT:
1312 case STAR:
1313 case BAND:
1315 methodParams(mdstmt);
1316 break;
1318 case RPAREN:
1320 break;
1322 default:
1324 throw new NoViableAltException(LT(1), getFilename());
1328 match(RPAREN);
1329 break;
1331 case EOF:
1332 case STATEMENT_END:
1333 case SEMI:
1335 break;
1337 default:
1339 throw new NoViableAltException(LT(1), getFilename());
1343 statement_term();
1344 suite(mdstmt.Statements);
1345 match(END);
1346 return mdstmt;
1349 public void methodParams(
1350 MethodDefinitionStatement mdstmt
1351 ) //throws RecognitionException, TokenStreamException
1354 ParameterVarIdentifier param = null;
1356 param=methodParam();
1357 if (0==inputState.guessing)
1359 mdstmt.AddFormalParameter( param );
1361 { // ( ... )*
1362 for (;;)
1364 if ((LA(1)==COMMA))
1366 match(COMMA);
1367 param=methodParam();
1368 if (0==inputState.guessing)
1370 mdstmt.AddFormalParameter( param );
1373 else
1375 goto _loop63_breakloop;
1379 _loop63_breakloop: ;
1380 } // ( ... )*
1383 public MethodDefinitionStatement method_def_statement() //throws RecognitionException, TokenStreamException
1385 MethodDefinitionStatement mdstmt;
1388 mdstmt = new MethodDefinitionStatement( currentAccessLevel );
1389 String qn = null; TypeReference retType = null;
1392 match(DEF);
1393 modifier(mdstmt);
1394 qn=qualified_name();
1395 if (0==inputState.guessing)
1398 if (qn.StartsWith("self."))
1400 mdstmt.IsStatic = true;
1401 mdstmt.Name = qn.Substring( "self.".Length );
1403 else
1405 mdstmt.Name = qn;
1407 PushScope(mdstmt, ScopeType.Method);
1411 switch ( LA(1) )
1413 case LPAREN:
1415 match(LPAREN);
1417 switch ( LA(1) )
1419 case IDENT:
1420 case STATICIDENT:
1421 case INSTIDENT:
1422 case STAR:
1423 case BAND:
1425 methodParams(mdstmt);
1426 break;
1428 case RPAREN:
1430 break;
1432 default:
1434 throw new NoViableAltException(LT(1), getFilename());
1438 match(RPAREN);
1440 switch ( LA(1) )
1442 case COLON:
1444 retType=type();
1445 break;
1447 case EOF:
1448 case STATEMENT_END:
1449 case SEMI:
1451 break;
1453 default:
1455 throw new NoViableAltException(LT(1), getFilename());
1459 break;
1461 case EOF:
1462 case STATEMENT_END:
1463 case SEMI:
1465 break;
1467 default:
1469 throw new NoViableAltException(LT(1), getFilename());
1473 statement_term();
1474 if (0==inputState.guessing)
1476 mdstmt.ReturnType = retType;
1478 suite(mdstmt.Statements);
1479 match(END);
1480 if (0==inputState.guessing)
1482 PopScope();
1484 return mdstmt;
1487 protected void modifier(
1488 MethodDefinitionStatement mdstmt
1489 ) //throws RecognitionException, TokenStreamException
1493 switch ( LA(1) )
1495 case LITERAL_override:
1497 match(LITERAL_override);
1498 if (0==inputState.guessing)
1500 mdstmt.IsOverride = true;
1502 break;
1504 case LITERAL_new:
1506 match(LITERAL_new);
1507 if (0==inputState.guessing)
1509 mdstmt.IsNewSlot = true;
1511 break;
1513 case LITERAL_abstract:
1515 match(LITERAL_abstract);
1516 if (0==inputState.guessing)
1518 mdstmt.IsAbstract = true;
1520 break;
1522 case LITERAL_final:
1524 match(LITERAL_final);
1525 if (0==inputState.guessing)
1527 mdstmt.IsFinal = true;
1529 break;
1531 default:
1532 if (((LA(1)==IDENT) && (tokenSet_11_.member(LA(2))))&&( withinOverride ))
1534 if (0==inputState.guessing)
1536 mdstmt.IsOverride = true;
1539 else if (((LA(1)==IDENT) && (tokenSet_11_.member(LA(2))))&&( withinNew )) {
1540 if (0==inputState.guessing)
1542 mdstmt.IsNewSlot = true;
1545 else if (((LA(1)==IDENT) && (tokenSet_11_.member(LA(2))))&&( withinAbstract )) {
1546 if (0==inputState.guessing)
1548 mdstmt.IsAbstract = true;
1551 else if (((LA(1)==IDENT) && (tokenSet_11_.member(LA(2))))&&( withinFinal )) {
1552 if (0==inputState.guessing)
1554 mdstmt.IsFinal = true;
1557 else if (((LA(1)==IDENT) && (tokenSet_11_.member(LA(2))))&&( withinStatic )) {
1558 if (0==inputState.guessing)
1560 mdstmt.IsStatic = true;
1563 else if ((LA(1)==IDENT) && (tokenSet_11_.member(LA(2)))) {
1565 else
1567 throw new NoViableAltException(LT(1), getFilename());
1569 break; }
1572 public TypeDefinitionStatement class_def_statement() //throws RecognitionException, TokenStreamException
1574 TypeDefinitionStatement tdstmt;
1576 IToken t = null;
1577 tdstmt = null; String qn = null;
1579 match(CLASS);
1580 t = LT(1);
1581 match(IDENT);
1582 if (0==inputState.guessing)
1584 tdstmt = new TypeDefinitionStatement( currentAccessLevel, t.getText() );
1585 PushScope(tdstmt, ScopeType.Type);
1589 switch ( LA(1) )
1591 case SL:
1592 case LTHAN:
1595 switch ( LA(1) )
1597 case LTHAN:
1599 match(LTHAN);
1600 break;
1602 case SL:
1604 match(SL);
1605 break;
1607 default:
1609 throw new NoViableAltException(LT(1), getFilename());
1613 qn=qualified_name();
1614 if (0==inputState.guessing)
1616 tdstmt.BaseTypes.Add( new TypeReference(qn) );
1618 { // ( ... )*
1619 for (;;)
1621 if ((LA(1)==COMMA))
1623 match(COMMA);
1624 qn=qualified_name();
1625 if (0==inputState.guessing)
1627 tdstmt.BaseTypes.Add( new TypeReference(qn) );
1630 else
1632 goto _loop60_breakloop;
1636 _loop60_breakloop: ;
1637 } // ( ... )*
1638 break;
1640 case EOF:
1641 case STATEMENT_END:
1642 case SEMI:
1644 break;
1646 default:
1648 throw new NoViableAltException(LT(1), getFilename());
1652 statement_term();
1653 type_suite(tdstmt.Statements);
1654 match(END);
1655 if (0==inputState.guessing)
1657 PopScope();
1659 return tdstmt;
1662 public ParameterVarIdentifier methodParam() //throws RecognitionException, TokenStreamException
1664 ParameterVarIdentifier param;
1666 IExpression exp = null; Identifier ident = null; param = null;
1669 switch ( LA(1) )
1671 case IDENT:
1672 case STATICIDENT:
1673 case INSTIDENT:
1675 ident=identifier();
1676 if (0==inputState.guessing)
1678 param = ParameterVarIdentifier.FromIdentifier(ParameterType.Ordinary, ident);
1680 break;
1682 case BAND:
1684 match(BAND);
1685 ident=identifier();
1686 if (0==inputState.guessing)
1688 param = ParameterVarIdentifier.FromIdentifier(ParameterType.Block, ident);
1690 break;
1692 default:
1693 bool synPredMatched67 = false;
1694 if (((LA(1)==STAR) && (tokenSet_4_.member(LA(2)))))
1696 int _m67 = mark();
1697 synPredMatched67 = true;
1698 inputState.guessing++;
1699 try {
1701 match(STAR);
1702 identifier_withtype();
1705 catch (RecognitionException)
1707 synPredMatched67 = false;
1709 rewind(_m67);
1710 inputState.guessing--;
1712 if ( synPredMatched67 )
1714 match(STAR);
1715 ident=identifier_withtype();
1716 if (0==inputState.guessing)
1718 param = ParameterVarIdentifier.FromIdentifier(ParameterType.Params, ident);
1721 else if ((LA(1)==STAR) && (tokenSet_4_.member(LA(2)))) {
1722 match(STAR);
1723 ident=identifier();
1724 if (0==inputState.guessing)
1726 param = ParameterVarIdentifier.FromIdentifier(ParameterType.List, ident);
1729 else
1731 throw new NoViableAltException(LT(1), getFilename());
1733 break; }
1736 switch ( LA(1) )
1738 case ASSIGN:
1740 match(ASSIGN);
1741 exp=expression();
1742 if (0==inputState.guessing)
1744 param.InitExpression = exp;
1746 break;
1748 case COMMA:
1749 case RPAREN:
1750 case BOR:
1752 break;
1754 default:
1756 throw new NoViableAltException(LT(1), getFilename());
1760 return param;
1763 public IExpression expression() //throws RecognitionException, TokenStreamException
1765 IExpression exp;
1767 exp = null; IExpression rhs = null;
1769 exp=xor_expr();
1770 { // ( ... )*
1771 for (;;)
1773 if ((LA(1)==BXOR))
1775 match(BXOR);
1776 rhs=xor_expr();
1777 if (0==inputState.guessing)
1779 exp = new BinaryExpression(exp, rhs, BinaryOp.Xor);
1782 else
1784 goto _loop115_breakloop;
1788 _loop115_breakloop: ;
1789 } // ( ... )*
1790 return exp;
1793 public CompoundExpression compound() //throws RecognitionException, TokenStreamException
1795 CompoundExpression cexp;
1797 cexp = new CompoundExpression();
1800 switch ( LA(1) )
1802 case DO:
1804 match(DO);
1805 break;
1807 case BEGIN:
1809 match(BEGIN);
1810 break;
1812 default:
1814 throw new NoViableAltException(LT(1), getFilename());
1818 if (0==inputState.guessing)
1820 PushScope(cexp, ScopeType.Compound);
1822 statement_term();
1823 suite(cexp.Statements);
1824 match(END);
1825 if (0==inputState.guessing)
1827 PopScope();
1829 return cexp;
1832 public AugType augassign() //throws RecognitionException, TokenStreamException
1834 AugType rel;
1836 rel = AugType.Undefined;
1838 switch ( LA(1) )
1840 case PLUS_ASSIGN:
1842 match(PLUS_ASSIGN);
1843 if (0==inputState.guessing)
1845 rel = AugType.PlusAssign;
1847 break;
1849 case MINUS_ASSIGN:
1851 match(MINUS_ASSIGN);
1852 if (0==inputState.guessing)
1854 rel = AugType.MinusAssign;
1856 break;
1858 case STAR_ASSIGN:
1860 match(STAR_ASSIGN);
1861 if (0==inputState.guessing)
1863 rel = AugType.MultAssign;
1865 break;
1867 case DIV_ASSIGN:
1869 match(DIV_ASSIGN);
1870 if (0==inputState.guessing)
1872 rel = AugType.DivAssign;
1874 break;
1876 case MOD_ASSIGN:
1878 match(MOD_ASSIGN);
1879 if (0==inputState.guessing)
1881 rel = AugType.ModAssign;
1883 break;
1885 case BAND_ASSIGN:
1887 match(BAND_ASSIGN);
1888 if (0==inputState.guessing)
1890 rel = AugType.BitwiseAndAssign;
1892 break;
1894 case BOR_ASSIGN:
1896 match(BOR_ASSIGN);
1897 if (0==inputState.guessing)
1899 rel = AugType.BitwiseOrAssign;
1901 break;
1903 case BXOR_ASSIGN:
1905 match(BXOR_ASSIGN);
1906 if (0==inputState.guessing)
1908 rel = AugType.BitwiseXorAssign;
1910 break;
1912 default:
1914 throw new NoViableAltException(LT(1), getFilename());
1917 return rel;
1920 public IExpression flow_expressions() //throws RecognitionException, TokenStreamException
1922 IExpression exp;
1924 exp = null;
1926 switch ( LA(1) )
1928 case LITERAL_redo:
1930 match(LITERAL_redo);
1931 if (0==inputState.guessing)
1933 exp = new RedoExpression();
1935 break;
1937 case LITERAL_break:
1939 match(LITERAL_break);
1940 if (0==inputState.guessing)
1942 exp = new BreakExpression();
1944 break;
1946 case LITERAL_next:
1948 match(LITERAL_next);
1949 if (0==inputState.guessing)
1951 exp = new NextExpression();
1953 break;
1955 case LITERAL_retry:
1957 match(LITERAL_retry);
1958 if (0==inputState.guessing)
1960 exp = new RetryExpression();
1962 break;
1964 default:
1966 throw new NoViableAltException(LT(1), getFilename());
1969 return exp;
1972 public PostfixCondition postFixCondition() //throws RecognitionException, TokenStreamException
1974 PostfixCondition pfc;
1976 pfc = null; IExpression exp;
1980 switch ( LA(1) )
1982 case LITERAL_if:
1984 match(LITERAL_if);
1985 if (0==inputState.guessing)
1987 pfc = new PostfixCondition(PostfixConditionType.If);
1989 break;
1991 case LITERAL_unless:
1993 match(LITERAL_unless);
1994 if (0==inputState.guessing)
1996 pfc = new PostfixCondition(PostfixConditionType.Unless);
1998 break;
2000 case WHILE:
2002 match(WHILE);
2003 if (0==inputState.guessing)
2005 pfc = new PostfixCondition(PostfixConditionType.While);
2007 break;
2009 case LITERAL_until:
2011 match(LITERAL_until);
2012 if (0==inputState.guessing)
2014 pfc = new PostfixCondition(PostfixConditionType.Until);
2016 break;
2018 default:
2020 throw new NoViableAltException(LT(1), getFilename());
2024 exp=test();
2025 if (0==inputState.guessing)
2027 pfc.Condition = exp;
2030 return pfc;
2033 public LambdaExpression lambda() //throws RecognitionException, TokenStreamException
2035 LambdaExpression lexp;
2037 BlockExpression bexp=null; lexp = null;
2039 match(LITERAL_lambda);
2040 bexp=block();
2041 if (0==inputState.guessing)
2043 lexp = new LambdaExpression(bexp);
2045 return lexp;
2048 public BlockExpression block() //throws RecognitionException, TokenStreamException
2050 BlockExpression bexp;
2052 bexp = new BlockExpression();
2054 if (0==inputState.guessing)
2056 PushScope(bexp, ScopeType.Block);
2059 switch ( LA(1) )
2061 case DO:
2064 match(DO);
2065 nothing();
2067 switch ( LA(1) )
2069 case BOR:
2071 blockargs(bexp);
2072 break;
2074 case EOF:
2075 case CLASS:
2076 case DO:
2077 case END:
2078 case DEF:
2079 case BEGIN:
2080 case NUM_INT:
2081 case NUM_FLOAT:
2082 case NUM_LONG:
2083 case STATEMENT_END:
2084 case IDENT:
2085 case STATICIDENT:
2086 case INSTIDENT:
2087 case SEMI:
2088 case LITERAL_self:
2089 case LPAREN:
2090 case LITERAL_require:
2091 case LITERAL_redo:
2092 case LITERAL_break:
2093 case LITERAL_next:
2094 case LITERAL_retry:
2095 case LITERAL_lambda:
2096 case LCURLY:
2097 case LITERAL_raise:
2098 case LITERAL_yield:
2099 case LITERAL_not:
2100 case LNOT:
2101 case PLUS:
2102 case MINUS:
2103 case BNOT:
2104 case LBRACK:
2105 case LITERAL_base:
2106 case STRING_LITERAL:
2107 case CHAR_LITERAL:
2109 break;
2111 default:
2113 throw new NoViableAltException(LT(1), getFilename());
2118 switch ( LA(1) )
2120 case EOF:
2121 case STATEMENT_END:
2122 case SEMI:
2124 statement_term();
2125 break;
2127 case CLASS:
2128 case DO:
2129 case END:
2130 case DEF:
2131 case BEGIN:
2132 case NUM_INT:
2133 case NUM_FLOAT:
2134 case NUM_LONG:
2135 case IDENT:
2136 case STATICIDENT:
2137 case INSTIDENT:
2138 case LITERAL_self:
2139 case LPAREN:
2140 case LITERAL_require:
2141 case LITERAL_redo:
2142 case LITERAL_break:
2143 case LITERAL_next:
2144 case LITERAL_retry:
2145 case LITERAL_lambda:
2146 case LCURLY:
2147 case LITERAL_raise:
2148 case LITERAL_yield:
2149 case LITERAL_not:
2150 case LNOT:
2151 case PLUS:
2152 case MINUS:
2153 case BNOT:
2154 case LBRACK:
2155 case LITERAL_base:
2156 case STRING_LITERAL:
2157 case CHAR_LITERAL:
2159 break;
2161 default:
2163 throw new NoViableAltException(LT(1), getFilename());
2167 suite(bexp.Statements);
2168 match(END);
2170 break;
2172 case LCURLY:
2175 match(LCURLY);
2176 nothing();
2178 switch ( LA(1) )
2180 case BOR:
2182 blockargs(bexp);
2183 break;
2185 case EOF:
2186 case CLASS:
2187 case DO:
2188 case DEF:
2189 case BEGIN:
2190 case NUM_INT:
2191 case NUM_FLOAT:
2192 case NUM_LONG:
2193 case STATEMENT_END:
2194 case IDENT:
2195 case STATICIDENT:
2196 case INSTIDENT:
2197 case SEMI:
2198 case LITERAL_self:
2199 case LPAREN:
2200 case LITERAL_require:
2201 case LITERAL_redo:
2202 case LITERAL_break:
2203 case LITERAL_next:
2204 case LITERAL_retry:
2205 case LITERAL_lambda:
2206 case LCURLY:
2207 case RCURLY:
2208 case LITERAL_raise:
2209 case LITERAL_yield:
2210 case LITERAL_not:
2211 case LNOT:
2212 case PLUS:
2213 case MINUS:
2214 case BNOT:
2215 case LBRACK:
2216 case LITERAL_base:
2217 case STRING_LITERAL:
2218 case CHAR_LITERAL:
2220 break;
2222 default:
2224 throw new NoViableAltException(LT(1), getFilename());
2229 switch ( LA(1) )
2231 case EOF:
2232 case STATEMENT_END:
2233 case SEMI:
2235 statement_term();
2236 break;
2238 case CLASS:
2239 case DO:
2240 case DEF:
2241 case BEGIN:
2242 case NUM_INT:
2243 case NUM_FLOAT:
2244 case NUM_LONG:
2245 case IDENT:
2246 case STATICIDENT:
2247 case INSTIDENT:
2248 case LITERAL_self:
2249 case LPAREN:
2250 case LITERAL_require:
2251 case LITERAL_redo:
2252 case LITERAL_break:
2253 case LITERAL_next:
2254 case LITERAL_retry:
2255 case LITERAL_lambda:
2256 case LCURLY:
2257 case RCURLY:
2258 case LITERAL_raise:
2259 case LITERAL_yield:
2260 case LITERAL_not:
2261 case LNOT:
2262 case PLUS:
2263 case MINUS:
2264 case BNOT:
2265 case LBRACK:
2266 case LITERAL_base:
2267 case STRING_LITERAL:
2268 case CHAR_LITERAL:
2270 break;
2272 default:
2274 throw new NoViableAltException(LT(1), getFilename());
2278 suite(bexp.Statements);
2279 match(RCURLY);
2281 break;
2283 default:
2285 throw new NoViableAltException(LT(1), getFilename());
2289 if (0==inputState.guessing)
2291 PopScope();
2293 return bexp;
2296 public void blockargs(
2297 BlockExpression bexp
2298 ) //throws RecognitionException, TokenStreamException
2301 ParameterVarIdentifier ident = null;
2303 match(BOR);
2304 ident=methodParam();
2305 if (0==inputState.guessing)
2307 bexp.AddBlockFormalParameter(ident);
2309 { // ( ... )*
2310 for (;;)
2312 if ((LA(1)==COMMA))
2314 match(COMMA);
2315 ident=methodParam();
2316 if (0==inputState.guessing)
2318 bexp.AddBlockFormalParameter(ident);
2321 else
2323 goto _loop97_breakloop;
2327 _loop97_breakloop: ;
2328 } // ( ... )*
2329 match(BOR);
2332 public RaiseExpression raise() //throws RecognitionException, TokenStreamException
2334 RaiseExpression rexp;
2336 rexp = null; IExpression exp;
2338 match(LITERAL_raise);
2339 exp=expression();
2340 if (0==inputState.guessing)
2342 rexp = new RaiseExpression(exp);
2344 return rexp;
2347 public YieldExpression yield() //throws RecognitionException, TokenStreamException
2349 YieldExpression rexp;
2351 rexp = new YieldExpression();
2353 match(LITERAL_yield);
2354 expressionList(rexp.ExpColl);
2355 return rexp;
2358 public void expressionList(
2359 IList expColl
2360 ) //throws RecognitionException, TokenStreamException
2363 IExpression exp = null;
2365 exp=expression();
2366 if (0==inputState.guessing)
2368 expColl.Add(exp);
2370 { // ( ... )*
2371 for (;;)
2373 if ((LA(1)==COMMA) && (tokenSet_12_.member(LA(2))))
2375 match(COMMA);
2376 exp=expression();
2377 if (0==inputState.guessing)
2379 expColl.Add(exp);
2382 else
2384 goto _loop112_breakloop;
2388 _loop112_breakloop: ;
2389 } // ( ... )*
2392 public IExpression and_test() //throws RecognitionException, TokenStreamException
2394 IExpression exp;
2396 exp = null; IExpression rhs = null;
2398 exp=not_test();
2399 { // ( ... )*
2400 for (;;)
2402 if ((LA(1)==LITERAL_and))
2404 match(LITERAL_and);
2405 rhs=not_test();
2406 if (0==inputState.guessing)
2408 exp = new BinaryExpression(exp, rhs, BinaryOp.And);
2411 else
2413 goto _loop103_breakloop;
2417 _loop103_breakloop: ;
2418 } // ( ... )*
2419 return exp;
2422 public IExpression not_test() //throws RecognitionException, TokenStreamException
2424 IExpression exp;
2426 exp = null; IExpression inner = null;
2428 switch ( LA(1) )
2430 case LITERAL_not:
2431 case LNOT:
2434 switch ( LA(1) )
2436 case LITERAL_not:
2438 match(LITERAL_not);
2439 break;
2441 case LNOT:
2443 match(LNOT);
2444 break;
2446 default:
2448 throw new NoViableAltException(LT(1), getFilename());
2452 inner=not_test();
2453 if (0==inputState.guessing)
2455 exp = new UnaryExpression(inner, UnaryOp.Not);
2457 break;
2459 case NUM_INT:
2460 case NUM_FLOAT:
2461 case NUM_LONG:
2462 case IDENT:
2463 case STATICIDENT:
2464 case INSTIDENT:
2465 case LITERAL_self:
2466 case LPAREN:
2467 case LCURLY:
2468 case PLUS:
2469 case MINUS:
2470 case BNOT:
2471 case LBRACK:
2472 case LITERAL_base:
2473 case STRING_LITERAL:
2474 case CHAR_LITERAL:
2476 exp=comparison();
2477 break;
2479 default:
2481 throw new NoViableAltException(LT(1), getFilename());
2484 return exp;
2487 public IExpression comparison() //throws RecognitionException, TokenStreamException
2489 IExpression exp;
2491 exp = null; IExpression rhs = null; BinaryOp op = BinaryOp.Undefined;
2493 exp=expression();
2494 { // ( ... )*
2495 for (;;)
2497 if ((tokenSet_13_.member(LA(1))))
2499 op=comp_op();
2500 rhs=expression();
2501 if (0==inputState.guessing)
2503 exp = new BinaryExpression(exp, rhs, op);
2506 else
2508 goto _loop108_breakloop;
2512 _loop108_breakloop: ;
2513 } // ( ... )*
2514 return exp;
2517 public BinaryOp comp_op() //throws RecognitionException, TokenStreamException
2519 BinaryOp op;
2521 op = BinaryOp.Undefined;
2523 switch ( LA(1) )
2525 case LTHAN:
2527 match(LTHAN);
2528 if (0==inputState.guessing)
2530 op = BinaryOp.LessThan;
2532 break;
2534 case GT:
2536 match(GT);
2537 if (0==inputState.guessing)
2539 op = BinaryOp.GreaterThan;
2541 break;
2543 case EQUAL:
2545 match(EQUAL);
2546 if (0==inputState.guessing)
2548 op = BinaryOp.Equal;
2550 break;
2552 case GE:
2554 match(GE);
2555 if (0==inputState.guessing)
2557 op = BinaryOp.GreaterEqual;
2559 break;
2561 case LE:
2563 match(LE);
2564 if (0==inputState.guessing)
2566 op = BinaryOp.LessEqual;
2568 break;
2570 case NOT_EQUAL:
2572 match(NOT_EQUAL);
2573 if (0==inputState.guessing)
2575 op = BinaryOp.NotEqual;
2577 break;
2579 case LITERAL_is:
2581 match(LITERAL_is);
2582 if (0==inputState.guessing)
2584 op = BinaryOp.IsA;
2586 break;
2588 default:
2590 throw new NoViableAltException(LT(1), getFilename());
2593 return op;
2596 public IExpression xor_expr() //throws RecognitionException, TokenStreamException
2598 IExpression exp;
2600 exp = null; IExpression rhs = null;
2602 exp=and_expr();
2603 { // ( ... )*
2604 for (;;)
2606 if ((LA(1)==BOR) && (tokenSet_12_.member(LA(2))))
2608 match(BOR);
2609 rhs=and_expr();
2610 if (0==inputState.guessing)
2612 exp = new BinaryExpression(exp, rhs, BinaryOp.Or2);
2615 else
2617 goto _loop118_breakloop;
2621 _loop118_breakloop: ;
2622 } // ( ... )*
2623 return exp;
2626 public IExpression and_expr() //throws RecognitionException, TokenStreamException
2628 IExpression exp;
2630 exp = null; IExpression rhs = null;
2632 exp=arith_expr();
2633 { // ( ... )*
2634 for (;;)
2636 if ((LA(1)==BAND))
2638 match(BAND);
2639 rhs=arith_expr();
2640 if (0==inputState.guessing)
2642 exp = new BinaryExpression(exp, rhs, BinaryOp.And2);
2645 else
2647 goto _loop121_breakloop;
2651 _loop121_breakloop: ;
2652 } // ( ... )*
2653 return exp;
2656 public IExpression arith_expr() //throws RecognitionException, TokenStreamException
2658 IExpression exp;
2660 IToken t = null;
2661 exp = null; IExpression rhs = null;
2663 exp=term();
2664 { // ( ... )*
2665 for (;;)
2667 if ((LA(1)==PLUS||LA(1)==MINUS))
2670 switch ( LA(1) )
2672 case PLUS:
2674 t = LT(1);
2675 match(PLUS);
2676 break;
2678 case MINUS:
2680 match(MINUS);
2681 break;
2683 default:
2685 throw new NoViableAltException(LT(1), getFilename());
2689 rhs=term();
2690 if (0==inputState.guessing)
2692 exp = new BinaryExpression(exp, rhs, t != null ? BinaryOp.Plus : BinaryOp.Minus);
2695 else
2697 goto _loop125_breakloop;
2701 _loop125_breakloop: ;
2702 } // ( ... )*
2703 return exp;
2706 public IExpression term() //throws RecognitionException, TokenStreamException
2708 IExpression exp;
2710 exp = null; IExpression rhs = null; BinaryOp op = BinaryOp.Undefined;
2712 exp=unary();
2713 { // ( ... )*
2714 for (;;)
2716 if ((tokenSet_14_.member(LA(1))))
2719 switch ( LA(1) )
2721 case STAR:
2723 match(STAR);
2724 if (0==inputState.guessing)
2726 op = BinaryOp.Mult;
2728 break;
2730 case SLASH:
2732 match(SLASH);
2733 if (0==inputState.guessing)
2735 op = BinaryOp.Div;
2737 break;
2739 case PERCENT:
2741 match(PERCENT);
2742 if (0==inputState.guessing)
2744 op = BinaryOp.Mod;
2746 break;
2748 default:
2750 throw new NoViableAltException(LT(1), getFilename());
2754 rhs=unary();
2755 if (0==inputState.guessing)
2757 exp = new BinaryExpression(exp, rhs, op);
2760 else
2762 goto _loop129_breakloop;
2766 _loop129_breakloop: ;
2767 } // ( ... )*
2768 return exp;
2771 public IExpression unary() //throws RecognitionException, TokenStreamException
2773 IExpression exp;
2775 exp = null; IExpression inner = null; UnaryOp op = UnaryOp.Plus;
2777 switch ( LA(1) )
2779 case PLUS:
2780 case MINUS:
2781 case BNOT:
2784 switch ( LA(1) )
2786 case PLUS:
2788 match(PLUS);
2789 if (0==inputState.guessing)
2791 op = UnaryOp.Plus;
2793 break;
2795 case MINUS:
2797 match(MINUS);
2798 if (0==inputState.guessing)
2800 op = UnaryOp.Minus;
2802 break;
2804 case BNOT:
2806 match(BNOT);
2807 if (0==inputState.guessing)
2809 op = UnaryOp.BitwiseNot;
2811 break;
2813 default:
2815 throw new NoViableAltException(LT(1), getFilename());
2819 inner=unary();
2820 if (0==inputState.guessing)
2822 exp = new UnaryExpression(inner, op);
2824 break;
2826 case NUM_INT:
2827 case NUM_FLOAT:
2828 case NUM_LONG:
2829 case IDENT:
2830 case STATICIDENT:
2831 case INSTIDENT:
2832 case LITERAL_self:
2833 case LPAREN:
2834 case LCURLY:
2835 case LBRACK:
2836 case LITERAL_base:
2837 case STRING_LITERAL:
2838 case CHAR_LITERAL:
2840 exp=primary();
2841 break;
2843 default:
2845 throw new NoViableAltException(LT(1), getFilename());
2848 return exp;
2851 public IExpression primary() //throws RecognitionException, TokenStreamException
2853 IExpression exp;
2855 exp = null;
2857 exp=atom();
2858 { // ( ... )*
2859 for (;;)
2861 if ((tokenSet_15_.member(LA(1))))
2863 exp=trailer(exp);
2865 else
2867 goto _loop134_breakloop;
2871 _loop134_breakloop: ;
2872 } // ( ... )*
2873 return exp;
2876 public IExpression atom() //throws RecognitionException, TokenStreamException
2878 IExpression exp;
2880 exp = null;
2882 switch ( LA(1) )
2884 case LBRACK:
2886 match(LBRACK);
2888 switch ( LA(1) )
2890 case NUM_INT:
2891 case NUM_FLOAT:
2892 case NUM_LONG:
2893 case IDENT:
2894 case STATICIDENT:
2895 case INSTIDENT:
2896 case LITERAL_self:
2897 case LPAREN:
2898 case LITERAL_lambda:
2899 case LCURLY:
2900 case LITERAL_raise:
2901 case LITERAL_yield:
2902 case LITERAL_not:
2903 case LNOT:
2904 case PLUS:
2905 case MINUS:
2906 case BNOT:
2907 case LBRACK:
2908 case LITERAL_base:
2909 case STRING_LITERAL:
2910 case CHAR_LITERAL:
2912 exp=listmaker();
2913 break;
2915 case RBRACK:
2917 break;
2919 default:
2921 throw new NoViableAltException(LT(1), getFilename());
2925 match(RBRACK);
2926 break;
2928 case LCURLY:
2930 match(LCURLY);
2932 switch ( LA(1) )
2934 case NUM_INT:
2935 case NUM_FLOAT:
2936 case NUM_LONG:
2937 case IDENT:
2938 case STATICIDENT:
2939 case INSTIDENT:
2940 case LITERAL_self:
2941 case LPAREN:
2942 case LCURLY:
2943 case PLUS:
2944 case MINUS:
2945 case BNOT:
2946 case LBRACK:
2947 case LITERAL_base:
2948 case STRING_LITERAL:
2949 case CHAR_LITERAL:
2951 exp=dictmaker();
2952 break;
2954 case RCURLY:
2956 break;
2958 default:
2960 throw new NoViableAltException(LT(1), getFilename());
2964 match(RCURLY);
2965 break;
2967 case IDENT:
2968 case STATICIDENT:
2969 case INSTIDENT:
2971 exp=varref();
2972 break;
2974 case NUM_INT:
2975 case NUM_FLOAT:
2976 case NUM_LONG:
2977 case STRING_LITERAL:
2978 case CHAR_LITERAL:
2980 exp=constantref();
2981 break;
2983 case LITERAL_self:
2985 match(LITERAL_self);
2986 if (0==inputState.guessing)
2988 exp = SelfReferenceExpression.Instance;
2990 break;
2992 case LITERAL_base:
2994 match(LITERAL_base);
2995 if (0==inputState.guessing)
2997 exp = BaseReferenceExpression.Instance;
2999 break;
3001 default:
3002 bool synPredMatched137 = false;
3003 if (((LA(1)==LPAREN) && (tokenSet_12_.member(LA(2)))))
3005 int _m137 = mark();
3006 synPredMatched137 = true;
3007 inputState.guessing++;
3008 try {
3010 range();
3013 catch (RecognitionException)
3015 synPredMatched137 = false;
3017 rewind(_m137);
3018 inputState.guessing--;
3020 if ( synPredMatched137 )
3022 exp=range();
3024 else if ((LA(1)==LPAREN) && (tokenSet_16_.member(LA(2)))) {
3025 match(LPAREN);
3027 switch ( LA(1) )
3029 case NUM_INT:
3030 case NUM_FLOAT:
3031 case NUM_LONG:
3032 case IDENT:
3033 case STATICIDENT:
3034 case INSTIDENT:
3035 case LITERAL_self:
3036 case LPAREN:
3037 case LITERAL_lambda:
3038 case LCURLY:
3039 case LITERAL_raise:
3040 case LITERAL_yield:
3041 case LITERAL_not:
3042 case LNOT:
3043 case PLUS:
3044 case MINUS:
3045 case BNOT:
3046 case LBRACK:
3047 case LITERAL_base:
3048 case STRING_LITERAL:
3049 case CHAR_LITERAL:
3051 exp=test();
3052 break;
3054 case RPAREN:
3056 break;
3058 default:
3060 throw new NoViableAltException(LT(1), getFilename());
3064 match(RPAREN);
3066 else
3068 throw new NoViableAltException(LT(1), getFilename());
3070 break; }
3071 return exp;
3074 public IExpression trailer(
3075 IExpression inner
3076 ) //throws RecognitionException, TokenStreamException
3078 IExpression exp;
3080 IToken t1 = null;
3081 IToken t = null;
3082 exp = null; BlockExpression temp = null; String qp = String.Empty;
3084 switch ( LA(1) )
3086 case LPAREN:
3088 match(LPAREN);
3089 if (0==inputState.guessing)
3091 exp = new MethodInvocationExpression(inner);
3094 switch ( LA(1) )
3096 case NUM_INT:
3097 case NUM_FLOAT:
3098 case NUM_LONG:
3099 case IDENT:
3100 case STATICIDENT:
3101 case INSTIDENT:
3102 case LITERAL_self:
3103 case LPAREN:
3104 case LITERAL_lambda:
3105 case LCURLY:
3106 case LITERAL_raise:
3107 case LITERAL_yield:
3108 case LITERAL_not:
3109 case LNOT:
3110 case PLUS:
3111 case MINUS:
3112 case BNOT:
3113 case LBRACK:
3114 case LITERAL_base:
3115 case STRING_LITERAL:
3116 case CHAR_LITERAL:
3118 arglist((exp as MethodInvocationExpression).Arguments);
3119 break;
3121 case RPAREN:
3123 break;
3125 default:
3127 throw new NoViableAltException(LT(1), getFilename());
3131 match(RPAREN);
3132 break;
3134 case DO:
3135 case LCURLY:
3137 temp=block();
3138 if (0==inputState.guessing)
3141 exp = inner;
3142 exp.Block = temp;
3145 break;
3147 case COLONCOLON:
3149 match(COLONCOLON);
3150 t1 = LT(1);
3151 match(IDENT);
3152 if (0==inputState.guessing)
3154 exp = new MemberAccessExpression(inner, t1.getText());
3156 break;
3158 default:
3159 if ((LA(1)==DOT) && (LA(2)==97))
3161 match(DOT);
3162 match(97);
3163 if (0==inputState.guessing)
3165 exp = new NullCheckExpression(inner);
3168 else if ((LA(1)==DOT) && (LA(2)==IDENT)) {
3169 match(DOT);
3170 t = LT(1);
3171 match(IDENT);
3172 if (0==inputState.guessing)
3174 exp = new MemberAccessExpression(inner, t.getText());
3177 else
3179 throw new NoViableAltException(LT(1), getFilename());
3181 break; }
3182 return exp;
3185 public IExpression range() //throws RecognitionException, TokenStreamException
3187 IExpression rex;
3189 IToken t = null;
3190 rex = null; IExpression lhs = null; IExpression rhs = null;
3192 match(LPAREN);
3193 lhs=expression();
3195 switch ( LA(1) )
3197 case DOTDOT:
3199 t = LT(1);
3200 match(DOTDOT);
3201 break;
3203 case DOTDOTDOT:
3205 match(DOTDOTDOT);
3206 break;
3208 default:
3210 throw new NoViableAltException(LT(1), getFilename());
3214 rhs=expression();
3215 match(RPAREN);
3216 if (0==inputState.guessing)
3218 rex = new RangeExpression(lhs, rhs, t != null);
3220 return rex;
3223 public ListExpression listmaker() //throws RecognitionException, TokenStreamException
3225 ListExpression exp;
3227 exp = new ListExpression(); IExpression item;
3229 item=test();
3230 if (0==inputState.guessing)
3232 exp.Add(item);
3234 { // ( ... )*
3235 for (;;)
3237 if ((LA(1)==COMMA))
3239 match(COMMA);
3240 item=test();
3241 if (0==inputState.guessing)
3243 exp.Add(item);
3246 else
3248 goto _loop153_breakloop;
3252 _loop153_breakloop: ;
3253 } // ( ... )*
3254 return exp;
3257 public DictExpression dictmaker() //throws RecognitionException, TokenStreamException
3259 DictExpression exp;
3261 exp = new DictExpression(); IExpression key, value;
3263 key=expression();
3264 match(MAPASSIGN);
3265 value=test();
3266 if (0==inputState.guessing)
3268 exp.Add(key, value);
3270 { // ( ... )*
3271 for (;;)
3273 if ((LA(1)==COMMA))
3275 match(COMMA);
3276 key=expression();
3277 match(MAPASSIGN);
3278 value=test();
3279 if (0==inputState.guessing)
3281 exp.Add(key, value);
3284 else
3286 goto _loop156_breakloop;
3290 _loop156_breakloop: ;
3291 } // ( ... )*
3292 return exp;
3295 public VariableReferenceExpression varref() //throws RecognitionException, TokenStreamException
3297 VariableReferenceExpression vre;
3299 Identifier ident = null; vre = null;
3301 ident=name();
3302 if (0==inputState.guessing)
3304 vre = new VariableReferenceExpression(ident);
3306 return vre;
3309 public ConstExpression constantref() //throws RecognitionException, TokenStreamException
3311 ConstExpression lre;
3313 IToken t1 = null;
3314 IToken t2 = null;
3315 IToken t3 = null;
3316 IToken t5 = null;
3317 IToken t6 = null;
3318 lre = null;
3320 switch ( LA(1) )
3322 case NUM_INT:
3324 t1 = LT(1);
3325 match(NUM_INT);
3326 if (0==inputState.guessing)
3328 lre = new ConstExpression(t1.getText(), ConstExpressionType.IntLiteral);
3330 break;
3332 case NUM_LONG:
3334 t2 = LT(1);
3335 match(NUM_LONG);
3336 if (0==inputState.guessing)
3338 lre = new ConstExpression(t2.getText(), ConstExpressionType.LongLiteral);
3340 break;
3342 case NUM_FLOAT:
3344 t3 = LT(1);
3345 match(NUM_FLOAT);
3346 if (0==inputState.guessing)
3348 lre = new ConstExpression(t3.getText(), ConstExpressionType.FloatLiteral);
3350 break;
3352 case STRING_LITERAL:
3354 t5 = LT(1);
3355 match(STRING_LITERAL);
3356 if (0==inputState.guessing)
3358 lre = new ConstExpression(t5.getText(), ConstExpressionType.StringLiteral);
3360 break;
3362 case CHAR_LITERAL:
3364 t6 = LT(1);
3365 match(CHAR_LITERAL);
3366 if (0==inputState.guessing)
3368 lre = new ConstExpression(t6.getText(), ConstExpressionType.CharLiteral);
3370 break;
3372 default:
3374 throw new NoViableAltException(LT(1), getFilename());
3377 return lre;
3380 public void arglist(
3381 IList expcoll
3382 ) //throws RecognitionException, TokenStreamException
3385 IExpression exp;
3387 exp=argument();
3388 if (0==inputState.guessing)
3390 expcoll.Add(exp);
3392 { // ( ... )*
3393 for (;;)
3395 if ((LA(1)==COMMA))
3397 match(COMMA);
3398 exp=argument();
3399 if (0==inputState.guessing)
3401 expcoll.Add(exp);
3404 else
3406 goto _loop149_breakloop;
3410 _loop149_breakloop: ;
3411 } // ( ... )*
3414 public IExpression argument() //throws RecognitionException, TokenStreamException
3416 IExpression exp;
3418 exp = null;
3420 exp=test();
3421 return exp;
3424 private void initializeFactory()
3428 public static readonly string[] tokenNames_ = new string[] {
3429 @"""<0>""",
3430 @"""EOF""",
3431 @"""<2>""",
3432 @"""NULL_TREE_LOOKAHEAD""",
3433 @"""class""",
3434 @"""do""",
3435 @"""end""",
3436 @"""def""",
3437 @"""operator""",
3438 @"""begin""",
3439 @"""while""",
3440 @"""TYPE""",
3441 @"""METHOD_CALL""",
3442 @"""SUPER_CTOR_CALL""",
3443 @"""POST_INC""",
3444 @"""POST_DEC""",
3445 @"""EXPR""",
3446 @"""ELIST""",
3447 @"""INDEX_OP""",
3448 @"""UNARY_MINUS""",
3449 @"""UNARY_PLUS""",
3450 @"""TYPECAST""",
3451 @"""ARRAY_DECLARATOR""",
3452 @"""NUM_INT""",
3453 @"""NUM_DOUBLE""",
3454 @"""NUM_FLOAT""",
3455 @"""NUM_LONG""",
3456 @"""STATEMENT_END""",
3457 @"""IDENT""",
3458 @"""DOT""",
3459 @"""COLONCOLON""",
3460 @"""COLON""",
3461 @"""STATICIDENT""",
3462 @"""INSTIDENT""",
3463 @"""SEMI""",
3464 @"""namespace""",
3465 @"""SL""",
3466 @"""self""",
3467 @"""override""",
3468 @"""abstract""",
3469 @"""new""",
3470 @"""final""",
3471 @"""public""",
3472 @"""private""",
3473 @"""protected""",
3474 @"""internal""",
3475 @"""COMMA""",
3476 @"""ASSIGN""",
3477 @"""initialize""",
3478 @"""LPAREN""",
3479 @"""RPAREN""",
3480 @"""require""",
3481 @"""LTHAN""",
3482 @"""STAR""",
3483 @"""BAND""",
3484 @"""PLUS_ASSIGN""",
3485 @"""MINUS_ASSIGN""",
3486 @"""STAR_ASSIGN""",
3487 @"""DIV_ASSIGN""",
3488 @"""MOD_ASSIGN""",
3489 @"""BAND_ASSIGN""",
3490 @"""BOR_ASSIGN""",
3491 @"""BXOR_ASSIGN""",
3492 @"""if""",
3493 @"""unless""",
3494 @"""until""",
3495 @"""redo""",
3496 @"""break""",
3497 @"""next""",
3498 @"""retry""",
3499 @"""lambda""",
3500 @"""LCURLY""",
3501 @"""RCURLY""",
3502 @"""raise""",
3503 @"""yield""",
3504 @"""BOR""",
3505 @"""or""",
3506 @"""and""",
3507 @"""not""",
3508 @"""LNOT""",
3509 @"""GT""",
3510 @"""EQUAL""",
3511 @"""GE""",
3512 @"""LE""",
3513 @"""NOT_EQUAL""",
3514 @"""is""",
3515 @"""BXOR""",
3516 @"""PLUS""",
3517 @"""MINUS""",
3518 @"""SLASH""",
3519 @"""PERCENT""",
3520 @"""BNOT""",
3521 @"""LBRACK""",
3522 @"""RBRACK""",
3523 @"""base""",
3524 @"""STRING_LITERAL""",
3525 @"""CHAR_LITERAL""",
3526 @"""nil?""",
3527 @"""DOTDOT""",
3528 @"""DOTDOTDOT""",
3529 @"""MAPASSIGN""",
3530 @"""QUESTION""",
3531 @"""DIV""",
3532 @"""INC""",
3533 @"""DEC""",
3534 @"""MOD""",
3535 @"""SR""",
3536 @"""SR_ASSIGN""",
3537 @"""BSR""",
3538 @"""BSR_ASSIGN""",
3539 @"""SL_ASSIGN""",
3540 @"""LOR""",
3541 @"""LAND""",
3542 @"""a new line""",
3543 @"""SL_NEWLINE""",
3544 @"""comments""",
3545 @"""WS""",
3546 @"""ESC""",
3547 @"""HEX_DIGIT""",
3548 @"""VOCAB""",
3549 @"""NUMBER""",
3550 @"""Int""",
3551 @"""NonZeroDigit""",
3552 @"""FloatTrailer""",
3553 @"""Exponent""",
3554 @"""CONTINUED_LINE"""
3557 private static long[] mk_tokenSet_0_()
3559 long[] data = { 2814952142275314L, 7944065020L, 0L, 0L};
3560 return data;
3562 public static readonly BitSet tokenSet_0_ = new BitSet(mk_tokenSet_0_());
3563 private static long[] mk_tokenSet_1_()
3565 long[] data = { -66073802045710L, 128849018879L, 0L, 0L};
3566 return data;
3568 public static readonly BitSet tokenSet_1_ = new BitSet(mk_tokenSet_1_());
3569 private static long[] mk_tokenSet_2_()
3571 long[] data = { 134217730L, 0L};
3572 return data;
3574 public static readonly BitSet tokenSet_2_ = new BitSet(mk_tokenSet_2_());
3575 private static long[] mk_tokenSet_3_()
3577 long[] data = { 2814900468449968L, 7944062716L, 0L, 0L};
3578 return data;
3580 public static readonly BitSet tokenSet_3_ = new BitSet(mk_tokenSet_3_());
3581 private static long[] mk_tokenSet_4_()
3583 long[] data = { 13153337344L, 0L};
3584 return data;
3586 public static readonly BitSet tokenSet_4_ = new BitSet(mk_tokenSet_4_());
3587 private static long[] mk_tokenSet_5_()
3589 long[] data = { 563100654764704L, 7944062716L, 0L, 0L};
3590 return data;
3592 public static readonly BitSet tokenSet_5_ = new BitSet(mk_tokenSet_5_());
3593 private static long[] mk_tokenSet_6_()
3595 long[] data = { -2388244507392990L, 8589934531L, 0L, 0L};
3596 return data;
3598 public static readonly BitSet tokenSet_6_ = new BitSet(mk_tokenSet_6_());
3599 private static long[] mk_tokenSet_7_()
3601 long[] data = { 2880871166116528L, 7944062716L, 0L, 0L};
3602 return data;
3604 public static readonly BitSet tokenSet_7_ = new BitSet(mk_tokenSet_7_());
3605 private static long[] mk_tokenSet_8_()
3607 long[] data = { -2388242359909342L, 8589934531L, 0L, 0L};
3608 return data;
3610 public static readonly BitSet tokenSet_8_ = new BitSet(mk_tokenSet_8_());
3611 private static long[] mk_tokenSet_9_()
3613 long[] data = { 563100654764576L, 7944062716L, 0L, 0L};
3614 return data;
3616 public static readonly BitSet tokenSet_9_ = new BitSet(mk_tokenSet_9_());
3617 private static long[] mk_tokenSet_10_()
3619 long[] data = { 4123437039616L, 0L};
3620 return data;
3622 public static readonly BitSet tokenSet_10_ = new BitSet(mk_tokenSet_10_());
3623 private static long[] mk_tokenSet_11_()
3625 long[] data = { 562968878120962L, 0L};
3626 return data;
3628 public static readonly BitSet tokenSet_11_ = new BitSet(mk_tokenSet_11_());
3629 private static long[] mk_tokenSet_12_()
3631 long[] data = { 563100654764032L, 7944011904L, 0L, 0L};
3632 return data;
3634 public static readonly BitSet tokenSet_12_ = new BitSet(mk_tokenSet_12_());
3635 private static long[] mk_tokenSet_13_()
3637 long[] data = { 4503599627370496L, 4128768L, 0L, 0L};
3638 return data;
3640 public static readonly BitSet tokenSet_13_ = new BitSet(mk_tokenSet_13_());
3641 private static long[] mk_tokenSet_14_()
3643 long[] data = { 9007199254740992L, 100663296L, 0L, 0L};
3644 return data;
3646 public static readonly BitSet tokenSet_14_ = new BitSet(mk_tokenSet_14_());
3647 private static long[] mk_tokenSet_15_()
3649 long[] data = { 562951564034080L, 128L, 0L, 0L};
3650 return data;
3652 public static readonly BitSet tokenSet_15_ = new BitSet(mk_tokenSet_15_());
3653 private static long[] mk_tokenSet_16_()
3655 long[] data = { 1689000561606656L, 7944062656L, 0L, 0L};
3656 return data;
3658 public static readonly BitSet tokenSet_16_ = new BitSet(mk_tokenSet_16_());