KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > persistence > antlr > ANTLRParser


1 // $ANTLR : "antlr.g" -> "ANTLRParser.java"$
2

3 package persistence.antlr;
4
5 import persistence.antlr.TokenBuffer;
6 import persistence.antlr.TokenStreamException;
7 import persistence.antlr.TokenStreamIOException;
8 import persistence.antlr.ANTLRException;
9 import persistence.antlr.LLkParser;
10 import persistence.antlr.Token;
11 import persistence.antlr.TokenStream;
12 import persistence.antlr.RecognitionException;
13 import persistence.antlr.NoViableAltException;
14 import persistence.antlr.MismatchedTokenException;
15 import persistence.antlr.SemanticException;
16 import persistence.antlr.ParserSharedInputState;
17 import persistence.antlr.collections.impl.BitSet;
18
19 import java.util.Enumeration JavaDoc;
20 import java.io.DataInputStream JavaDoc;
21 import java.io.InputStream JavaDoc;
22 import java.io.FileInputStream JavaDoc;
23 import java.io.IOException JavaDoc;
24
25 public class ANTLRParser extends persistence.antlr.LLkParser implements ANTLRTokenTypes
26  {
27
28     private static final boolean DEBUG_PARSER = false;
29
30     ANTLRGrammarParseBehavior behavior;
31     Tool antlrTool;
32     protected int blockNesting= -1;
33
34     public ANTLRParser(
35         TokenBuffer tokenBuf,
36         ANTLRGrammarParseBehavior behavior_,
37         Tool tool_
38     ) {
39         super(tokenBuf, 1);
40         tokenNames = _tokenNames;
41         behavior = behavior_;
42         antlrTool = tool_;
43     }
44
45         public void reportError(String JavaDoc s) {
46             antlrTool.error(s, getFilename(), -1, -1);
47         }
48
49         public void reportError(RecognitionException e) {
50             reportError(e, e.getErrorMessage());
51         }
52
53         public void reportError(RecognitionException e, String JavaDoc s) {
54             antlrTool.error(s, e.getFilename(), e.getLine(), e.getColumn());
55         }
56
57         public void reportWarning(String JavaDoc s) {
58             antlrTool.warning(s, getFilename(), -1, -1);
59         }
60
61     private boolean lastInRule() throws TokenStreamException {
62         if ( blockNesting==0 && (LA(1)==SEMI || LA(1)==LITERAL_exception || LA(1)==OR) ) {
63             return true;
64         }
65         return false;
66     }
67
68     private void checkForMissingEndRule(Token label) {
69         if ( label.getColumn()==1 ) {
70             antlrTool.warning("did you forget to terminate previous rule?", getFilename(), label.getLine(), label.getColumn());
71         }
72     }
73
74 protected ANTLRParser(TokenBuffer tokenBuf, int k) {
75   super(tokenBuf,k);
76   tokenNames = _tokenNames;
77 }
78
79 public ANTLRParser(TokenBuffer tokenBuf) {
80   this(tokenBuf,2);
81 }
82
83 protected ANTLRParser(TokenStream lexer, int k) {
84   super(lexer,k);
85   tokenNames = _tokenNames;
86 }
87
88 public ANTLRParser(TokenStream lexer) {
89   this(lexer,2);
90 }
91
92 public ANTLRParser(ParserSharedInputState state) {
93   super(state,2);
94   tokenNames = _tokenNames;
95 }
96
97     public final void grammar() throws RecognitionException, TokenStreamException {
98         
99         Token n = null;
100         Token h = null;
101         
102         try { // for error handling
103
{
104             _loop4:
105             do {
106                 if ((LA(1)==LITERAL_header)) {
107                     if ( inputState.guessing==0 ) {
108                         
109                                     n = null; // RK: prevent certain orders of header actions
110
// overwriting eachother.
111

112                     }
113                     match(LITERAL_header);
114                     {
115                     switch ( LA(1)) {
116                     case STRING_LITERAL:
117                     {
118                         n = LT(1);
119                         match(STRING_LITERAL);
120                         break;
121                     }
122                     case ACTION:
123                     {
124                         break;
125                     }
126                     default:
127                     {
128                         throw new NoViableAltException(LT(1), getFilename());
129                     }
130                     }
131                     }
132                     h = LT(1);
133                     match(ACTION);
134                     if ( inputState.guessing==0 ) {
135                         
136                                     // store the header action
137
// FIXME: 'n' should be checked for validity
138
behavior.refHeaderAction(n,h);
139                                 
140                     }
141                 }
142                 else {
143                     break _loop4;
144                 }
145                 
146             } while (true);
147             }
148             {
149             switch ( LA(1)) {
150             case OPTIONS:
151             {
152                 fileOptionsSpec();
153                 break;
154             }
155             case EOF:
156             case ACTION:
157             case DOC_COMMENT:
158             case LITERAL_lexclass:
159             case LITERAL_class:
160             {
161                 break;
162             }
163             default:
164             {
165                 throw new NoViableAltException(LT(1), getFilename());
166             }
167             }
168             }
169             {
170             _loop7:
171             do {
172                 if (((LA(1) >= ACTION && LA(1) <= LITERAL_class))) {
173                     classDef();
174                 }
175                 else {
176                     break _loop7;
177                 }
178                 
179             } while (true);
180             }
181             match(Token.EOF_TYPE);
182         }
183         catch (RecognitionException ex) {
184             if (inputState.guessing==0) {
185                 
186                 reportError(ex, "rule grammar trapped:\n"+ex.toString());
187                         consumeUntil(EOF);
188                     
189             } else {
190                 throw ex;
191             }
192         }
193     }
194     
195     public final void fileOptionsSpec() throws RecognitionException, TokenStreamException {
196         
197         Token idTok; Token value;
198         
199         match(OPTIONS);
200         {
201         _loop18:
202         do {
203             if ((LA(1)==TOKEN_REF||LA(1)==RULE_REF)) {
204                 idTok=id();
205                 match(ASSIGN);
206                 value=optionValue();
207                 if ( inputState.guessing==0 ) {
208                     behavior.setFileOption(idTok, value,getInputState().filename);
209                 }
210                 match(SEMI);
211             }
212             else {
213                 break _loop18;
214             }
215             
216         } while (true);
217         }
218         match(RCURLY);
219     }
220     
221     public final void classDef() throws RecognitionException, TokenStreamException {
222         
223         Token a = null;
224         Token d = null;
225         String JavaDoc doc=null;
226         
227         try { // for error handling
228
{
229             switch ( LA(1)) {
230             case ACTION:
231             {
232                 a = LT(1);
233                 match(ACTION);
234                 if ( inputState.guessing==0 ) {
235                     behavior.refPreambleAction(a);
236                 }
237                 break;
238             }
239             case DOC_COMMENT:
240             case LITERAL_lexclass:
241             case LITERAL_class:
242             {
243                 break;
244             }
245             default:
246             {
247                 throw new NoViableAltException(LT(1), getFilename());
248             }
249             }
250             }
251             {
252             switch ( LA(1)) {
253             case DOC_COMMENT:
254             {
255                 d = LT(1);
256                 match(DOC_COMMENT);
257                 if ( inputState.guessing==0 ) {
258                     doc=d.getText();
259                 }
260                 break;
261             }
262             case LITERAL_lexclass:
263             case LITERAL_class:
264             {
265                 break;
266             }
267             default:
268             {
269                 throw new NoViableAltException(LT(1), getFilename());
270             }
271             }
272             }
273             {
274             boolean synPredMatched13 = false;
275             if (((LA(1)==LITERAL_lexclass||LA(1)==LITERAL_class) && (LA(2)==TOKEN_REF||LA(2)==RULE_REF))) {
276                 int _m13 = mark();
277                 synPredMatched13 = true;
278                 inputState.guessing++;
279                 try {
280                     {
281                     switch ( LA(1)) {
282                     case LITERAL_lexclass:
283                     {
284                         match(LITERAL_lexclass);
285                         break;
286                     }
287                     case LITERAL_class:
288                     {
289                         match(LITERAL_class);
290                         id();
291                         match(LITERAL_extends);
292                         match(LITERAL_Lexer);
293                         break;
294                     }
295                     default:
296                     {
297                         throw new NoViableAltException(LT(1), getFilename());
298                     }
299                     }
300                     }
301                 }
302                 catch (RecognitionException pe) {
303                     synPredMatched13 = false;
304                 }
305                 rewind(_m13);
306                 inputState.guessing--;
307             }
308             if ( synPredMatched13 ) {
309                 lexerSpec(doc);
310             }
311             else {
312                 boolean synPredMatched15 = false;
313                 if (((LA(1)==LITERAL_class) && (LA(2)==TOKEN_REF||LA(2)==RULE_REF))) {
314                     int _m15 = mark();
315                     synPredMatched15 = true;
316                     inputState.guessing++;
317                     try {
318                         {
319                         match(LITERAL_class);
320                         id();
321                         match(LITERAL_extends);
322                         match(LITERAL_TreeParser);
323                         }
324                     }
325                     catch (RecognitionException pe) {
326                         synPredMatched15 = false;
327                     }
328                     rewind(_m15);
329                     inputState.guessing--;
330                 }
331                 if ( synPredMatched15 ) {
332                     treeParserSpec(doc);
333                 }
334                 else if ((LA(1)==LITERAL_class) && (LA(2)==TOKEN_REF||LA(2)==RULE_REF)) {
335                     parserSpec(doc);
336                 }
337                 else {
338                     throw new NoViableAltException(LT(1), getFilename());
339                 }
340                 }
341                 }
342                 rules();
343                 if ( inputState.guessing==0 ) {
344                     behavior.endGrammar();
345                 }
346             }
347             catch (RecognitionException ex) {
348                 if (inputState.guessing==0) {
349                     
350                             if ( ex instanceof NoViableAltException ) {
351                                 NoViableAltException e = (NoViableAltException)ex;
352                                 // RK: These probably generate inconsequent error messages...
353
// have to see how this comes out..
354
if ( e.token.getType()==DOC_COMMENT ) {
355                                     reportError(ex, "JAVADOC comments may only prefix rules and grammars");
356                                 }
357                                 else {
358                                     reportError(ex, "rule classDef trapped:\n"+ex.toString());
359                                 }
360                             }
361                             else {
362                                 reportError(ex, "rule classDef trapped:\n"+ex.toString());
363                             }
364                             behavior.abortGrammar();
365                             boolean consuming = true;
366                             // consume everything until the next class definition or EOF
367
while (consuming) {
368                                 consume();
369                                 switch(LA(1)) {
370                                 case LITERAL_class:
371                                 case LITERAL_lexclass:
372                                 case EOF:
373                                     consuming = false;
374                                     break;
375                                 }
376                             }
377                         
378                 } else {
379                     throw ex;
380                 }
381             }
382         }
383         
384     public final Token id() throws RecognitionException, TokenStreamException {
385          Token idTok ;
386         
387         Token a = null;
388         Token b = null;
389         idTok = null;
390         
391         switch ( LA(1)) {
392         case TOKEN_REF:
393         {
394             a = LT(1);
395             match(TOKEN_REF);
396             if ( inputState.guessing==0 ) {
397                 idTok = a;
398             }
399             break;
400         }
401         case RULE_REF:
402         {
403             b = LT(1);
404             match(RULE_REF);
405             if ( inputState.guessing==0 ) {
406                 idTok = b;
407             }
408             break;
409         }
410         default:
411         {
412             throw new NoViableAltException(LT(1), getFilename());
413         }
414         }
415         return idTok ;
416     }
417     
418     public final void lexerSpec(
419         String JavaDoc doc
420     ) throws RecognitionException, TokenStreamException {
421         
422         Token lc = null;
423         Token a = null;
424         
425             Token idTok;
426             String JavaDoc sup=null;
427         
428         
429         {
430         switch ( LA(1)) {
431         case LITERAL_lexclass:
432         {
433             lc = LT(1);
434             match(LITERAL_lexclass);
435             idTok=id();
436             if ( inputState.guessing==0 ) {
437                 
438                                 antlrTool.warning("lexclass' is deprecated; use 'class X extends Lexer'",
439                                                  getFilename(), lc.getLine(), lc.getColumn());
440                 // System.out.println("warning: line " + lc.getLine() + ": 'lexclass' is deprecated; use 'class X extends Lexer'");
441

442             }
443             break;
444         }
445         case LITERAL_class:
446         {
447             match(LITERAL_class);
448             idTok=id();
449             match(LITERAL_extends);
450             match(LITERAL_Lexer);
451             {
452             switch ( LA(1)) {
453             case LPAREN:
454             {
455                 sup=superClass();
456                 break;
457             }
458             case SEMI:
459             {
460                 break;
461             }
462             default:
463             {
464                 throw new NoViableAltException(LT(1), getFilename());
465             }
466             }
467             }
468             break;
469         }
470         default:
471         {
472             throw new NoViableAltException(LT(1), getFilename());
473         }
474         }
475         }
476         if ( inputState.guessing==0 ) {
477             behavior.startLexer(getFilename(), idTok,sup,doc);
478         }
479         match(SEMI);
480         {
481         switch ( LA(1)) {
482         case OPTIONS:
483         {
484             lexerOptionsSpec();
485             break;
486         }
487         case ACTION:
488         case DOC_COMMENT:
489         case TOKENS:
490         case TOKEN_REF:
491         case LITERAL_protected:
492         case LITERAL_public:
493         case LITERAL_private:
494         case RULE_REF:
495         {
496             break;
497         }
498         default:
499         {
500             throw new NoViableAltException(LT(1), getFilename());
501         }
502         }
503         }
504         if ( inputState.guessing==0 ) {
505             behavior.endOptions();
506         }
507         {
508         switch ( LA(1)) {
509         case TOKENS:
510         {
511             tokensSpec();
512             break;
513         }
514         case ACTION:
515         case DOC_COMMENT:
516         case TOKEN_REF:
517         case LITERAL_protected:
518         case LITERAL_public:
519         case LITERAL_private:
520         case RULE_REF:
521         {
522             break;
523         }
524         default:
525         {
526             throw new NoViableAltException(LT(1), getFilename());
527         }
528         }
529         }
530         {
531         switch ( LA(1)) {
532         case ACTION:
533         {
534             a = LT(1);
535             match(ACTION);
536             if ( inputState.guessing==0 ) {
537                 behavior.refMemberAction(a);
538             }
539             break;
540         }
541         case DOC_COMMENT:
542         case TOKEN_REF:
543         case LITERAL_protected:
544         case LITERAL_public:
545         case LITERAL_private:
546         case RULE_REF:
547         {
548             break;
549         }
550         default:
551         {
552             throw new NoViableAltException(LT(1), getFilename());
553         }
554         }
555         }
556     }
557     
558     public final void treeParserSpec(
559         String JavaDoc doc
560     ) throws RecognitionException, TokenStreamException {
561         
562         Token a = null;
563         
564             Token idTok;
565             String JavaDoc sup=null;
566         
567         
568         match(LITERAL_class);
569         idTok=id();
570         match(LITERAL_extends);
571         match(LITERAL_TreeParser);
572         {
573         switch ( LA(1)) {
574         case LPAREN:
575         {
576             sup=superClass();
577             break;
578         }
579         case SEMI:
580         {
581             break;
582         }
583         default:
584         {
585             throw new NoViableAltException(LT(1), getFilename());
586         }
587         }
588         }
589         if ( inputState.guessing==0 ) {
590             behavior.startTreeWalker(getFilename(), idTok,sup,doc);
591         }
592         match(SEMI);
593         {
594         switch ( LA(1)) {
595         case OPTIONS:
596         {
597             treeParserOptionsSpec();
598             break;
599         }
600         case ACTION:
601         case DOC_COMMENT:
602         case TOKENS:
603         case TOKEN_REF:
604         case LITERAL_protected:
605         case LITERAL_public:
606         case LITERAL_private:
607         case RULE_REF:
608         {
609             break;
610         }
611         default:
612         {
613             throw new NoViableAltException(LT(1), getFilename());
614         }
615         }
616         }
617         if ( inputState.guessing==0 ) {
618             behavior.endOptions();
619         }
620         {
621         switch ( LA(1)) {
622         case TOKENS:
623         {
624             tokensSpec();
625             break;
626         }
627         case ACTION:
628         case DOC_COMMENT:
629         case TOKEN_REF:
630         case LITERAL_protected:
631         case LITERAL_public:
632         case LITERAL_private:
633         case RULE_REF:
634         {
635             break;
636         }
637         default:
638         {
639             throw new NoViableAltException(LT(1), getFilename());
640         }
641         }
642         }
643         {
644         switch ( LA(1)) {
645         case ACTION:
646         {
647             a = LT(1);
648             match(ACTION);
649             if ( inputState.guessing==0 ) {
650                 behavior.refMemberAction(a);
651             }
652             break;
653         }
654         case DOC_COMMENT:
655         case TOKEN_REF:
656         case LITERAL_protected:
657         case LITERAL_public:
658         case LITERAL_private:
659         case RULE_REF:
660         {
661             break;
662         }
663         default:
664         {
665             throw new NoViableAltException(LT(1), getFilename());
666         }
667         }
668         }
669     }
670     
671     public final void parserSpec(
672         String JavaDoc doc
673     ) throws RecognitionException, TokenStreamException {
674         
675         Token a = null;
676         
677             Token idTok;
678             String JavaDoc sup=null;
679         
680         
681         match(LITERAL_class);
682         idTok=id();
683         {
684         switch ( LA(1)) {
685         case LITERAL_extends:
686         {
687             match(LITERAL_extends);
688             match(LITERAL_Parser);
689             {
690             switch ( LA(1)) {
691             case LPAREN:
692             {
693                 sup=superClass();
694                 break;
695             }
696             case SEMI:
697             {
698                 break;
699             }
700             default:
701             {
702                 throw new NoViableAltException(LT(1), getFilename());
703             }
704             }
705             }
706             break;
707         }
708         case SEMI:
709         {
710             if ( inputState.guessing==0 ) {
711                 
712                             antlrTool.warning("use 'class X extends Parser'", getFilename(), idTok.getLine(), idTok.getColumn());
713                 // System.out.println("warning: line " +
714
// idTok.getLine() + ": use 'class X extends Parser'");
715

716             }
717             break;
718         }
719         default:
720         {
721             throw new NoViableAltException(LT(1), getFilename());
722         }
723         }
724         }
725         if ( inputState.guessing==0 ) {
726             behavior.startParser(getFilename(), idTok, sup, doc);
727         }
728         match(SEMI);
729         {
730         switch ( LA(1)) {
731         case OPTIONS:
732         {
733             parserOptionsSpec();
734             break;
735         }
736         case ACTION:
737         case DOC_COMMENT:
738         case TOKENS:
739         case TOKEN_REF:
740         case LITERAL_protected:
741         case LITERAL_public:
742         case LITERAL_private:
743         case RULE_REF:
744         {
745             break;
746         }
747         default:
748         {
749             throw new NoViableAltException(LT(1), getFilename());
750         }
751         }
752         }
753         if ( inputState.guessing==0 ) {
754             behavior.endOptions();
755         }
756         {
757         switch ( LA(1)) {
758         case TOKENS:
759         {
760             tokensSpec();
761             break;
762         }
763         case ACTION:
764         case DOC_COMMENT:
765         case TOKEN_REF:
766         case LITERAL_protected:
767         case LITERAL_public:
768         case LITERAL_private:
769         case RULE_REF:
770         {
771             break;
772         }
773         default:
774         {
775             throw new NoViableAltException(LT(1), getFilename());
776         }
777         }
778         }
779         {
780         switch ( LA(1)) {
781         case ACTION:
782         {
783             a = LT(1);
784             match(ACTION);
785             if ( inputState.guessing==0 ) {
786                 behavior.refMemberAction(a);
787             }
788             break;
789         }
790         case DOC_COMMENT:
791         case TOKEN_REF:
792         case LITERAL_protected:
793         case LITERAL_public:
794         case LITERAL_private:
795         case RULE_REF:
796         {
797             break;
798         }
799         default:
800         {
801             throw new NoViableAltException(LT(1), getFilename());
802         }
803         }
804         }
805     }
806     
807     public final void rules() throws RecognitionException, TokenStreamException {
808         
809         
810         {
811         int _cnt68=0;
812         _loop68:
813         do {
814             if ((_tokenSet_0.member(LA(1))) && (_tokenSet_1.member(LA(2)))) {
815                 rule();
816             }
817             else {
818                 if ( _cnt68>=1 ) { break _loop68; } else {throw new NoViableAltException(LT(1), getFilename());}
819             }
820             
821             _cnt68++;
822         } while (true);
823         }
824     }
825     
826     public final Token optionValue() throws RecognitionException, TokenStreamException {
827          Token retval ;
828         
829         Token sl = null;
830         Token cl = null;
831         Token il = null;
832         retval = null;
833         
834         switch ( LA(1)) {
835         case TOKEN_REF:
836         case RULE_REF:
837         {
838             retval=qualifiedID();
839             break;
840         }
841         case STRING_LITERAL:
842         {
843             sl = LT(1);
844             match(STRING_LITERAL);
845             if ( inputState.guessing==0 ) {
846                 retval = sl;
847             }
848             break;
849         }
850         case CHAR_LITERAL:
851         {
852             cl = LT(1);
853             match(CHAR_LITERAL);
854             if ( inputState.guessing==0 ) {
855                 retval = cl;
856             }
857             break;
858         }
859         case INT:
860         {
861             il = LT(1);
862             match(INT);
863             if ( inputState.guessing==0 ) {
864                 retval = il;
865             }
866             break;
867         }
868         default:
869         {
870             throw new NoViableAltException(LT(1), getFilename());
871         }
872         }
873         return retval ;
874     }
875     
876     public final void parserOptionsSpec() throws RecognitionException, TokenStreamException {
877         
878         Token idTok; Token value;
879         
880         match(OPTIONS);
881         {
882         _loop21:
883         do {
884             if ((LA(1)==TOKEN_REF||LA(1)==RULE_REF)) {
885                 idTok=id();
886                 match(ASSIGN);
887                 value=optionValue();
888                 if ( inputState.guessing==0 ) {
889                     behavior.setGrammarOption(idTok, value);
890                 }
891                 match(SEMI);
892             }
893             else {
894                 break _loop21;
895             }
896             
897         } while (true);
898         }
899         match(RCURLY);
900     }
901     
902     public final void treeParserOptionsSpec() throws RecognitionException, TokenStreamException {
903         
904         Token idTok; Token value;
905         
906         match(OPTIONS);
907         {
908         _loop24:
909         do {
910             if ((LA(1)==TOKEN_REF||LA(1)==RULE_REF)) {
911                 idTok=id();
912                 match(ASSIGN);
913                 value=optionValue();
914                 if ( inputState.guessing==0 ) {
915                     behavior.setGrammarOption(idTok, value);
916                 }
917                 match(SEMI);
918             }
919             else {
920                 break _loop24;
921             }
922             
923         } while (true);
924         }
925         match(RCURLY);
926     }
927     
928     public final void lexerOptionsSpec() throws RecognitionException, TokenStreamException {
929         
930         Token idTok; Token value; BitSet b;
931         
932         match(OPTIONS);
933         {
934         _loop27:
935         do {
936             switch ( LA(1)) {
937             case LITERAL_charVocabulary:
938             {
939                 match(LITERAL_charVocabulary);
940                 match(ASSIGN);
941                 b=charSet();
942                 match(SEMI);
943                 if ( inputState.guessing==0 ) {
944                     behavior.setCharVocabulary(b);
945                 }
946                 break;
947             }
948             case TOKEN_REF:
949             case RULE_REF:
950             {
951                 idTok=id();
952                 match(ASSIGN);
953                 value=optionValue();
954                 if ( inputState.guessing==0 ) {
955                     behavior.setGrammarOption(idTok, value);
956                 }
957                 match(SEMI);
958                 break;
959             }
960             default:
961             {
962                 break _loop27;
963             }
964             }
965         } while (true);
966         }
967         match(RCURLY);
968     }
969     
970     public final BitSet charSet() throws RecognitionException, TokenStreamException {
971          BitSet b ;
972         
973         
974             b = null;
975             BitSet tmpSet = null;
976         
977         
978         b=setBlockElement();
979         {
980         _loop34:
981         do {
982             if ((LA(1)==OR)) {
983                 match(OR);
984                 tmpSet=setBlockElement();
985                 if ( inputState.guessing==0 ) {
986                     b.orInPlace(tmpSet);
987                 }
988             }
989             else {
990                 break _loop34;
991             }
992             
993         } while (true);
994         }
995         return b ;
996     }
997     
998     public final void subruleOptionsSpec() throws RecognitionException, TokenStreamException {
999         
1000        Token idTok; Token value;
1001        
1002        match(OPTIONS);
1003        {
1004        _loop30:
1005        do {
1006            if ((LA(1)==TOKEN_REF||LA(1)==RULE_REF)) {
1007                idTok=id();
1008                match(ASSIGN);
1009                value=optionValue();
1010                if ( inputState.guessing==0 ) {
1011                    behavior.setSubruleOption(idTok, value);
1012                }
1013                match(SEMI);
1014            }
1015            else {
1016                break _loop30;
1017            }
1018            
1019        } while (true);
1020        }
1021        match(RCURLY);
1022    }
1023    
1024/** Match a.b.c.d qualified ids; WILDCARD here is overloaded as
1025 * id separator; that is, I need a reference to the '.' token.
1026 */

1027    public final Token qualifiedID() throws RecognitionException, TokenStreamException {
1028        Token qidTok=null;
1029        
1030        
1031            StringBuffer JavaDoc buf = new StringBuffer JavaDoc(30);
1032            Token a;
1033        
1034        
1035        a=id();
1036        if ( inputState.guessing==0 ) {
1037            buf.append(a.getText());
1038        }
1039        {
1040        _loop144:
1041        do {
1042            if ((LA(1)==WILDCARD)) {
1043                match(WILDCARD);
1044                a=id();
1045                if ( inputState.guessing==0 ) {
1046                    buf.append('.'); buf.append(a.getText());
1047                }
1048            }
1049            else {
1050                break _loop144;
1051            }
1052            
1053        } while (true);
1054        }
1055        if ( inputState.guessing==0 ) {
1056            
1057                     // can use either TOKEN_REF or RULE_REF; should
1058
// really create a QID or something instead.
1059
qidTok = new CommonToken(TOKEN_REF, buf.toString());
1060                     qidTok.setLine(a.getLine());
1061                    
1062        }
1063        return qidTok;
1064    }
1065    
1066    public final BitSet setBlockElement() throws RecognitionException, TokenStreamException {
1067         BitSet b ;
1068        
1069        Token c1 = null;
1070        Token c2 = null;
1071        
1072            b = null;
1073            int rangeMin = 0;
1074        
1075        
1076        c1 = LT(1);
1077        match(CHAR_LITERAL);
1078        if ( inputState.guessing==0 ) {
1079            
1080                    rangeMin = ANTLRLexer.tokenTypeForCharLiteral(c1.getText());
1081                    b = BitSet.of(rangeMin);
1082                
1083        }
1084        {
1085        switch ( LA(1)) {
1086        case RANGE:
1087        {
1088            match(RANGE);
1089            c2 = LT(1);
1090            match(CHAR_LITERAL);
1091            if ( inputState.guessing==0 ) {
1092                
1093                            int rangeMax = ANTLRLexer.tokenTypeForCharLiteral(c2.getText());
1094                            if (rangeMax < rangeMin) {
1095                                antlrTool.error("Malformed range line ", getFilename(), c1.getLine(), c1.getColumn());
1096                            }
1097                            for (int i = rangeMin+1; i <= rangeMax; i++) {
1098                                b.add(i);
1099                            }
1100                        
1101            }
1102            break;
1103        }
1104        case SEMI:
1105        case OR:
1106        {
1107            break;
1108        }
1109        default:
1110        {
1111            throw new NoViableAltException(LT(1), getFilename());
1112        }
1113        }
1114        }
1115        return b ;
1116    }
1117    
1118    public final void tokensSpec() throws RecognitionException, TokenStreamException {
1119        
1120        Token t1 = null;
1121        Token s1 = null;
1122        Token s3 = null;
1123        
1124        match(TOKENS);
1125        {
1126        int _cnt43=0;
1127        _loop43:
1128        do {
1129            if ((LA(1)==STRING_LITERAL||LA(1)==TOKEN_REF)) {
1130                {
1131                switch ( LA(1)) {
1132                case TOKEN_REF:
1133                {
1134                    if ( inputState.guessing==0 ) {
1135                        s1=null;
1136                    }
1137                    t1 = LT(1);
1138                    match(TOKEN_REF);
1139                    {
1140                    switch ( LA(1)) {
1141                    case ASSIGN:
1142                    {
1143                        match(ASSIGN);
1144                        s1 = LT(1);
1145                        match(STRING_LITERAL);
1146                        break;
1147                    }
1148                    case SEMI:
1149                    case OPEN_ELEMENT_OPTION:
1150                    {
1151                        break;
1152                    }
1153                    default:
1154                    {
1155                        throw new NoViableAltException(LT(1), getFilename());
1156                    }
1157                    }
1158                    }
1159                    if ( inputState.guessing==0 ) {
1160                        behavior.defineToken(t1, s1);
1161                    }
1162                    {
1163                    switch ( LA(1)) {
1164                    case OPEN_ELEMENT_OPTION:
1165                    {
1166                        tokensSpecOptions(t1);
1167                        break;
1168                    }
1169                    case SEMI:
1170                    {
1171                        break;
1172                    }
1173                    default:
1174                    {
1175                        throw new NoViableAltException(LT(1), getFilename());
1176                    }
1177                    }
1178                    }
1179                    break;
1180                }
1181                case STRING_LITERAL:
1182                {
1183                    s3 = LT(1);
1184                    match(STRING_LITERAL);
1185                    if ( inputState.guessing==0 ) {
1186                        behavior.defineToken(null, s3);
1187                    }
1188                    {
1189                    switch ( LA(1)) {
1190                    case OPEN_ELEMENT_OPTION:
1191                    {
1192                        tokensSpecOptions(s3);
1193                        break;
1194                    }
1195                    case SEMI:
1196                    {
1197                        break;
1198                    }
1199                    default:
1200                    {
1201                        throw new NoViableAltException(LT(1), getFilename());
1202                    }
1203                    }
1204                    }
1205                    break;
1206                }
1207                default:
1208                {
1209                    throw new NoViableAltException(LT(1), getFilename());
1210                }
1211                }
1212                }
1213                match(SEMI);
1214            }
1215            else {
1216                if ( _cnt43>=1 ) { break _loop43; } else {throw new NoViableAltException(LT(1), getFilename());}
1217            }
1218            
1219            _cnt43++;
1220        } while (true);
1221        }
1222        match(RCURLY);
1223    }
1224    
1225    public final void tokensSpecOptions(
1226        Token t
1227    ) throws RecognitionException, TokenStreamException {
1228        
1229        
1230            Token o=null, v=null;
1231        
1232        
1233        match(OPEN_ELEMENT_OPTION);
1234        o=id();
1235        match(ASSIGN);
1236        v=optionValue();
1237        if ( inputState.guessing==0 ) {
1238            behavior.refTokensSpecElementOption(t,o,v);
1239        }
1240        {
1241        _loop46:
1242        do {
1243            if ((LA(1)==SEMI)) {
1244                match(SEMI);
1245                o=id();
1246                match(ASSIGN);
1247                v=optionValue();
1248                if ( inputState.guessing==0 ) {
1249                    behavior.refTokensSpecElementOption(t,o,v);
1250                }
1251            }
1252            else {
1253                break _loop46;
1254            }
1255            
1256        } while (true);
1257        }
1258        match(CLOSE_ELEMENT_OPTION);
1259    }
1260    
1261    public final String JavaDoc superClass() throws RecognitionException, TokenStreamException {
1262        String JavaDoc sup;
1263        
1264        sup=null;
1265        
1266        match(LPAREN);
1267        if ( inputState.guessing==0 ) {
1268            
1269                        sup = LT(1).getText();
1270                        sup = StringUtils.stripFrontBack(sup, "\"", "\"");
1271                        
1272        }
1273        {
1274        match(STRING_LITERAL);
1275        }
1276        match(RPAREN);
1277        return sup;
1278    }
1279    
1280    public final void rule() throws RecognitionException, TokenStreamException {
1281        
1282        Token d = null;
1283        Token p1 = null;
1284        Token p2 = null;
1285        Token p3 = null;
1286        Token aa = null;
1287        Token rt = null;
1288        Token a = null;
1289        
1290            String JavaDoc access="public";
1291            Token idTok;
1292            String JavaDoc doc=null;
1293            boolean ruleAutoGen = true;
1294            blockNesting = -1; // block increments, so -1 to make rule at level 0
1295

1296        
1297        {
1298        switch ( LA(1)) {
1299        case DOC_COMMENT:
1300        {
1301            d = LT(1);
1302            match(DOC_COMMENT);
1303            if ( inputState.guessing==0 ) {
1304                doc=d.getText();
1305            }
1306            break;
1307        }
1308        case TOKEN_REF:
1309        case LITERAL_protected:
1310        case LITERAL_public:
1311        case LITERAL_private:
1312        case RULE_REF:
1313        {
1314            break;
1315        }
1316        default:
1317        {
1318            throw new NoViableAltException(LT(1), getFilename());
1319        }
1320        }
1321        }
1322        {
1323        switch ( LA(1)) {
1324        case LITERAL_protected:
1325        {
1326            p1 = LT(1);
1327            match(LITERAL_protected);
1328            if ( inputState.guessing==0 ) {
1329                access=p1.getText();
1330            }
1331            break;
1332        }
1333        case LITERAL_public:
1334        {
1335            p2 = LT(1);
1336            match(LITERAL_public);
1337            if ( inputState.guessing==0 ) {
1338                access=p2.getText();
1339            }
1340            break;
1341        }
1342        case LITERAL_private:
1343        {
1344            p3 = LT(1);
1345            match(LITERAL_private);
1346            if ( inputState.guessing==0 ) {
1347                access=p3.getText();
1348            }
1349            break;
1350        }
1351        case TOKEN_REF:
1352        case RULE_REF:
1353        {
1354            break;
1355        }
1356        default:
1357        {
1358            throw new NoViableAltException(LT(1), getFilename());
1359        }
1360        }
1361        }
1362        idTok=id();
1363        {
1364        switch ( LA(1)) {
1365        case BANG:
1366        {
1367            match(BANG);
1368            if ( inputState.guessing==0 ) {
1369                ruleAutoGen = false;
1370            }
1371            break;
1372        }
1373        case ACTION:
1374        case OPTIONS:
1375        case ARG_ACTION:
1376        case LITERAL_returns:
1377        case COLON:
1378        case LITERAL_throws:
1379        {
1380            break;
1381        }
1382        default:
1383        {
1384            throw new NoViableAltException(LT(1), getFilename());
1385        }
1386        }
1387        }
1388        if ( inputState.guessing==0 ) {
1389            
1390                    behavior.defineRuleName(idTok, access, ruleAutoGen, doc);
1391                
1392        }
1393        {
1394        switch ( LA(1)) {
1395        case ARG_ACTION:
1396        {
1397            aa = LT(1);
1398            match(ARG_ACTION);
1399            if ( inputState.guessing==0 ) {
1400                behavior.refArgAction(aa);
1401            }
1402            break;
1403        }
1404        case ACTION:
1405        case OPTIONS:
1406        case LITERAL_returns:
1407        case COLON:
1408        case LITERAL_throws:
1409        {
1410            break;
1411        }
1412        default:
1413        {
1414            throw new NoViableAltException(LT(1), getFilename());
1415        }
1416        }
1417        }
1418        {
1419        switch ( LA(1)) {
1420        case LITERAL_returns:
1421        {
1422            match(LITERAL_returns);
1423            rt = LT(1);
1424            match(ARG_ACTION);
1425            if ( inputState.guessing==0 ) {
1426                behavior.refReturnAction(rt);
1427            }
1428            break;
1429        }
1430        case ACTION:
1431        case OPTIONS:
1432        case COLON:
1433        case LITERAL_throws:
1434        {
1435            break;
1436        }
1437        default:
1438        {
1439            throw new NoViableAltException(LT(1), getFilename());
1440        }
1441        }
1442        }
1443        {
1444        switch ( LA(1)) {
1445        case LITERAL_throws:
1446        {
1447            throwsSpec();
1448            break;
1449        }
1450        case ACTION:
1451        case OPTIONS:
1452        case COLON:
1453        {
1454            break;
1455        }
1456        default:
1457        {
1458            throw new NoViableAltException(LT(1), getFilename());
1459        }
1460        }
1461        }
1462        {
1463        switch ( LA(1)) {
1464        case OPTIONS:
1465        {
1466            ruleOptionsSpec();
1467            break;
1468        }
1469        case ACTION:
1470        case COLON:
1471        {
1472            break;
1473        }
1474        default:
1475        {
1476            throw new NoViableAltException(LT(1), getFilename());
1477        }
1478        }
1479        }
1480        {
1481        switch ( LA(1)) {
1482        case ACTION:
1483        {
1484            a = LT(1);
1485            match(ACTION);
1486            if ( inputState.guessing==0 ) {
1487                behavior.refInitAction(a);
1488            }
1489            break;
1490        }
1491        case COLON:
1492        {
1493            break;
1494        }
1495        default:
1496        {
1497            throw new NoViableAltException(LT(1), getFilename());
1498        }
1499        }
1500        }
1501        match(COLON);
1502        block();
1503        match(SEMI);
1504        {
1505        switch ( LA(1)) {
1506        case LITERAL_exception:
1507        {
1508            exceptionGroup();
1509            break;
1510        }
1511        case EOF:
1512        case ACTION:
1513        case DOC_COMMENT:
1514        case LITERAL_lexclass:
1515        case LITERAL_class:
1516        case TOKEN_REF:
1517        case LITERAL_protected:
1518        case LITERAL_public:
1519        case LITERAL_private:
1520        case RULE_REF:
1521        {
1522            break;
1523        }
1524        default:
1525        {
1526            throw new NoViableAltException(LT(1), getFilename());
1527        }
1528        }
1529        }
1530        if ( inputState.guessing==0 ) {
1531            behavior.endRule(idTok.getText());
1532        }
1533    }
1534    
1535    public final void throwsSpec() throws RecognitionException, TokenStreamException {
1536        
1537        
1538            String JavaDoc t=null;
1539            Token a,b;
1540        
1541        
1542        match(LITERAL_throws);
1543        a=id();
1544        if ( inputState.guessing==0 ) {
1545            t=a.getText();
1546        }
1547        {
1548        _loop84:
1549        do {
1550            if ((LA(1)==COMMA)) {
1551                match(COMMA);
1552                b=id();
1553                if ( inputState.guessing==0 ) {
1554                    t+=","+b.getText();
1555                }
1556            }
1557            else {
1558                break _loop84;
1559            }
1560            
1561        } while (true);
1562        }
1563        if ( inputState.guessing==0 ) {
1564            behavior.setUserExceptions(t);
1565        }
1566    }
1567    
1568    public final void ruleOptionsSpec() throws RecognitionException, TokenStreamException {
1569        
1570        Token idTok; Token value;
1571        
1572        match(OPTIONS);
1573        {
1574        _loop81:
1575        do {
1576            if ((LA(1)==TOKEN_REF||LA(1)==RULE_REF)) {
1577                idTok=id();
1578                match(ASSIGN);
1579                value=optionValue();
1580                if ( inputState.guessing==0 ) {
1581                    behavior.setRuleOption(idTok, value);
1582                }
1583                match(SEMI);
1584            }
1585            else {
1586                break _loop81;
1587            }
1588            
1589        } while (true);
1590        }
1591        match(RCURLY);
1592    }
1593    
1594    public final void block() throws RecognitionException, TokenStreamException {
1595        
1596        
1597        if ( inputState.guessing==0 ) {
1598            blockNesting++;
1599        }
1600        alternative();
1601        {
1602        _loop87:
1603        do {
1604            if ((LA(1)==OR)) {
1605                match(OR);
1606                alternative();
1607            }
1608            else {
1609                break _loop87;
1610            }
1611            
1612        } while (true);
1613        }
1614        if ( inputState.guessing==0 ) {
1615            blockNesting--;
1616        }
1617    }
1618    
1619    public final void exceptionGroup() throws RecognitionException, TokenStreamException {
1620        
1621        
1622        if ( inputState.guessing==0 ) {
1623            behavior.beginExceptionGroup();
1624        }
1625        {
1626        int _cnt95=0;
1627        _loop95:
1628        do {
1629            if ((LA(1)==LITERAL_exception)) {
1630                exceptionSpec();
1631            }
1632            else {
1633                if ( _cnt95>=1 ) { break _loop95; } else {throw new NoViableAltException(LT(1), getFilename());}
1634            }
1635            
1636            _cnt95++;
1637        } while (true);
1638        }
1639        if ( inputState.guessing==0 ) {
1640            behavior.endExceptionGroup();
1641        }
1642    }
1643    
1644    public final void alternative() throws RecognitionException, TokenStreamException {
1645        
1646        boolean altAutoGen = true;
1647        
1648        {
1649        switch ( LA(1)) {
1650        case BANG:
1651        {
1652            match(BANG);
1653            if ( inputState.guessing==0 ) {
1654                altAutoGen=false;
1655            }
1656            break;
1657        }
1658        case STRING_LITERAL:
1659        case ACTION:
1660        case SEMI:
1661        case CHAR_LITERAL:
1662        case OR:
1663        case TOKEN_REF:
1664        case LPAREN:
1665        case RPAREN:
1666        case LITERAL_exception:
1667        case RULE_REF:
1668        case NOT_OP:
1669        case SEMPRED:
1670        case TREE_BEGIN:
1671        case WILDCARD:
1672        {
1673            break;
1674        }
1675        default:
1676        {
1677            throw new NoViableAltException(LT(1), getFilename());
1678        }
1679        }
1680        }
1681        if ( inputState.guessing==0 ) {
1682            behavior.beginAlt(altAutoGen);
1683        }
1684        {
1685        _loop91:
1686        do {
1687            if ((_tokenSet_2.member(LA(1)))) {
1688                element();
1689            }
1690            else {
1691                break _loop91;
1692            }
1693            
1694        } while (true);
1695        }
1696        {
1697        switch ( LA(1)) {
1698        case LITERAL_exception:
1699        {
1700            exceptionSpecNoLabel();
1701            break;
1702        }
1703        case SEMI:
1704        case OR:
1705        case RPAREN:
1706        {
1707            break;
1708        }
1709        default:
1710        {
1711            throw new NoViableAltException(LT(1), getFilename());
1712        }
1713        }
1714        }
1715        if ( inputState.guessing==0 ) {
1716            behavior.endAlt();
1717        }
1718    }
1719    
1720    public final void element() throws RecognitionException, TokenStreamException {
1721        
1722        
1723        elementNoOptionSpec();
1724        {
1725        switch ( LA(1)) {
1726        case OPEN_ELEMENT_OPTION:
1727        {
1728            elementOptionSpec();
1729            break;
1730        }
1731        case STRING_LITERAL:
1732        case ACTION:
1733        case SEMI:
1734        case CHAR_LITERAL:
1735        case OR:
1736        case TOKEN_REF:
1737        case LPAREN:
1738        case RPAREN:
1739        case LITERAL_exception:
1740        case RULE_REF:
1741        case NOT_OP:
1742        case SEMPRED:
1743        case TREE_BEGIN:
1744        case WILDCARD:
1745        {
1746            break;
1747        }
1748        default:
1749        {
1750            throw new NoViableAltException(LT(1), getFilename());
1751        }
1752        }
1753        }
1754    }
1755    
1756    public final void exceptionSpecNoLabel() throws RecognitionException, TokenStreamException {
1757        
1758        
1759        match(LITERAL_exception);
1760        if ( inputState.guessing==0 ) {
1761            behavior.beginExceptionSpec(null);
1762        }
1763        {
1764        _loop102:
1765        do {
1766            if ((LA(1)==LITERAL_catch)) {
1767                exceptionHandler();
1768            }
1769            else {
1770                break _loop102;
1771            }
1772            
1773        } while (true);
1774        }
1775        if ( inputState.guessing==0 ) {
1776            behavior.endExceptionSpec();
1777        }
1778    }
1779    
1780    public final void exceptionSpec() throws RecognitionException, TokenStreamException {
1781        
1782        Token aa = null;
1783        Token labelAction = null;
1784        
1785        match(LITERAL_exception);
1786        {
1787        switch ( LA(1)) {
1788        case ARG_ACTION:
1789        {
1790            aa = LT(1);
1791            match(ARG_ACTION);
1792            if ( inputState.guessing==0 ) {
1793                labelAction = aa;
1794            }
1795            break;
1796        }
1797        case EOF:
1798        case ACTION:
1799        case DOC_COMMENT:
1800        case LITERAL_lexclass:
1801        case LITERAL_class:
1802        case TOKEN_REF:
1803        case LITERAL_protected:
1804        case LITERAL_public:
1805        case LITERAL_private:
1806        case LITERAL_exception:
1807        case LITERAL_catch:
1808        case RULE_REF:
1809        {
1810            break;
1811        }
1812        default:
1813        {
1814            throw new NoViableAltException(LT(1), getFilename());
1815        }
1816        }
1817        }
1818        if ( inputState.guessing==0 ) {
1819            behavior.beginExceptionSpec(labelAction);
1820        }
1821        {
1822        _loop99:
1823        do {
1824            if ((LA(1)==LITERAL_catch)) {
1825                exceptionHandler();
1826            }
1827            else {
1828                break _loop99;
1829            }
1830            
1831        } while (true);
1832        }
1833        if ( inputState.guessing==0 ) {
1834            behavior.endExceptionSpec();
1835        }
1836    }
1837    
1838    public final void exceptionHandler() throws RecognitionException, TokenStreamException {
1839        
1840        Token a1 = null;
1841        Token a2 = null;
1842        Token exType; Token exName;
1843        
1844        match(LITERAL_catch);
1845        a1 = LT(1);
1846        match(ARG_ACTION);
1847        a2 = LT(1);
1848        match(ACTION);
1849        if ( inputState.guessing==0 ) {
1850            behavior.refExceptionHandler(a1, a2);
1851        }
1852    }
1853    
1854    public final void elementNoOptionSpec() throws RecognitionException, TokenStreamException {
1855        
1856        Token rr = null;
1857        Token aa = null;
1858        Token tr = null;
1859        Token aa2 = null;
1860        Token r2 = null;
1861        Token aa3 = null;
1862        Token a = null;
1863        Token p = null;
1864        
1865            Token label = null;
1866            Token assignId = null;
1867            Token args = null;
1868            int autoGen = GrammarElement.AUTO_GEN_NONE;
1869        
1870        
1871        switch ( LA(1)) {
1872        case ACTION:
1873        {
1874            a = LT(1);
1875            match(ACTION);
1876            if ( inputState.guessing==0 ) {
1877                behavior.refAction(a);
1878            }
1879            break;
1880        }
1881        case SEMPRED:
1882        {
1883            p = LT(1);
1884            match(SEMPRED);
1885            if ( inputState.guessing==0 ) {
1886                behavior.refSemPred(p);
1887            }
1888            break;
1889        }
1890        case TREE_BEGIN:
1891        {
1892            tree();
1893            break;
1894        }
1895        default:
1896            if ((LA(1)==TOKEN_REF||LA(1)==RULE_REF) && (LA(2)==ASSIGN)) {
1897                assignId=id();
1898                match(ASSIGN);
1899                {
1900                if ((LA(1)==TOKEN_REF||LA(1)==RULE_REF) && (LA(2)==COLON)) {
1901                    label=id();
1902                    match(COLON);
1903                    if ( inputState.guessing==0 ) {
1904                        checkForMissingEndRule(label);
1905                    }
1906                }
1907                else if ((LA(1)==TOKEN_REF||LA(1)==RULE_REF) && (_tokenSet_3.member(LA(2)))) {
1908                }
1909                else {
1910                    throw new NoViableAltException(LT(1), getFilename());
1911                }
1912                
1913                }
1914                {
1915                switch ( LA(1)) {
1916                case RULE_REF:
1917                {
1918                    rr = LT(1);
1919                    match(RULE_REF);
1920                    {
1921                    switch ( LA(1)) {
1922                    case ARG_ACTION:
1923                    {
1924                        aa = LT(1);
1925                        match(ARG_ACTION);
1926                        if ( inputState.guessing==0 ) {
1927                            args=aa;
1928                        }
1929                        break;
1930                    }
1931                    case STRING_LITERAL:
1932                    case ACTION:
1933                    case SEMI:
1934                    case CHAR_LITERAL:
1935                    case OR:
1936                    case TOKEN_REF:
1937                    case OPEN_ELEMENT_OPTION:
1938                    case LPAREN:
1939                    case RPAREN:
1940                    case BANG:
1941                    case LITERAL_exception:
1942                    case RULE_REF:
1943                    case NOT_OP:
1944                    case SEMPRED:
1945                    case TREE_BEGIN:
1946                    case WILDCARD:
1947                    {
1948                        break;
1949                    }
1950                    default:
1951                    {
1952                        throw new NoViableAltException(LT(1), getFilename());
1953                    }
1954                    }
1955                    }
1956                    {
1957                    switch ( LA(1)) {
1958                    case BANG:
1959                    {
1960                        match(BANG);
1961                        if ( inputState.guessing==0 ) {
1962                            autoGen = GrammarElement.AUTO_GEN_BANG;
1963                        }
1964                        break;
1965                    }
1966                    case STRING_LITERAL:
1967                    case ACTION:
1968                    case SEMI:
1969                    case CHAR_LITERAL:
1970                    case OR:
1971                    case TOKEN_REF:
1972                    case OPEN_ELEMENT_OPTION:
1973                    case LPAREN:
1974                    case RPAREN:
1975                    case LITERAL_exception:
1976                    case RULE_REF:
1977                    case NOT_OP:
1978                    case SEMPRED:
1979                    case TREE_BEGIN:
1980                    case WILDCARD:
1981                    {
1982                        break;
1983                    }
1984                    default:
1985                    {
1986                        throw new NoViableAltException(LT(1), getFilename());
1987                    }
1988                    }
1989                    }
1990                    if ( inputState.guessing==0 ) {
1991                        behavior.refRule(assignId, rr, label, args, autoGen);
1992                    }
1993                    break;
1994                }
1995                case TOKEN_REF:
1996                {
1997                    tr = LT(1);
1998                    match(TOKEN_REF);
1999                    {
2000                    switch ( LA(1)) {
2001                    case ARG_ACTION:
2002                    {
2003                        aa2 = LT(1);
2004                        match(ARG_ACTION);
2005                        if ( inputState.guessing==0 ) {
2006                            args=aa2;
2007                        }
2008                        break;
2009                    }
2010                    case STRING_LITERAL:
2011                    case ACTION:
2012                    case SEMI:
2013                    case CHAR_LITERAL:
2014                    case OR:
2015                    case TOKEN_REF:
2016                    case OPEN_ELEMENT_OPTION:
2017                    case LPAREN:
2018                    case RPAREN:
2019                    case LITERAL_exception:
2020                    case RULE_REF:
2021                    case NOT_OP:
2022                    case SEMPRED:
2023                    case TREE_BEGIN:
2024                    case WILDCARD:
2025                    {
2026                        break;
2027                    }
2028                    default:
2029                    {
2030                        throw new NoViableAltException(LT(1), getFilename());
2031                    }
2032                    }
2033                    }
2034                    if ( inputState.guessing==0 ) {
2035                        behavior.refToken(assignId, tr, label, args, false, autoGen, lastInRule());
2036                    }
2037                    break;
2038                }
2039                default:
2040                {
2041                    throw new NoViableAltException(LT(1), getFilename());
2042                }
2043                }
2044                }
2045            }
2046            else if ((_tokenSet_4.member(LA(1))) && (_tokenSet_5.member(LA(2)))) {
2047                {
2048                if ((LA(1)==TOKEN_REF||LA(1)==RULE_REF) && (LA(2)==COLON)) {
2049                    label=id();
2050                    match(COLON);
2051                    if ( inputState.guessing==0 ) {
2052                        checkForMissingEndRule(label);
2053                    }
2054                }
2055                else if ((_tokenSet_4.member(LA(1))) && (_tokenSet_6.member(LA(2)))) {
2056                }
2057                else {
2058                    throw new NoViableAltException(LT(1), getFilename());
2059                }
2060                
2061                }
2062                {
2063                switch ( LA(1)) {
2064                case RULE_REF:
2065                {
2066                    r2 = LT(1);
2067                    match(RULE_REF);
2068                    {
2069                    switch ( LA(1)) {
2070                    case ARG_ACTION:
2071                    {
2072                        aa3 = LT(1);
2073                        match(ARG_ACTION);
2074                        if ( inputState.guessing==0 ) {
2075                            args=aa3;
2076                        }
2077                        break;
2078                    }
2079                    case STRING_LITERAL:
2080                    case ACTION:
2081                    case SEMI:
2082                    case CHAR_LITERAL:
2083                    case OR:
2084                    case TOKEN_REF:
2085                    case OPEN_ELEMENT_OPTION:
2086                    case LPAREN:
2087                    case RPAREN:
2088                    case BANG:
2089                    case LITERAL_exception:
2090                    case RULE_REF:
2091                    case NOT_OP:
2092                    case SEMPRED:
2093                    case TREE_BEGIN:
2094                    case WILDCARD:
2095                    {
2096                        break;
2097                    }
2098                    default:
2099                    {
2100                        throw new NoViableAltException(LT(1), getFilename());
2101                    }
2102                    }
2103                    }
2104                    {
2105                    switch ( LA(1)) {
2106                    case BANG:
2107                    {
2108                        match(BANG);
2109                        if ( inputState.guessing==0 ) {
2110                            autoGen = GrammarElement.AUTO_GEN_BANG;
2111                        }
2112                        break;
2113                    }
2114                    case STRING_LITERAL:
2115                    case ACTION:
2116                    case SEMI:
2117                    case CHAR_LITERAL:
2118                    case OR:
2119                    case TOKEN_REF:
2120                    case OPEN_ELEMENT_OPTION:
2121                    case LPAREN:
2122                    case RPAREN:
2123                    case LITERAL_exception:
2124                    case RULE_REF:
2125                    case NOT_OP:
2126                    case SEMPRED:
2127                    case TREE_BEGIN:
2128                    case WILDCARD:
2129                    {
2130                        break;
2131                    }
2132                    default:
2133                    {
2134                        throw new NoViableAltException(LT(1), getFilename());
2135                    }
2136                    }
2137                    }
2138                    if ( inputState.guessing==0 ) {
2139                        behavior.refRule(assignId, r2, label, args, autoGen);
2140                    }
2141                    break;
2142                }
2143                case NOT_OP:
2144                {
2145                    match(NOT_OP);
2146                    {
2147                    switch ( LA(1)) {
2148                    case CHAR_LITERAL:
2149                    case TOKEN_REF:
2150                    {
2151                        notTerminal(label);
2152                        break;
2153                    }
2154                    case LPAREN:
2155                    {
2156                        ebnf(label,true);
2157                        break;
2158                    }
2159                    default:
2160                    {
2161                        throw new NoViableAltException(LT(1), getFilename());
2162                    }
2163                    }
2164                    }
2165                    break;
2166                }
2167                case LPAREN:
2168                {
2169                    ebnf(label,false);
2170                    break;
2171                }
2172                default:
2173                    if ((LA(1)==STRING_LITERAL||LA(1)==CHAR_LITERAL||LA(1)==TOKEN_REF) && (LA(2)==RANGE)) {
2174                        range(label);
2175                    }
2176                    else if ((_tokenSet_7.member(LA(1))) && (_tokenSet_8.member(LA(2)))) {
2177                        terminal(label);
2178                    }
2179                else {
2180                    throw new NoViableAltException(LT(1), getFilename());
2181                }
2182                }
2183                }
2184            }
2185        else {
2186            throw new NoViableAltException(LT(1), getFilename());
2187        }
2188        }
2189    }
2190    
2191    public final void elementOptionSpec() throws RecognitionException, TokenStreamException {
2192        
2193        
2194            Token o=null, v=null;
2195        
2196        
2197        match(OPEN_ELEMENT_OPTION);
2198        o=id();
2199        match(ASSIGN);
2200        v=optionValue();
2201        if ( inputState.guessing==0 ) {
2202            behavior.refElementOption(o,v);
2203        }
2204        {
2205        _loop108:
2206        do {
2207            if ((LA(1)==SEMI)) {
2208                match(SEMI);
2209                o=id();
2210                match(ASSIGN);
2211                v=optionValue();
2212                if ( inputState.guessing==0 ) {
2213                    behavior.refElementOption(o,v);
2214                }
2215            }
2216            else {
2217                break _loop108;
2218            }
2219            
2220        } while (true);
2221        }
2222        match(CLOSE_ELEMENT_OPTION);
2223    }
2224    
2225    public final void range(
2226         Token label
2227    ) throws RecognitionException, TokenStreamException {
2228        
2229        Token crLeft = null;
2230        Token crRight = null;
2231        Token t = null;
2232        Token u = null;
2233        Token v = null;
2234        Token w = null;
2235        
2236            Token trLeft=null;
2237            Token trRight=null;
2238            int autoGen=GrammarElement.AUTO_GEN_NONE;
2239        
2240        
2241        switch ( LA(1)) {
2242        case CHAR_LITERAL:
2243        {
2244            crLeft = LT(1);
2245            match(CHAR_LITERAL);
2246            match(RANGE);
2247            crRight = LT(1);
2248            match(CHAR_LITERAL);
2249            {
2250            switch ( LA(1)) {
2251            case BANG:
2252            {
2253                match(BANG);
2254                if ( inputState.guessing==0 ) {
2255                    autoGen = GrammarElement.AUTO_GEN_BANG;
2256                }
2257                break;
2258            }
2259            case STRING_LITERAL:
2260            case ACTION:
2261            case SEMI:
2262            case CHAR_LITERAL:
2263            case OR:
2264            case TOKEN_REF:
2265            case OPEN_ELEMENT_OPTION:
2266            case LPAREN:
2267            case RPAREN:
2268            case LITERAL_exception:
2269            case RULE_REF:
2270            case NOT_OP:
2271            case SEMPRED:
2272            case TREE_BEGIN:
2273            case WILDCARD:
2274            {
2275                break;
2276            }
2277            default:
2278            {
2279                throw new NoViableAltException(LT(1), getFilename());
2280            }
2281            }
2282            }
2283            if ( inputState.guessing==0 ) {
2284                behavior.refCharRange(crLeft, crRight, label, autoGen, lastInRule());
2285            }
2286            break;
2287        }
2288        case STRING_LITERAL:
2289        case TOKEN_REF:
2290        {
2291            {
2292            switch ( LA(1)) {
2293            case TOKEN_REF:
2294            {
2295                t = LT(1);
2296                match(TOKEN_REF);
2297                if ( inputState.guessing==0 ) {
2298                    trLeft=t;
2299                }
2300                break;
2301            }
2302            case STRING_LITERAL:
2303            {
2304                u = LT(1);
2305                match(STRING_LITERAL);
2306                if ( inputState.guessing==0 ) {
2307                    trLeft=u;
2308                }
2309                break;
2310            }
2311            default:
2312            {
2313                throw new NoViableAltException(LT(1), getFilename());
2314            }
2315            }
2316            }
2317            match(RANGE);
2318            {
2319            switch ( LA(1)) {
2320            case TOKEN_REF:
2321            {
2322                v = LT(1);
2323                match(TOKEN_REF);
2324                if ( inputState.guessing==0 ) {
2325                    trRight=v;
2326                }
2327                break;
2328            }
2329            case STRING_LITERAL:
2330            {
2331                w = LT(1);
2332                match(STRING_LITERAL);
2333                if ( inputState.guessing==0 ) {
2334                    trRight=w;
2335                }
2336                break;
2337            }
2338            default:
2339            {
2340                throw new NoViableAltException(LT(1), getFilename());
2341            }
2342            }
2343            }
2344            autoGen=ast_type_spec();
2345            if ( inputState.guessing==0 ) {
2346                behavior.refTokenRange(trLeft, trRight, label, autoGen, lastInRule());
2347            }
2348            break;
2349        }
2350        default:
2351        {
2352            throw new NoViableAltException(LT(1), getFilename());
2353        }
2354        }
2355    }
2356    
2357    public final void terminal(
2358         Token label
2359    ) throws RecognitionException, TokenStreamException {
2360        
2361        Token cl = null;
2362        Token tr = null;
2363        Token aa = null;
2364        Token sl = null;
2365        Token wi = null;
2366        
2367            int autoGen=GrammarElement.AUTO_GEN_NONE;
2368            Token args=null;
2369        
2370        
2371        switch ( LA(1)) {
2372        case CHAR_LITERAL:
2373        {
2374            cl = LT(1);
2375            match(CHAR_LITERAL);
2376            {
2377            switch ( LA(1)) {
2378            case BANG:
2379            {
2380                match(BANG);
2381                if ( inputState.guessing==0 ) {
2382                    autoGen = GrammarElement.AUTO_GEN_BANG;
2383                }
2384                break;
2385            }
2386            case STRING_LITERAL:
2387            case ACTION:
2388            case SEMI:
2389            case CHAR_LITERAL:
2390            case OR:
2391            case TOKEN_REF:
2392            case OPEN_ELEMENT_OPTION:
2393            case LPAREN:
2394            case RPAREN:
2395            case LITERAL_exception:
2396            case RULE_REF:
2397            case NOT_OP:
2398            case SEMPRED:
2399            case TREE_BEGIN:
2400            case WILDCARD:
2401            {
2402                break;
2403            }
2404            default:
2405            {
2406                throw new NoViableAltException(LT(1), getFilename());
2407            }
2408            }
2409            }
2410            if ( inputState.guessing==0 ) {
2411                behavior.refCharLiteral(cl, label, false, autoGen, lastInRule());
2412            }
2413            break;
2414        }
2415        case TOKEN_REF:
2416        {
2417            tr = LT(1);
2418            match(TOKEN_REF);
2419            autoGen=ast_type_spec();
2420            {
2421            switch ( LA(1)) {
2422            case ARG_ACTION:
2423            {
2424                aa = LT(1);
2425                match(ARG_ACTION);
2426                if ( inputState.guessing==0 ) {
2427                    args=aa;
2428                }
2429                break;
2430            }
2431            case STRING_LITERAL:
2432            case ACTION:
2433            case SEMI:
2434            case CHAR_LITERAL:
2435            case OR:
2436            case TOKEN_REF:
2437            case OPEN_ELEMENT_OPTION:
2438            case LPAREN:
2439            case RPAREN:
2440            case LITERAL_exception:
2441            case RULE_REF:
2442            case NOT_OP:
2443            case SEMPRED:
2444            case TREE_BEGIN:
2445            case WILDCARD:
2446            {
2447                break;
2448            }
2449            default:
2450            {
2451                throw new NoViableAltException(LT(1), getFilename());
2452            }
2453            }
2454            }
2455            if ( inputState.guessing==0 ) {
2456                behavior.refToken(null, tr, label, args, false, autoGen, lastInRule());
2457            }
2458            break;
2459        }
2460        case STRING_LITERAL:
2461        {
2462            sl = LT(1);
2463            match(STRING_LITERAL);
2464            autoGen=ast_type_spec();
2465            if ( inputState.guessing==0 ) {
2466                behavior.refStringLiteral(sl, label, autoGen, lastInRule());
2467            }
2468            break;
2469        }
2470        case WILDCARD:
2471        {
2472            wi = LT(1);
2473            match(WILDCARD);
2474            autoGen=ast_type_spec();
2475            if ( inputState.guessing==0 ) {
2476                behavior.refWildcard(wi, label, autoGen);
2477            }
2478            break;
2479        }
2480        default:
2481        {
2482            throw new NoViableAltException(LT(1), getFilename());
2483        }
2484        }
2485    }
2486    
2487    public final void notTerminal(
2488         Token label
2489    ) throws RecognitionException, TokenStreamException {
2490        
2491        Token cl = null;
2492        Token tr = null;
2493        int autoGen=GrammarElement.AUTO_GEN_NONE;
2494        
2495        switch ( LA(1)) {
2496        case CHAR_LITERAL:
2497        {
2498            cl = LT(1);
2499            match(CHAR_LITERAL);
2500            {
2501            switch ( LA(1)) {
2502            case BANG:
2503            {
2504                match(BANG);
2505                if ( inputState.guessing==0 ) {
2506                    autoGen = GrammarElement.AUTO_GEN_BANG;
2507                }
2508                break;
2509            }
2510            case STRING_LITERAL:
2511            case ACTION:
2512            case SEMI:
2513            case CHAR_LITERAL:
2514            case OR:
2515            case TOKEN_REF:
2516            case OPEN_ELEMENT_OPTION:
2517            case LPAREN:
2518            case RPAREN:
2519            case LITERAL_exception:
2520            case RULE_REF:
2521            case NOT_OP:
2522            case SEMPRED:
2523            case TREE_BEGIN:
2524            case WILDCARD:
2525            {
2526                break;
2527            }
2528            default:
2529            {
2530                throw new NoViableAltException(LT(1), getFilename());
2531            }
2532            }
2533            }
2534            if ( inputState.guessing==0 ) {
2535                behavior.refCharLiteral(cl, label, true, autoGen, lastInRule());
2536            }
2537            break;
2538        }
2539        case TOKEN_REF:
2540        {
2541            tr = LT(1);
2542            match(TOKEN_REF);
2543            autoGen=ast_type_spec();
2544            if ( inputState.guessing==0 ) {
2545                behavior.refToken(null, tr, label, null, true, autoGen, lastInRule());
2546            }
2547            break;
2548        }
2549        default:
2550        {
2551            throw new NoViableAltException(LT(1), getFilename());
2552        }
2553        }
2554    }
2555    
2556    public final void ebnf(
2557         Token label, boolean not
2558    ) throws RecognitionException, TokenStreamException {
2559        
2560        Token lp = null;
2561        Token aa = null;
2562        Token ab = null;
2563        
2564        lp = LT(1);
2565        match(LPAREN);
2566        if ( inputState.guessing==0 ) {
2567            behavior.beginSubRule(label, lp, not);
2568        }
2569        {
2570        if ((LA(1)==OPTIONS)) {
2571            subruleOptionsSpec();
2572            {
2573            switch ( LA(1)) {
2574            case ACTION:
2575            {
2576                aa = LT(1);
2577                match(ACTION);
2578                if ( inputState.guessing==0 ) {
2579                    behavior.refInitAction(aa);
2580                }
2581                break;
2582            }
2583            case COLON:
2584            {
2585                break;
2586            }
2587            default:
2588            {
2589                throw new NoViableAltException(LT(1), getFilename());
2590            }
2591            }
2592            }
2593            match(COLON);
2594        }
2595        else if ((LA(1)==ACTION) && (LA(2)==COLON)) {
2596            ab = LT(1);
2597            match(ACTION);
2598            if ( inputState.guessing==0 ) {
2599                behavior.refInitAction(ab);
2600            }
2601            match(COLON);
2602        }
2603        else if ((_tokenSet_9.member(LA(1))) && (_tokenSet_10.member(LA(2)))) {
2604        }
2605        else {
2606            throw new NoViableAltException(LT(1), getFilename());
2607        }
2608        
2609        }
2610        block();
2611        match(RPAREN);
2612        {
2613        switch ( LA(1)) {
2614        case STRING_LITERAL:
2615        case ACTION:
2616        case SEMI:
2617        case CHAR_LITERAL:
2618        case OR:
2619        case TOKEN_REF:
2620        case OPEN_ELEMENT_OPTION:
2621        case LPAREN:
2622        case RPAREN:
2623        case BANG:
2624        case LITERAL_exception:
2625        case RULE_REF:
2626        case NOT_OP:
2627        case SEMPRED:
2628        case TREE_BEGIN:
2629        case QUESTION:
2630        case STAR:
2631        case PLUS:
2632        case WILDCARD:
2633        {
2634            {
2635            switch ( LA(1)) {
2636            case QUESTION:
2637            {
2638                match(QUESTION);
2639                if ( inputState.guessing==0 ) {
2640                    behavior.optionalSubRule();
2641                }
2642                break;
2643            }
2644            case STAR:
2645            {
2646                match(STAR);
2647                if ( inputState.guessing==0 ) {
2648                    behavior.zeroOrMoreSubRule();
2649                }
2650                break;
2651            }
2652            case PLUS:
2653            {
2654                match(PLUS);
2655                if ( inputState.guessing==0 ) {
2656                    behavior.oneOrMoreSubRule();
2657                }
2658                break;
2659            }
2660            case STRING_LITERAL:
2661            case ACTION:
2662            case SEMI:
2663            case CHAR_LITERAL:
2664            case OR:
2665            case TOKEN_REF:
2666            case OPEN_ELEMENT_OPTION:
2667            case LPAREN:
2668            case RPAREN:
2669            case BANG:
2670            case LITERAL_exception:
2671            case RULE_REF:
2672            case NOT_OP:
2673            case SEMPRED:
2674            case TREE_BEGIN:
2675            case WILDCARD:
2676            {
2677                break;
2678            }
2679            default:
2680            {
2681                throw new NoViableAltException(LT(1), getFilename());
2682            }
2683            }
2684            }
2685            {
2686            switch ( LA(1)) {
2687            case BANG:
2688            {
2689                match(BANG);
2690                if ( inputState.guessing==0 ) {
2691                    behavior.noASTSubRule();
2692                }
2693                break;
2694            }
2695            case STRING_LITERAL:
2696            case ACTION:
2697            case SEMI:
2698            case CHAR_LITERAL:
2699            case OR:
2700            case TOKEN_REF:
2701            case OPEN_ELEMENT_OPTION:
2702            case LPAREN:
2703            case RPAREN:
2704            case LITERAL_exception:
2705            case RULE_REF:
2706            case NOT_OP:
2707            case SEMPRED:
2708            case TREE_BEGIN:
2709            case WILDCARD:
2710            {
2711                break;
2712            }
2713            default:
2714            {
2715                throw new NoViableAltException(LT(1), getFilename());
2716            }
2717            }
2718            }
2719            break;
2720        }
2721        case IMPLIES:
2722        {
2723            match(IMPLIES);
2724            if ( inputState.guessing==0 ) {
2725                behavior.synPred();
2726            }
2727            break;
2728        }
2729        default:
2730        {
2731            throw new NoViableAltException(LT(1), getFilename());
2732        }
2733        }
2734        }
2735        if ( inputState.guessing==0 ) {
2736            behavior.endSubRule();
2737        }
2738    }
2739    
2740    public final void tree() throws RecognitionException, TokenStreamException {
2741        
2742        Token lp = null;
2743        
2744        lp = LT(1);
2745        match(TREE_BEGIN);
2746        if ( inputState.guessing==0 ) {
2747            behavior.beginTree(lp);
2748        }
2749        rootNode();
2750        if ( inputState.guessing==0 ) {
2751            behavior.beginChildList();
2752        }
2753        {
2754        int _cnt122=0;
2755        _loop122:
2756        do {
2757            if ((_tokenSet_2.member(LA(1)))) {
2758                element();
2759            }
2760            else {
2761                if ( _cnt122>=1 ) { break _loop122; } else {throw new NoViableAltException(LT(1), getFilename());}
2762            }
2763            
2764            _cnt122++;
2765        } while (true);
2766        }
2767        if ( inputState.guessing==0 ) {
2768            behavior.endChildList();
2769        }
2770        match(RPAREN);
2771        if ( inputState.guessing==0 ) {
2772            behavior.endTree();
2773        }
2774    }
2775    
2776    public final void rootNode() throws RecognitionException, TokenStreamException {
2777        
2778        Token label = null;
2779        
2780        {
2781        if ((LA(1)==TOKEN_REF||LA(1)==RULE_REF) && (LA(2)==COLON)) {
2782            label=id();
2783            match(COLON);
2784            if ( inputState.guessing==0 ) {
2785                checkForMissingEndRule(label);
2786            }
2787        }
2788        else if ((_tokenSet_7.member(LA(1))) && (_tokenSet_11.member(LA(2)))) {
2789        }
2790        else {
2791            throw new NoViableAltException(LT(1), getFilename());
2792        }
2793        
2794        }
2795        terminal(label);
2796    }
2797    
2798    public final int ast_type_spec() throws RecognitionException, TokenStreamException {
2799         int autoGen ;
2800        
2801        autoGen = GrammarElement.AUTO_GEN_NONE;
2802        
2803        {
2804        switch ( LA(1)) {
2805        case CARET:
2806        {
2807            match(CARET);
2808            if ( inputState.guessing==0 ) {
2809                autoGen = GrammarElement.AUTO_GEN_CARET;
2810            }
2811            break;
2812        }
2813        case BANG:
2814        {
2815            match(BANG);
2816            if ( inputState.guessing==0 ) {
2817                autoGen = GrammarElement.AUTO_GEN_BANG;
2818            }
2819            break;
2820        }
2821        case STRING_LITERAL:
2822        case ACTION:
2823        case SEMI:
2824        case CHAR_LITERAL:
2825        case OR:
2826        case TOKEN_REF:
2827        case OPEN_ELEMENT_OPTION:
2828        case LPAREN:
2829        case RPAREN:
2830        case ARG_ACTION:
2831        case LITERAL_exception:
2832        case RULE_REF:
2833        case NOT_OP:
2834        case SEMPRED:
2835        case TREE_BEGIN:
2836        case WILDCARD:
2837        {
2838            break;
2839        }
2840        default:
2841        {
2842            throw new NoViableAltException(LT(1), getFilename());
2843        }
2844        }
2845        }
2846        return autoGen ;
2847    }
2848    
2849    
2850    public static final String JavaDoc[] _tokenNames = {
2851        "<0>",
2852        "EOF",
2853        "<2>",
2854        "NULL_TREE_LOOKAHEAD",
2855        "\"tokens\"",
2856        "\"header\"",
2857        "STRING_LITERAL",
2858        "ACTION",
2859        "DOC_COMMENT",
2860        "\"lexclass\"",
2861        "\"class\"",
2862        "\"extends\"",
2863        "\"Lexer\"",
2864        "\"TreeParser\"",
2865        "OPTIONS",
2866        "ASSIGN",
2867        "SEMI",
2868        "RCURLY",
2869        "\"charVocabulary\"",
2870        "CHAR_LITERAL",
2871        "INT",
2872        "OR",
2873        "RANGE",
2874        "TOKENS",
2875        "TOKEN_REF",
2876        "OPEN_ELEMENT_OPTION",
2877        "CLOSE_ELEMENT_OPTION",
2878        "LPAREN",
2879        "RPAREN",
2880        "\"Parser\"",
2881        "\"protected\"",
2882        "\"public\"",
2883        "\"private\"",
2884        "BANG",
2885        "ARG_ACTION",
2886        "\"returns\"",
2887        "COLON",
2888        "\"throws\"",
2889        "COMMA",
2890        "\"exception\"",
2891        "\"catch\"",
2892        "RULE_REF",
2893        "NOT_OP",
2894        "SEMPRED",
2895        "TREE_BEGIN",
2896        "QUESTION",
2897        "STAR",
2898        "PLUS",
2899        "IMPLIES",
2900        "CARET",
2901        "WILDCARD",
2902        "\"options\"",
2903        "WS",
2904        "COMMENT",
2905        "SL_COMMENT",
2906        "ML_COMMENT",
2907        "ESC",
2908        "DIGIT",
2909        "XDIGIT",
2910        "NESTED_ARG_ACTION",
2911        "NESTED_ACTION",
2912        "WS_LOOP",
2913        "INTERNAL_RULE_REF",
2914        "WS_OPT"
2915    };
2916    
2917    private static final long[] mk_tokenSet_0() {
2918        long[] data = { 2206556225792L, 0L};
2919        return data;
2920    }
2921    public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
2922    private static final long[] mk_tokenSet_1() {
2923        long[] data = { 2472844214400L, 0L};
2924        return data;
2925    }
2926    public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
2927    private static final long[] mk_tokenSet_2() {
2928        long[] data = { 1158885407195328L, 0L};
2929        return data;
2930    }
2931    public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
2932    private static final long[] mk_tokenSet_3() {
2933        long[] data = { 1159461236965568L, 0L};
2934        return data;
2935    }
2936    public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
2937    private static final long[] mk_tokenSet_4() {
2938        long[] data = { 1132497128128576L, 0L};
2939        return data;
2940    }
2941    public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
2942    private static final long[] mk_tokenSet_5() {
2943        long[] data = { 1722479914074304L, 0L};
2944        return data;
2945    }
2946    public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
2947    private static final long[] mk_tokenSet_6() {
2948        long[] data = { 1722411194597568L, 0L};
2949        return data;
2950    }
2951    public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
2952    private static final long[] mk_tokenSet_7() {
2953        long[] data = { 1125899924144192L, 0L};
2954        return data;
2955    }
2956    public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
2957    private static final long[] mk_tokenSet_8() {
2958        long[] data = { 1722411190386880L, 0L};
2959        return data;
2960    }
2961    public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
2962    private static final long[] mk_tokenSet_9() {
2963        long[] data = { 1159444023476416L, 0L};
2964        return data;
2965    }
2966    public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
2967    private static final long[] mk_tokenSet_10() {
2968        long[] data = { 2251345007067328L, 0L};
2969        return data;
2970    }
2971    public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());
2972    private static final long[] mk_tokenSet_11() {
2973        long[] data = { 1721861130420416L, 0L};
2974        return data;
2975    }
2976    public static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11());
2977    
2978    }
2979
Popular Tags