KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > codehaus > groovy > antlr > parser > GroovyRecognizer


1 // $ANTLR 2.7.2: "groovy.g" -> "GroovyRecognizer.java"$
2

3 package org.codehaus.groovy.antlr.parser;
4 import org.codehaus.groovy.antlr.*;
5 import java.util.*;
6 import java.io.InputStream JavaDoc;
7 import java.io.Reader JavaDoc;
8 import antlr.InputBuffer;
9 import antlr.LexerSharedInputState;
10
11 import antlr.TokenBuffer;
12 import antlr.TokenStreamException;
13 import antlr.TokenStreamIOException;
14 import antlr.ANTLRException;
15 import antlr.LLkParser;
16 import antlr.Token;
17 import antlr.TokenStream;
18 import antlr.RecognitionException;
19 import antlr.NoViableAltException;
20 import antlr.MismatchedTokenException;
21 import antlr.SemanticException;
22 import antlr.ParserSharedInputState;
23 import antlr.collections.impl.BitSet;
24 import antlr.collections.AST;
25 import java.util.Hashtable JavaDoc;
26 import antlr.ASTFactory;
27 import antlr.ASTPair;
28 import antlr.collections.impl.ASTArray;
29
30 /** JSR-241 Groovy Recognizer
31  *
32  * Run 'java Main [-showtree] directory-full-of-groovy-files'
33  *
34  * [The -showtree option pops up a Swing frame that shows
35  * the AST constructed from the parser.]
36  *
37  * Contributing authors:
38  * John Mitchell johnm@non.net
39  * Terence Parr parrt@magelang.com
40  * John Lilley jlilley@empathy.com
41  * Scott Stanchfield thetick@magelang.com
42  * Markus Mohnen mohnen@informatik.rwth-aachen.de
43  * Peter Williams pete.williams@sun.com
44  * Allan Jacobs Allan.Jacobs@eng.sun.com
45  * Steve Messick messick@redhills.com
46  * James Strachan jstrachan@protique.com
47  * John Pybus john@pybus.org
48  * John Rose rose00@mac.com
49  * Jeremy Rayner groovy@ross-rayner.com
50  *
51  * Version 1.00 December 9, 1997 -- initial release
52  * Version 1.01 December 10, 1997
53  * fixed bug in octal def (0..7 not 0..8)
54  * Version 1.10 August 1998 (parrt)
55  * added tree construction
56  * fixed definition of WS,comments for mac,pc,unix newlines
57  * added unary plus
58  * Version 1.11 (Nov 20, 1998)
59  * Added "shutup" option to turn off last ambig warning.
60  * Fixed inner class def to allow named class defs as statements
61  * synchronized requires compound not simple statement
62  * add [] after builtInType DOT class in primaryExpression
63  * "const" is reserved but not valid..removed from modifiers
64  * Version 1.12 (Feb 2, 1999)
65  * Changed LITERAL_xxx to xxx in tree grammar.
66  * Updated java.g to use tokens {...} now for 2.6.0 (new feature).
67  *
68  * Version 1.13 (Apr 23, 1999)
69  * Didn't have (stat)? for else clause in tree parser.
70  * Didn't gen ASTs for interface extends. Updated tree parser too.
71  * Updated to 2.6.0.
72  * Version 1.14 (Jun 20, 1999)
73  * Allowed final/abstract on local classes.
74  * Removed local interfaces from methods
75  * Put instanceof precedence where it belongs...in relationalExpr
76  * It also had expr not type as arg; fixed it.
77  * Missing ! on SEMI in classBlock
78  * fixed: (expr) + "string" was parsed incorrectly (+ as unary plus).
79  * fixed: didn't like Object[].class in parser or tree parser
80  * Version 1.15 (Jun 26, 1999)
81  * Screwed up rule with instanceof in it. :( Fixed.
82  * Tree parser didn't like (expr).something; fixed.
83  * Allowed multiple inheritance in tree grammar. oops.
84  * Version 1.16 (August 22, 1999)
85  * Extending an interface built a wacky tree: had extra EXTENDS.
86  * Tree grammar didn't allow multiple superinterfaces.
87  * Tree grammar didn't allow empty var initializer: {}
88  * Version 1.17 (October 12, 1999)
89  * ESC lexer rule allowed 399 max not 377 max.
90  * java.tree.g didn't handle the expression of synchronized
91  * statements.
92  * Version 1.18 (August 12, 2001)
93  * Terence updated to Java 2 Version 1.3 by
94  * observing/combining work of Allan Jacobs and Steve
95  * Messick. Handles 1.3 src. Summary:
96  * o primary didn't include boolean.class kind of thing
97  * o constructor calls parsed explicitly now:
98  * see explicitConstructorInvocation
99  * o add strictfp modifier
100  * o missing objBlock after new expression in tree grammar
101  * o merged local class definition alternatives, moved after declaration
102  * o fixed problem with ClassName.super.field
103  * o reordered some alternatives to make things more efficient
104  * o long and double constants were not differentiated from int/float
105  * o whitespace rule was inefficient: matched only one char
106  * o add an examples directory with some nasty 1.3 cases
107  * o made Main.java use buffered IO and a Reader for Unicode support
108  * o supports UNICODE?
109  * Using Unicode charVocabulay makes code file big, but only
110  * in the bitsets at the end. I need to make ANTLR generate
111  * unicode bitsets more efficiently.
112  * Version 1.19 (April 25, 2002)
113  * Terence added in nice fixes by John Pybus concerning floating
114  * constants and problems with super() calls. John did a nice
115  * reorg of the primary/postfix expression stuff to read better
116  * and makes f.g.super() parse properly (it was METHOD_CALL not
117  * a SUPER_CTOR_CALL). Also:
118  *
119  * o "finally" clause was a root...made it a child of "try"
120  * o Added stuff for asserts too for Java 1.4, but *commented out*
121  * as it is not backward compatible.
122  *
123  * Version 1.20 (October 27, 2002)
124  *
125  * Terence ended up reorging John Pybus' stuff to
126  * remove some nondeterminisms and some syntactic predicates.
127  * Note that the grammar is stricter now; e.g., this(...) must
128  * be the first statement.
129  *
130  * Trinary ?: operator wasn't working as array name:
131  * (isBig ? bigDigits : digits)[i];
132  *
133  * Checked parser/tree parser on source for
134  * Resin-2.0.5, jive-2.1.1, jdk 1.3.1, Lucene, antlr 2.7.2a4,
135  * and the 110k-line jGuru server source.
136  *
137  * Version 1.21 (October 17, 2003)
138  * Fixed lots of problems including:
139  * Ray Waldin: add typeDefinition to interfaceBlock in java.tree.g
140  * He found a problem/fix with floating point that start with 0
141  * Ray also fixed problem that (int.class) was not recognized.
142  * Thorsten van Ellen noticed that \n are allowed incorrectly in strings.
143  * TJP fixed CHAR_LITERAL analogously.
144  *
145  * Version 1.21.2 (March, 2003)
146  * Changes by Matt Quail to support generics (as per JDK1.5/JSR14)
147  * Notes:
148  * o We only allow the "extends" keyword and not the "implements"
149  * keyword, since thats what JSR14 seems to imply.
150  * o Thanks to Monty Zukowski for his help on the antlr-interest
151  * mail list.
152  * o Thanks to Alan Eliasen for testing the grammar over his
153  * Fink source base
154  *
155  * Version 1.22 (July, 2004)
156  * Changes by Michael Studman to support Java 1.5 language extensions
157  * Notes:
158  * o Added support for annotations types
159  * o Finished off Matt Quail's generics enhancements to support bound type arguments
160  * o Added support for new for statement syntax
161  * o Added support for static import syntax
162  * o Added support for enum types
163  * o Tested against JDK 1.5 source base and source base of jdigraph project
164  * o Thanks to Matt Quail for doing the hard part by doing most of the generics work
165  *
166  * Version 1.22.1 (July 28, 2004)
167  * Bug/omission fixes for Java 1.5 language support
168  * o Fixed tree structure bug with classOrInterface - thanks to Pieter Vangorpto for
169  * spotting this
170  * o Fixed bug where incorrect handling of SR and BSR tokens would cause type
171  * parameters to be recognised as type arguments.
172  * o Enabled type parameters on constructors, annotations on enum constants
173  * and package definitions
174  * o Fixed problems when parsing if ((char.class.equals(c))) {} - solution by Matt Quail at Cenqua
175  *
176  * Version 1.22.2 (July 28, 2004)
177  * Slight refactoring of Java 1.5 language support
178  * o Refactored for/"foreach" productions so that original literal "for" literal
179  * is still used but the for sub-clauses vary by token type
180  * o Fixed bug where type parameter was not included in generic constructor's branch of AST
181  *
182  * Version 1.22.3 (August 26, 2004)
183  * Bug fixes as identified by Michael Stahl; clean up of tabs/spaces
184  * and other refactorings
185  * o Fixed typeParameters omission in identPrimary and newStatement
186  * o Replaced GT reconcilliation code with simple semantic predicate
187  * o Adapted enum/assert keyword checking support from Michael Stahl's java15 grammar
188  * o Refactored typeDefinition production and field productions to reduce duplication
189  *
190  * Version 1.22.4 (October 21, 2004)
191  * Small bux fixes
192  * o Added typeArguments to explicitConstructorInvocation, e.g. new <String>MyParameterised()
193  * o Added typeArguments to postfixExpression productions for anonymous inner class super
194  * constructor invocation, e.g. new Outer().<String>super()
195  * o Fixed bug in array declarations identified by Geoff Roy
196  *
197  * Version 1.22.4.g.1
198  * o I have taken java.g for Java1.5 from Michael Studman (1.22.4)
199  * and have applied the groovy.diff from java.g (1.22) by John Rose
200  * back onto the new root (1.22.4) - Jeremy Rayner (Jan 2005)
201  * o for a map of the task see...
202  * http://groovy.javanicus.com/java-g.png
203  *
204  * This grammar is in the PUBLIC DOMAIN
205  */

206 public class GroovyRecognizer extends antlr.LLkParser implements GroovyTokenTypes
207  {
208
209         /** This factory is the correct way to wire together a Groovy parser and lexer. */
210     public static GroovyRecognizer make(GroovyLexer lexer) {
211         GroovyRecognizer parser = new GroovyRecognizer(lexer.plumb());
212         // TODO: set up a common error-handling control block, to avoid excessive tangle between these guys
213
parser.lexer = lexer;
214         lexer.parser = parser;
215         parser.setASTNodeClass("org.codehaus.groovy.antlr.GroovySourceAST");
216         parser.warningList = new ArrayList();
217         return parser;
218     }
219     // Create a scanner that reads from the input stream passed to us...
220
public static GroovyRecognizer make(InputStream JavaDoc in) { return make(new GroovyLexer(in)); }
221     public static GroovyRecognizer make(Reader JavaDoc in) { return make(new GroovyLexer(in)); }
222     public static GroovyRecognizer make(InputBuffer in) { return make(new GroovyLexer(in)); }
223     public static GroovyRecognizer make(LexerSharedInputState in) { return make(new GroovyLexer(in)); }
224     
225     private static GroovySourceAST dummyVariableToforceClassLoaderToFindASTClass = new GroovySourceAST();
226
227     List warningList;
228     public List getWarningList() { return warningList; }
229     
230     boolean compatibilityMode = true; // for now
231
public boolean isCompatibilityMode() { return compatibilityMode; }
232     public void setCompatibilityMode(boolean z) { compatibilityMode = z; }
233
234     GroovyLexer lexer;
235     public GroovyLexer getLexer() { return lexer; }
236     public void setFilename(String JavaDoc f) { super.setFilename(f); lexer.setFilename(f); }
237     private SourceBuffer sourceBuffer;
238     public void setSourceBuffer(SourceBuffer sourceBuffer) {
239         this.sourceBuffer = sourceBuffer;
240     }
241
242     /** Create an AST node with the token type and text passed in, but
243      * with the same background information as another supplied Token (e.g. line numbers)
244      * to be used in place of antlr tree construction syntax,
245      * i.e. #[TOKEN,"text"] becomes create(TOKEN,"text",anotherToken)
246      *
247      * todo - change antlr.ASTFactory to do this instead...
248      */

249     public AST create(int type, String JavaDoc txt, Token first, Token last) {
250         AST t = astFactory.create(type,txt);
251         if ( t != null && first != null) {
252             // first copy details from first token
253
t.initialize(first);
254             // then ensure that type and txt are specific to this new node
255
t.initialize(type,txt);
256         }
257
258         if ((t instanceof GroovySourceAST) && last != null) {
259             GroovySourceAST node = (GroovySourceAST)t;
260             node.setLast(last);
261
262             // todo - we can populate AST snippets on the fly, but this may be better done as a post-parse decoration
263
if (sourceBuffer != null) {
264                 String JavaDoc snippet = sourceBuffer.getSnippet(
265                                         new LineColumn(first.getLine(),first.getColumn()),
266                                         new LineColumn(last.getLine(),last.getColumn())
267                 );
268                 node.setSnippet(snippet);
269             }
270         }
271         return t;
272     }
273
274
275     // stuff to adjust ANTLR's tracing machinery
276
public static boolean tracing = false; // only effective if antlr.Tool is run with -traceParser
277
public void traceIn(String JavaDoc rname) throws TokenStreamException {
278         if (!GroovyRecognizer.tracing) return;
279         super.traceIn(rname);
280     }
281     public void traceOut(String JavaDoc rname) throws TokenStreamException {
282         if (!GroovyRecognizer.tracing) return;
283         if (returnAST != null) rname += returnAST.toStringList();
284         super.traceOut(rname);
285     }
286         
287     // Error handling. This is a funnel through which parser errors go, when the parser can suggest a solution.
288
public void requireFailed(String JavaDoc problem, String JavaDoc solution) throws SemanticException {
289         // TODO: Needs more work.
290
Token lt = null;
291         try { lt = LT(1); }
292         catch (TokenStreamException ee) { }
293         if (lt == null) lt = Token.badToken;
294         throw new SemanticException(problem + ";\n solution: " + solution,
295                                     getFilename(), lt.getLine(), lt.getColumn());
296     }
297
298     public void addWarning(String JavaDoc warning, String JavaDoc solution) {
299         Token lt = null;
300         try { lt = LT(1); }
301         catch (TokenStreamException ee) { }
302         if (lt == null) lt = Token.badToken;
303
304         Map row = new HashMap();
305         row.put("warning" ,warning);
306         row.put("solution",solution);
307         row.put("filename",getFilename());
308         row.put("line" ,new Integer JavaDoc(lt.getLine()));
309         row.put("column" ,new Integer JavaDoc(lt.getColumn()));
310         // System.out.println(row);
311
warningList.add(row);
312     }
313
314     // Convenience method for checking of expected error syndromes.
315
private void require(boolean z, String JavaDoc problem, String JavaDoc solution) throws SemanticException {
316         if (!z) requireFailed(problem, solution);
317     }
318
319
320     // Query a name token to see if it begins with a capital letter.
321
// This is used to tell the difference (w/o symbol table access) between {String x} and {println x}.
322
private boolean isUpperCase(Token x) {
323         if (x == null || x.getType() != IDENT) return false; // cannot happen?
324
String JavaDoc xtext = x.getText();
325         return (xtext.length() > 0 && Character.isUpperCase(xtext.charAt(0)));
326     }
327
328     private AST currentClass = null; // current enclosing class (for constructor recognition)
329
// Query a name token to see if it is identical with the current class name.
330
// This is used to distinguish constructors from other methods.
331
private boolean isConstructorIdent(Token x) {
332         if (currentClass == null) return false;
333         if (currentClass.getType() != IDENT) return false; // cannot happen?
334
String JavaDoc cname = currentClass.getText();
335
336         if (x == null || x.getType() != IDENT) return false; // cannot happen?
337
return cname.equals(x.getText());
338     }
339
340     // Scratch variable for last 'sep' token.
341
// Written by the 'sep' rule, read only by immediate callers of 'sep'.
342
// (Not entirely clean, but better than a million xx=sep occurrences.)
343
private int sepToken = EOF;
344
345     // Scratch variable for last argument list; tells whether there was a label.
346
// Written by 'argList' rule, read only by immediate callers of 'argList'.
347
private boolean argListHasLabels = false;
348
349     // Scratch variable, holds most recently completed pathExpression.
350
// Read only by immediate callers of 'pathExpression' and 'expression'.
351
private AST lastPathExpression = null;
352
353     // Inherited attribute pushed into most expression rules.
354
// If not zero, it means that the left context of the expression
355
// being parsed is a statement boundary or an initializer sign '='.
356
// Only such expressions are allowed to reach across newlines
357
// to pull in an LCURLY and appended block.
358
private final int LC_STMT = 1, LC_INIT = 2;
359
360     /**
361      * Counts the number of LT seen in the typeArguments production.
362      * It is used in semantic predicates to ensure we have seen
363      * enough closing '>' characters; which actually may have been
364      * either GT, SR or BSR tokens.
365      */

366     private int ltCounter = 0;
367     
368     /* This symbol is used to work around a known ANTLR limitation.
369      * In a loop with syntactic predicate, ANTLR needs help knowing
370      * that the loop exit is a second alternative.
371      * Example usage: ( (LCURLY)=> block | {ANTLR_LOOP_EXIT}? )*
372      * Probably should be an ANTLR RFE.
373      */

374     ////// Original comment in Java grammar:
375
// Unfortunately a syntactic predicate can only select one of
376
// multiple alternatives on the same level, not break out of
377
// an enclosing loop, which is why this ugly hack (a fake
378
// empty alternative with always-false semantic predicate)
379
// is necessary.
380
private static final boolean ANTLR_LOOP_EXIT = false;
381
382 protected GroovyRecognizer(TokenBuffer tokenBuf, int k) {
383   super(tokenBuf,k);
384   tokenNames = _tokenNames;
385   buildTokenTypeASTClassMap();
386   astFactory = new ASTFactory(getTokenTypeToASTClassMap());
387 }
388
389 public GroovyRecognizer(TokenBuffer tokenBuf) {
390   this(tokenBuf,3);
391 }
392
393 protected GroovyRecognizer(TokenStream lexer, int k) {
394   super(lexer,k);
395   tokenNames = _tokenNames;
396   buildTokenTypeASTClassMap();
397   astFactory = new ASTFactory(getTokenTypeToASTClassMap());
398 }
399
400 public GroovyRecognizer(TokenStream lexer) {
401   this(lexer,3);
402 }
403
404 public GroovyRecognizer(ParserSharedInputState state) {
405   super(state,3);
406   tokenNames = _tokenNames;
407   buildTokenTypeASTClassMap();
408   astFactory = new ASTFactory(getTokenTypeToASTClassMap());
409 }
410
411     public final void compilationUnit() throws RecognitionException, TokenStreamException {
412         
413         returnAST = null;
414         ASTPair currentAST = new ASTPair();
415         AST compilationUnit_AST = null;
416         
417         {
418         switch ( LA(1)) {
419         case SH_COMMENT:
420         {
421             match(SH_COMMENT);
422             break;
423         }
424         case EOF:
425         case FINAL:
426         case ABSTRACT:
427         case STRICTFP:
428         case LITERAL_package:
429         case LITERAL_import:
430         case LITERAL_static:
431         case LITERAL_def:
432         case AT:
433         case IDENT:
434         case LBRACK:
435         case LPAREN:
436         case LITERAL_class:
437         case LITERAL_interface:
438         case LITERAL_enum:
439         case LITERAL_super:
440         case LITERAL_void:
441         case LITERAL_boolean:
442         case LITERAL_byte:
443         case LITERAL_char:
444         case LITERAL_short:
445         case LITERAL_int:
446         case LITERAL_float:
447         case LITERAL_long:
448         case LITERAL_double:
449         case LITERAL_any:
450         case STAR:
451         case LITERAL_private:
452         case LITERAL_public:
453         case LITERAL_protected:
454         case LITERAL_transient:
455         case LITERAL_native:
456         case LITERAL_threadsafe:
457         case LITERAL_synchronized:
458         case LITERAL_volatile:
459         case LCURLY:
460         case SEMI:
461         case NLS:
462         case LITERAL_this:
463         case STRING_LITERAL:
464         case LITERAL_if:
465         case LITERAL_while:
466         case LITERAL_with:
467         case LITERAL_switch:
468         case LITERAL_for:
469         case LITERAL_return:
470         case LITERAL_break:
471         case LITERAL_continue:
472         case LITERAL_throw:
473         case LITERAL_assert:
474         case PLUS:
475         case MINUS:
476         case LITERAL_try:
477         case INC:
478         case DEC:
479         case BNOT:
480         case LNOT:
481         case DOLLAR:
482         case STRING_CTOR_START:
483         case LITERAL_new:
484         case LITERAL_true:
485         case LITERAL_false:
486         case LITERAL_null:
487         case NUM_INT:
488         case NUM_FLOAT:
489         case NUM_LONG:
490         case NUM_DOUBLE:
491         case NUM_BIG_INT:
492         case NUM_BIG_DECIMAL:
493         {
494             break;
495         }
496         default:
497         {
498             throw new NoViableAltException(LT(1), getFilename());
499         }
500         }
501         }
502         nls();
503         {
504         boolean synPredMatched5 = false;
505         if (((LA(1)==LITERAL_package||LA(1)==AT) && (LA(2)==IDENT) && (_tokenSet_0.member(LA(3))))) {
506             int _m5 = mark();
507             synPredMatched5 = true;
508             inputState.guessing++;
509             try {
510                 {
511                 annotationsOpt();
512                 match(LITERAL_package);
513                 }
514             }
515             catch (RecognitionException pe) {
516                 synPredMatched5 = false;
517             }
518             rewind(_m5);
519             inputState.guessing--;
520         }
521         if ( synPredMatched5 ) {
522             packageDefinition();
523             astFactory.addASTChild(currentAST, returnAST);
524         }
525         else if ((_tokenSet_1.member(LA(1))) && (_tokenSet_2.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
526             {
527             switch ( LA(1)) {
528             case FINAL:
529             case ABSTRACT:
530             case STRICTFP:
531             case LITERAL_import:
532             case LITERAL_static:
533             case LITERAL_def:
534             case AT:
535             case IDENT:
536             case LBRACK:
537             case LPAREN:
538             case LITERAL_class:
539             case LITERAL_interface:
540             case LITERAL_enum:
541             case LITERAL_super:
542             case LITERAL_void:
543             case LITERAL_boolean:
544             case LITERAL_byte:
545             case LITERAL_char:
546             case LITERAL_short:
547             case LITERAL_int:
548             case LITERAL_float:
549             case LITERAL_long:
550             case LITERAL_double:
551             case LITERAL_any:
552             case STAR:
553             case LITERAL_private:
554             case LITERAL_public:
555             case LITERAL_protected:
556             case LITERAL_transient:
557             case LITERAL_native:
558             case LITERAL_threadsafe:
559             case LITERAL_synchronized:
560             case LITERAL_volatile:
561             case LCURLY:
562             case LITERAL_this:
563             case STRING_LITERAL:
564             case LITERAL_if:
565             case LITERAL_while:
566             case LITERAL_with:
567             case LITERAL_switch:
568             case LITERAL_for:
569             case LITERAL_return:
570             case LITERAL_break:
571             case LITERAL_continue:
572             case LITERAL_throw:
573             case LITERAL_assert:
574             case PLUS:
575             case MINUS:
576             case LITERAL_try:
577             case INC:
578             case DEC:
579             case BNOT:
580             case LNOT:
581             case DOLLAR:
582             case STRING_CTOR_START:
583             case LITERAL_new:
584             case LITERAL_true:
585             case LITERAL_false:
586             case LITERAL_null:
587             case NUM_INT:
588             case NUM_FLOAT:
589             case NUM_LONG:
590             case NUM_DOUBLE:
591             case NUM_BIG_INT:
592             case NUM_BIG_DECIMAL:
593             {
594                 statement(EOF);
595                 astFactory.addASTChild(currentAST, returnAST);
596                 break;
597             }
598             case EOF:
599             case SEMI:
600             case NLS:
601             {
602                 break;
603             }
604             default:
605             {
606                 throw new NoViableAltException(LT(1), getFilename());
607             }
608             }
609             }
610         }
611         else {
612             throw new NoViableAltException(LT(1), getFilename());
613         }
614         
615         }
616         {
617         _loop9:
618         do {
619             if ((LA(1)==SEMI||LA(1)==NLS)) {
620                 sep();
621                 {
622                 switch ( LA(1)) {
623                 case FINAL:
624                 case ABSTRACT:
625                 case STRICTFP:
626                 case LITERAL_import:
627                 case LITERAL_static:
628                 case LITERAL_def:
629                 case AT:
630                 case IDENT:
631                 case LBRACK:
632                 case LPAREN:
633                 case LITERAL_class:
634                 case LITERAL_interface:
635                 case LITERAL_enum:
636                 case LITERAL_super:
637                 case LITERAL_void:
638                 case LITERAL_boolean:
639                 case LITERAL_byte:
640                 case LITERAL_char:
641                 case LITERAL_short:
642                 case LITERAL_int:
643                 case LITERAL_float:
644                 case LITERAL_long:
645                 case LITERAL_double:
646                 case LITERAL_any:
647                 case STAR:
648                 case LITERAL_private:
649                 case LITERAL_public:
650                 case LITERAL_protected:
651                 case LITERAL_transient:
652                 case LITERAL_native:
653                 case LITERAL_threadsafe:
654                 case LITERAL_synchronized:
655                 case LITERAL_volatile:
656                 case LCURLY:
657                 case LITERAL_this:
658                 case STRING_LITERAL:
659                 case LITERAL_if:
660                 case LITERAL_while:
661                 case LITERAL_with:
662                 case LITERAL_switch:
663                 case LITERAL_for:
664                 case LITERAL_return:
665                 case LITERAL_break:
666                 case LITERAL_continue:
667                 case LITERAL_throw:
668                 case LITERAL_assert:
669                 case PLUS:
670                 case MINUS:
671                 case LITERAL_try:
672                 case INC:
673                 case DEC:
674                 case BNOT:
675                 case LNOT:
676                 case DOLLAR:
677                 case STRING_CTOR_START:
678                 case LITERAL_new:
679                 case LITERAL_true:
680                 case LITERAL_false:
681                 case LITERAL_null:
682                 case NUM_INT:
683                 case NUM_FLOAT:
684                 case NUM_LONG:
685                 case NUM_DOUBLE:
686                 case NUM_BIG_INT:
687                 case NUM_BIG_DECIMAL:
688                 {
689                     statement(sepToken);
690                     astFactory.addASTChild(currentAST, returnAST);
691                     break;
692                 }
693                 case EOF:
694                 case SEMI:
695                 case NLS:
696                 {
697                     break;
698                 }
699                 default:
700                 {
701                     throw new NoViableAltException(LT(1), getFilename());
702                 }
703                 }
704                 }
705             }
706             else {
707                 break _loop9;
708             }
709             
710         } while (true);
711         }
712         match(Token.EOF_TYPE);
713         compilationUnit_AST = (AST)currentAST.root;
714         returnAST = compilationUnit_AST;
715     }
716     
717 /** Zero or more insignificant newlines, all gobbled up and thrown away. */
718     public final void nls() throws RecognitionException, TokenStreamException {
719         
720         returnAST = null;
721         ASTPair currentAST = new ASTPair();
722         AST nls_AST = null;
723         
724         {
725         if ((LA(1)==NLS) && (_tokenSet_4.member(LA(2))) && (_tokenSet_5.member(LA(3)))) {
726             match(NLS);
727         }
728         else if ((_tokenSet_4.member(LA(1))) && (_tokenSet_5.member(LA(2))) && (_tokenSet_5.member(LA(3)))) {
729         }
730         else {
731             throw new NoViableAltException(LT(1), getFilename());
732         }
733         
734         }
735         returnAST = nls_AST;
736     }
737     
738     public final void annotationsOpt() throws RecognitionException, TokenStreamException {
739         
740         returnAST = null;
741         ASTPair currentAST = new ASTPair();
742         AST annotationsOpt_AST = null;
743         Token first = LT(1);
744         
745         {
746         _loop79:
747         do {
748             if ((LA(1)==AT)) {
749                 annotation();
750                 astFactory.addASTChild(currentAST, returnAST);
751                 nls();
752             }
753             else {
754                 break _loop79;
755             }
756             
757         } while (true);
758         }
759         if ( inputState.guessing==0 ) {
760             annotationsOpt_AST = (AST)currentAST.root;
761             annotationsOpt_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(ANNOTATIONS,"ANNOTATIONS",first,LT(1))).add(annotationsOpt_AST));
762             currentAST.root = annotationsOpt_AST;
763             currentAST.child = annotationsOpt_AST!=null &&annotationsOpt_AST.getFirstChild()!=null ?
764                 annotationsOpt_AST.getFirstChild() : annotationsOpt_AST;
765             currentAST.advanceChildToEnd();
766         }
767         annotationsOpt_AST = (AST)currentAST.root;
768         returnAST = annotationsOpt_AST;
769     }
770     
771     public final void packageDefinition() throws RecognitionException, TokenStreamException {
772         
773         returnAST = null;
774         ASTPair currentAST = new ASTPair();
775         AST packageDefinition_AST = null;
776         Token p = null;
777         AST p_AST = null;
778         
779         annotationsOpt();
780         astFactory.addASTChild(currentAST, returnAST);
781         p = LT(1);
782         p_AST = astFactory.create(p);
783         astFactory.makeASTRoot(currentAST, p_AST);
784         match(LITERAL_package);
785         if ( inputState.guessing==0 ) {
786             p_AST.setType(PACKAGE_DEF);
787         }
788         identifier();
789         astFactory.addASTChild(currentAST, returnAST);
790         packageDefinition_AST = (AST)currentAST.root;
791         returnAST = packageDefinition_AST;
792     }
793     
794 /** A statement is an element of a block.
795  * Typical statements are declarations (which are scoped to the block)
796  * and expressions.
797  */

798     public final void statement(
799         int prevToken
800     ) throws RecognitionException, TokenStreamException {
801         
802         returnAST = null;
803         ASTPair currentAST = new ASTPair();
804         AST statement_AST = null;
805         AST pfx_AST = null;
806         AST m_AST = null;
807         Token sp = null;
808         AST sp_AST = null;
809         
810         switch ( LA(1)) {
811         case LITERAL_if:
812         {
813             AST tmp4_AST = null;
814             tmp4_AST = astFactory.create(LT(1));
815             astFactory.makeASTRoot(currentAST, tmp4_AST);
816             match(LITERAL_if);
817             match(LPAREN);
818             strictContextExpression();
819             astFactory.addASTChild(currentAST, returnAST);
820             match(RPAREN);
821             nlsWarn();
822             compatibleBodyStatement();
823             astFactory.addASTChild(currentAST, returnAST);
824             {
825             boolean synPredMatched263 = false;
826             if (((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2))) && (_tokenSet_8.member(LA(3))))) {
827                 int _m263 = mark();
828                 synPredMatched263 = true;
829                 inputState.guessing++;
830                 try {
831                     {
832                     {
833                     switch ( LA(1)) {
834                     case SEMI:
835                     case NLS:
836                     {
837                         sep();
838                         break;
839                     }
840                     case LITERAL_else:
841                     {
842                         break;
843                     }
844                     default:
845                     {
846                         throw new NoViableAltException(LT(1), getFilename());
847                     }
848                     }
849                     }
850                     match(LITERAL_else);
851                     }
852                 }
853                 catch (RecognitionException pe) {
854                     synPredMatched263 = false;
855                 }
856                 rewind(_m263);
857                 inputState.guessing--;
858             }
859             if ( synPredMatched263 ) {
860                 {
861                 switch ( LA(1)) {
862                 case SEMI:
863                 case NLS:
864                 {
865                     sep();
866                     break;
867                 }
868                 case LITERAL_else:
869                 {
870                     break;
871                 }
872                 default:
873                 {
874                     throw new NoViableAltException(LT(1), getFilename());
875                 }
876                 }
877                 }
878                 match(LITERAL_else);
879                 nlsWarn();
880                 compatibleBodyStatement();
881                 astFactory.addASTChild(currentAST, returnAST);
882             }
883             else if ((_tokenSet_9.member(LA(1))) && (_tokenSet_10.member(LA(2))) && (_tokenSet_11.member(LA(3)))) {
884             }
885             else {
886                 throw new NoViableAltException(LT(1), getFilename());
887             }
888             
889             }
890             statement_AST = (AST)currentAST.root;
891             break;
892         }
893         case LITERAL_for:
894         {
895             forStatement();
896             astFactory.addASTChild(currentAST, returnAST);
897             statement_AST = (AST)currentAST.root;
898             break;
899         }
900         case LITERAL_while:
901         {
902             AST tmp8_AST = null;
903             tmp8_AST = astFactory.create(LT(1));
904             astFactory.makeASTRoot(currentAST, tmp8_AST);
905             match(LITERAL_while);
906             match(LPAREN);
907             strictContextExpression();
908             astFactory.addASTChild(currentAST, returnAST);
909             match(RPAREN);
910             nlsWarn();
911             compatibleBodyStatement();
912             astFactory.addASTChild(currentAST, returnAST);
913             statement_AST = (AST)currentAST.root;
914             break;
915         }
916         case LITERAL_with:
917         {
918             AST tmp11_AST = null;
919             tmp11_AST = astFactory.create(LT(1));
920             astFactory.makeASTRoot(currentAST, tmp11_AST);
921             match(LITERAL_with);
922             match(LPAREN);
923             strictContextExpression();
924             astFactory.addASTChild(currentAST, returnAST);
925             match(RPAREN);
926             nlsWarn();
927             compoundStatement();
928             astFactory.addASTChild(currentAST, returnAST);
929             statement_AST = (AST)currentAST.root;
930             break;
931         }
932         case STAR:
933         {
934             sp = LT(1);
935             sp_AST = astFactory.create(sp);
936             astFactory.makeASTRoot(currentAST, sp_AST);
937             match(STAR);
938             nls();
939             if ( inputState.guessing==0 ) {
940                 sp_AST.setType(SPREAD_ARG);
941             }
942             expressionStatement(EOF);
943             astFactory.addASTChild(currentAST, returnAST);
944             statement_AST = (AST)currentAST.root;
945             break;
946         }
947         case LITERAL_import:
948         {
949             importStatement();
950             astFactory.addASTChild(currentAST, returnAST);
951             statement_AST = (AST)currentAST.root;
952             break;
953         }
954         case LITERAL_switch:
955         {
956             AST tmp14_AST = null;
957             tmp14_AST = astFactory.create(LT(1));
958             astFactory.makeASTRoot(currentAST, tmp14_AST);
959             match(LITERAL_switch);
960             match(LPAREN);
961             strictContextExpression();
962             astFactory.addASTChild(currentAST, returnAST);
963             match(RPAREN);
964             nlsWarn();
965             match(LCURLY);
966             nls();
967             {
968             _loop266:
969             do {
970                 if ((LA(1)==LITERAL_default||LA(1)==LITERAL_case)) {
971                     casesGroup();
972                     astFactory.addASTChild(currentAST, returnAST);
973                 }
974                 else {
975                     break _loop266;
976                 }
977                 
978             } while (true);
979             }
980             match(RCURLY);
981             statement_AST = (AST)currentAST.root;
982             break;
983         }
984         case LITERAL_try:
985         {
986             tryBlock();
987             astFactory.addASTChild(currentAST, returnAST);
988             statement_AST = (AST)currentAST.root;
989             break;
990         }
991         case LITERAL_return:
992         case LITERAL_break:
993         case LITERAL_continue:
994         case LITERAL_throw:
995         case LITERAL_assert:
996         {
997             branchStatement();
998             astFactory.addASTChild(currentAST, returnAST);
999             statement_AST = (AST)currentAST.root;
1000            break;
1001        }
1002        default:
1003            boolean synPredMatched254 = false;
1004            if (((_tokenSet_12.member(LA(1))) && (_tokenSet_13.member(LA(2))) && (_tokenSet_14.member(LA(3))))) {
1005                int _m254 = mark();
1006                synPredMatched254 = true;
1007                inputState.guessing++;
1008                try {
1009                    {
1010                    declarationStart();
1011                    }
1012                }
1013                catch (RecognitionException pe) {
1014                    synPredMatched254 = false;
1015                }
1016                rewind(_m254);
1017                inputState.guessing--;
1018            }
1019            if ( synPredMatched254 ) {
1020                declaration();
1021                astFactory.addASTChild(currentAST, returnAST);
1022                statement_AST = (AST)currentAST.root;
1023            }
1024            else {
1025                boolean synPredMatched256 = false;
1026                if (((LA(1)==IDENT) && (LA(2)==COLON) && (_tokenSet_15.member(LA(3))))) {
1027                    int _m256 = mark();
1028                    synPredMatched256 = true;
1029                    inputState.guessing++;
1030                    try {
1031                        {
1032                        match(IDENT);
1033                        match(COLON);
1034                        }
1035                    }
1036                    catch (RecognitionException pe) {
1037                        synPredMatched256 = false;
1038                    }
1039                    rewind(_m256);
1040                    inputState.guessing--;
1041                }
1042                if ( synPredMatched256 ) {
1043                    statementLabelPrefix();
1044                    pfx_AST = (AST)returnAST;
1045                    if ( inputState.guessing==0 ) {
1046                        statement_AST = (AST)currentAST.root;
1047                        statement_AST = pfx_AST;
1048                        currentAST.root = statement_AST;
1049                        currentAST.child = statement_AST!=null &&statement_AST.getFirstChild()!=null ?
1050                            statement_AST.getFirstChild() : statement_AST;
1051                        currentAST.advanceChildToEnd();
1052                    }
1053                    {
1054                    boolean synPredMatched259 = false;
1055                    if (((LA(1)==LCURLY) && (_tokenSet_16.member(LA(2))) && (_tokenSet_17.member(LA(3))))) {
1056                        int _m259 = mark();
1057                        synPredMatched259 = true;
1058                        inputState.guessing++;
1059                        try {
1060                            {
1061                            match(LCURLY);
1062                            }
1063                        }
1064                        catch (RecognitionException pe) {
1065                            synPredMatched259 = false;
1066                        }
1067                        rewind(_m259);
1068                        inputState.guessing--;
1069                    }
1070                    if ( synPredMatched259 ) {
1071                        openOrClosedBlock();
1072                        astFactory.addASTChild(currentAST, returnAST);
1073                    }
1074                    else if ((_tokenSet_15.member(LA(1))) && (_tokenSet_8.member(LA(2))) && (_tokenSet_18.member(LA(3)))) {
1075                        statement(COLON);
1076                        astFactory.addASTChild(currentAST, returnAST);
1077                    }
1078                    else {
1079                        throw new NoViableAltException(LT(1), getFilename());
1080                    }
1081                    
1082                    }
1083                    statement_AST = (AST)currentAST.root;
1084                }
1085                else if ((_tokenSet_19.member(LA(1))) && (_tokenSet_8.member(LA(2))) && (_tokenSet_20.member(LA(3)))) {
1086                    expressionStatement(prevToken);
1087                    astFactory.addASTChild(currentAST, returnAST);
1088                    statement_AST = (AST)currentAST.root;
1089                }
1090                else if ((_tokenSet_21.member(LA(1))) && (_tokenSet_22.member(LA(2))) && (_tokenSet_23.member(LA(3)))) {
1091                    modifiersOpt();
1092                    m_AST = (AST)returnAST;
1093                    typeDefinitionInternal(m_AST);
1094                    astFactory.addASTChild(currentAST, returnAST);
1095                    statement_AST = (AST)currentAST.root;
1096                }
1097                else if ((LA(1)==LITERAL_synchronized) && (LA(2)==LPAREN)) {
1098                    AST tmp19_AST = null;
1099                    tmp19_AST = astFactory.create(LT(1));
1100                    astFactory.makeASTRoot(currentAST, tmp19_AST);
1101                    match(LITERAL_synchronized);
1102                    match(LPAREN);
1103                    strictContextExpression();
1104                    astFactory.addASTChild(currentAST, returnAST);
1105                    match(RPAREN);
1106                    nlsWarn();
1107                    compoundStatement();
1108                    astFactory.addASTChild(currentAST, returnAST);
1109                    statement_AST = (AST)currentAST.root;
1110                }
1111            else {
1112                throw new NoViableAltException(LT(1), getFilename());
1113            }
1114            }}
1115            returnAST = statement_AST;
1116        }
1117        
1118/** A statement separator is either a semicolon or a significant newline.
1119 * Any number of additional (insignificant) newlines may accompany it.
1120 */

1121    public final void sep() throws RecognitionException, TokenStreamException {
1122        
1123        returnAST = null;
1124        ASTPair currentAST = new ASTPair();
1125        AST sep_AST = null;
1126        
1127        switch ( LA(1)) {
1128        case SEMI:
1129        {
1130            match(SEMI);
1131            {
1132            _loop480:
1133            do {
1134                if ((LA(1)==NLS) && (_tokenSet_24.member(LA(2))) && (_tokenSet_20.member(LA(3)))) {
1135                    match(NLS);
1136                }
1137                else {
1138                    break _loop480;
1139                }
1140                
1141            } while (true);
1142            }
1143            if ( inputState.guessing==0 ) {
1144                sepToken = SEMI;
1145            }
1146            break;
1147        }
1148        case NLS:
1149        {
1150            match(NLS);
1151            if ( inputState.guessing==0 ) {
1152                sepToken = NLS;
1153            }
1154            {
1155            _loop484:
1156            do {
1157                if ((LA(1)==SEMI) && (_tokenSet_24.member(LA(2))) && (_tokenSet_20.member(LA(3)))) {
1158                    match(SEMI);
1159                    {
1160                    _loop483:
1161                    do {
1162                        if ((LA(1)==NLS) && (_tokenSet_24.member(LA(2))) && (_tokenSet_20.member(LA(3)))) {
1163                            match(NLS);
1164                        }
1165                        else {
1166                            break _loop483;
1167                        }
1168                        
1169                    } while (true);
1170                    }
1171                    if ( inputState.guessing==0 ) {
1172                        sepToken = SEMI;
1173                    }
1174                }
1175                else {
1176                    break _loop484;
1177                }
1178                
1179            } while (true);
1180            }
1181            break;
1182        }
1183        default:
1184        {
1185            throw new NoViableAltException(LT(1), getFilename());
1186        }
1187        }
1188        returnAST = sep_AST;
1189    }
1190    
1191/** A Groovy script or simple expression. Can be anything legal inside {...}. */
1192    public final void snippetUnit() throws RecognitionException, TokenStreamException {
1193        
1194        returnAST = null;
1195        ASTPair currentAST = new ASTPair();
1196        AST snippetUnit_AST = null;
1197        
1198        nls();
1199        blockBody(EOF);
1200        astFactory.addASTChild(currentAST, returnAST);
1201        snippetUnit_AST = (AST)currentAST.root;
1202        returnAST = snippetUnit_AST;
1203    }
1204    
1205/** A block body is a parade of zero or more statements or expressions. */
1206    public final void blockBody(
1207        int prevToken
1208    ) throws RecognitionException, TokenStreamException {
1209        
1210        returnAST = null;
1211        ASTPair currentAST = new ASTPair();
1212        AST blockBody_AST = null;
1213        
1214        {
1215        switch ( LA(1)) {
1216        case FINAL:
1217        case ABSTRACT:
1218        case STRICTFP:
1219        case LITERAL_import:
1220        case LITERAL_static:
1221        case LITERAL_def:
1222        case AT:
1223        case IDENT:
1224        case LBRACK:
1225        case LPAREN:
1226        case LITERAL_class:
1227        case LITERAL_interface:
1228        case LITERAL_enum:
1229        case LITERAL_super:
1230        case LITERAL_void:
1231        case LITERAL_boolean:
1232        case LITERAL_byte:
1233        case LITERAL_char:
1234        case LITERAL_short:
1235        case LITERAL_int:
1236        case LITERAL_float:
1237        case LITERAL_long:
1238        case LITERAL_double:
1239        case LITERAL_any:
1240        case STAR:
1241        case LITERAL_private:
1242        case LITERAL_public:
1243        case LITERAL_protected:
1244        case LITERAL_transient:
1245        case LITERAL_native:
1246        case LITERAL_threadsafe:
1247        case LITERAL_synchronized:
1248        case LITERAL_volatile:
1249        case LCURLY:
1250        case LITERAL_this:
1251        case STRING_LITERAL:
1252        case LITERAL_if:
1253        case LITERAL_while:
1254        case LITERAL_with:
1255        case LITERAL_switch:
1256        case LITERAL_for:
1257        case LITERAL_return:
1258        case LITERAL_break:
1259        case LITERAL_continue:
1260        case LITERAL_throw:
1261        case LITERAL_assert:
1262        case PLUS:
1263        case MINUS:
1264        case LITERAL_try:
1265        case INC:
1266        case DEC:
1267        case BNOT:
1268        case LNOT:
1269        case DOLLAR:
1270        case STRING_CTOR_START:
1271        case LITERAL_new:
1272        case LITERAL_true:
1273        case LITERAL_false:
1274        case LITERAL_null:
1275        case NUM_INT:
1276        case NUM_FLOAT:
1277        case NUM_LONG:
1278        case NUM_DOUBLE:
1279        case NUM_BIG_INT:
1280        case NUM_BIG_DECIMAL:
1281        {
1282            statement(prevToken);
1283            astFactory.addASTChild(currentAST, returnAST);
1284            break;
1285        }
1286        case EOF:
1287        case RCURLY:
1288        case SEMI:
1289        case NLS:
1290        {
1291            break;
1292        }
1293        default:
1294        {
1295            throw new NoViableAltException(LT(1), getFilename());
1296        }
1297        }
1298        }
1299        {
1300        _loop248:
1301        do {
1302            if ((LA(1)==SEMI||LA(1)==NLS)) {
1303                sep();
1304                {
1305                switch ( LA(1)) {
1306                case FINAL:
1307                case ABSTRACT:
1308                case STRICTFP:
1309                case LITERAL_import:
1310                case LITERAL_static:
1311                case LITERAL_def:
1312                case AT:
1313                case IDENT:
1314                case LBRACK:
1315                case LPAREN:
1316                case LITERAL_class:
1317                case LITERAL_interface:
1318                case LITERAL_enum:
1319                case LITERAL_super:
1320                case LITERAL_void:
1321                case LITERAL_boolean:
1322                case LITERAL_byte:
1323                case LITERAL_char:
1324                case LITERAL_short:
1325                case LITERAL_int:
1326                case LITERAL_float:
1327                case LITERAL_long:
1328                case LITERAL_double:
1329                case LITERAL_any:
1330                case STAR:
1331                case LITERAL_private:
1332                case LITERAL_public:
1333                case LITERAL_protected:
1334                case LITERAL_transient:
1335                case LITERAL_native:
1336                case LITERAL_threadsafe:
1337                case LITERAL_synchronized:
1338                case LITERAL_volatile:
1339                case LCURLY:
1340                case LITERAL_this:
1341                case STRING_LITERAL:
1342                case LITERAL_if:
1343                case LITERAL_while:
1344                case LITERAL_with:
1345                case LITERAL_switch:
1346                case LITERAL_for:
1347                case LITERAL_return:
1348                case LITERAL_break:
1349                case LITERAL_continue:
1350                case LITERAL_throw:
1351                case LITERAL_assert:
1352                case PLUS:
1353                case MINUS:
1354                case LITERAL_try:
1355                case INC:
1356                case DEC:
1357                case BNOT:
1358                case LNOT:
1359                case DOLLAR:
1360                case STRING_CTOR_START:
1361                case LITERAL_new:
1362                case LITERAL_true:
1363                case LITERAL_false:
1364                case LITERAL_null:
1365                case NUM_INT:
1366                case NUM_FLOAT:
1367                case NUM_LONG:
1368                case NUM_DOUBLE:
1369                case NUM_BIG_INT:
1370                case NUM_BIG_DECIMAL:
1371                {
1372                    statement(sepToken);
1373                    astFactory.addASTChild(currentAST, returnAST);
1374                    break;
1375                }
1376                case EOF:
1377                case RCURLY:
1378                case SEMI:
1379                case NLS:
1380                {
1381                    break;
1382                }
1383                default:
1384                {
1385                    throw new NoViableAltException(LT(1), getFilename());
1386                }
1387                }
1388                }
1389            }
1390            else {
1391                break _loop248;
1392            }
1393            
1394        } while (true);
1395        }
1396        blockBody_AST = (AST)currentAST.root;
1397        returnAST = blockBody_AST;
1398    }
1399    
1400    public final void identifier() throws RecognitionException, TokenStreamException {
1401        
1402        returnAST = null;
1403        ASTPair currentAST = new ASTPair();
1404        AST identifier_AST = null;
1405        
1406        AST tmp27_AST = null;
1407        tmp27_AST = astFactory.create(LT(1));
1408        astFactory.addASTChild(currentAST, tmp27_AST);
1409        match(IDENT);
1410        {
1411        _loop62:
1412        do {
1413            if ((LA(1)==DOT)) {
1414                AST tmp28_AST = null;
1415                tmp28_AST = astFactory.create(LT(1));
1416                astFactory.makeASTRoot(currentAST, tmp28_AST);
1417                match(DOT);
1418                nls();
1419                AST tmp29_AST = null;
1420                tmp29_AST = astFactory.create(LT(1));
1421                astFactory.addASTChild(currentAST, tmp29_AST);
1422                match(IDENT);
1423            }
1424            else {
1425                break _loop62;
1426            }
1427            
1428        } while (true);
1429        }
1430        identifier_AST = (AST)currentAST.root;
1431        returnAST = identifier_AST;
1432    }
1433    
1434    public final void importStatement() throws RecognitionException, TokenStreamException {
1435        
1436        returnAST = null;
1437        ASTPair currentAST = new ASTPair();
1438        AST importStatement_AST = null;
1439        Token i = null;
1440        AST i_AST = null;
1441        boolean isStatic = false;
1442        
1443        i = LT(1);
1444        i_AST = astFactory.create(i);
1445        astFactory.makeASTRoot(currentAST, i_AST);
1446        match(LITERAL_import);
1447        if ( inputState.guessing==0 ) {
1448            i_AST.setType(IMPORT);
1449        }
1450        {
1451        switch ( LA(1)) {
1452        case LITERAL_static:
1453        {
1454            match(LITERAL_static);
1455            if ( inputState.guessing==0 ) {
1456                i_AST.setType(STATIC_IMPORT);
1457            }
1458            break;
1459        }
1460        case IDENT:
1461        {
1462            break;
1463        }
1464        default:
1465        {
1466            throw new NoViableAltException(LT(1), getFilename());
1467        }
1468        }
1469        }
1470        identifierStar();
1471        astFactory.addASTChild(currentAST, returnAST);
1472        importStatement_AST = (AST)currentAST.root;
1473        returnAST = importStatement_AST;
1474    }
1475    
1476    public final void identifierStar() throws RecognitionException, TokenStreamException {
1477        
1478        returnAST = null;
1479        ASTPair currentAST = new ASTPair();
1480        AST identifierStar_AST = null;
1481        
1482        AST tmp31_AST = null;
1483        tmp31_AST = astFactory.create(LT(1));
1484        astFactory.addASTChild(currentAST, tmp31_AST);
1485        match(IDENT);
1486        {
1487        _loop65:
1488        do {
1489            if ((LA(1)==DOT) && (LA(2)==IDENT||LA(2)==NLS) && (_tokenSet_25.member(LA(3)))) {
1490                AST tmp32_AST = null;
1491                tmp32_AST = astFactory.create(LT(1));
1492                astFactory.makeASTRoot(currentAST, tmp32_AST);
1493                match(DOT);
1494                nls();
1495                AST tmp33_AST = null;
1496                tmp33_AST = astFactory.create(LT(1));
1497                astFactory.addASTChild(currentAST, tmp33_AST);
1498                match(IDENT);
1499            }
1500            else {
1501                break _loop65;
1502            }
1503            
1504        } while (true);
1505        }
1506        {
1507        switch ( LA(1)) {
1508        case DOT:
1509        {
1510            AST tmp34_AST = null;
1511            tmp34_AST = astFactory.create(LT(1));
1512            astFactory.makeASTRoot(currentAST, tmp34_AST);
1513            match(DOT);
1514            nls();
1515            AST tmp35_AST = null;
1516            tmp35_AST = astFactory.create(LT(1));
1517            astFactory.addASTChild(currentAST, tmp35_AST);
1518            match(STAR);
1519            break;
1520        }
1521        case LITERAL_as:
1522        {
1523            AST tmp36_AST = null;
1524            tmp36_AST = astFactory.create(LT(1));
1525            astFactory.makeASTRoot(currentAST, tmp36_AST);
1526            match(LITERAL_as);
1527            nls();
1528            AST tmp37_AST = null;
1529            tmp37_AST = astFactory.create(LT(1));
1530            astFactory.addASTChild(currentAST, tmp37_AST);
1531            match(IDENT);
1532            break;
1533        }
1534        case EOF:
1535        case RCURLY:
1536        case SEMI:
1537        case NLS:
1538        case LITERAL_default:
1539        case LITERAL_else:
1540        case LITERAL_case:
1541        {
1542            break;
1543        }
1544        default:
1545        {
1546            throw new NoViableAltException(LT(1), getFilename());
1547        }
1548        }
1549        }
1550        identifierStar_AST = (AST)currentAST.root;
1551        returnAST = identifierStar_AST;
1552    }
1553    
1554    protected final void typeDefinitionInternal(
1555        AST mods
1556    ) throws RecognitionException, TokenStreamException {
1557        
1558        returnAST = null;
1559        ASTPair currentAST = new ASTPair();
1560        AST typeDefinitionInternal_AST = null;
1561        AST cd_AST = null;
1562        AST id_AST = null;
1563        AST ed_AST = null;
1564        AST ad_AST = null;
1565        
1566        switch ( LA(1)) {
1567        case LITERAL_class:
1568        {
1569            classDefinition(mods);
1570            cd_AST = (AST)returnAST;
1571            astFactory.addASTChild(currentAST, returnAST);
1572            if ( inputState.guessing==0 ) {
1573                typeDefinitionInternal_AST = (AST)currentAST.root;
1574                typeDefinitionInternal_AST = cd_AST;
1575                currentAST.root = typeDefinitionInternal_AST;
1576                currentAST.child = typeDefinitionInternal_AST!=null &&typeDefinitionInternal_AST.getFirstChild()!=null ?
1577                    typeDefinitionInternal_AST.getFirstChild() : typeDefinitionInternal_AST;
1578                currentAST.advanceChildToEnd();
1579            }
1580            typeDefinitionInternal_AST = (AST)currentAST.root;
1581            break;
1582        }
1583        case LITERAL_interface:
1584        {
1585            interfaceDefinition(mods);
1586            id_AST = (AST)returnAST;
1587            astFactory.addASTChild(currentAST, returnAST);
1588            if ( inputState.guessing==0 ) {
1589                typeDefinitionInternal_AST = (AST)currentAST.root;
1590                typeDefinitionInternal_AST = id_AST;
1591                currentAST.root = typeDefinitionInternal_AST;
1592                currentAST.child = typeDefinitionInternal_AST!=null &&typeDefinitionInternal_AST.getFirstChild()!=null ?
1593                    typeDefinitionInternal_AST.getFirstChild() : typeDefinitionInternal_AST;
1594                currentAST.advanceChildToEnd();
1595            }
1596            typeDefinitionInternal_AST = (AST)currentAST.root;
1597            break;
1598        }
1599        case LITERAL_enum:
1600        {
1601            enumDefinition(mods);
1602            ed_AST = (AST)returnAST;
1603            astFactory.addASTChild(currentAST, returnAST);
1604            if ( inputState.guessing==0 ) {
1605                typeDefinitionInternal_AST = (AST)currentAST.root;
1606                typeDefinitionInternal_AST = ed_AST;
1607                currentAST.root = typeDefinitionInternal_AST;
1608                currentAST.child = typeDefinitionInternal_AST!=null &&typeDefinitionInternal_AST.getFirstChild()!=null ?
1609                    typeDefinitionInternal_AST.getFirstChild() : typeDefinitionInternal_AST;
1610                currentAST.advanceChildToEnd();
1611            }
1612            typeDefinitionInternal_AST = (AST)currentAST.root;
1613            break;
1614        }
1615        case AT:
1616        {
1617            annotationDefinition(mods);
1618            ad_AST = (AST)returnAST;
1619            astFactory.addASTChild(currentAST, returnAST);
1620            if ( inputState.guessing==0 ) {
1621                typeDefinitionInternal_AST = (AST)currentAST.root;
1622                typeDefinitionInternal_AST = ad_AST;
1623                currentAST.root = typeDefinitionInternal_AST;
1624                currentAST.child = typeDefinitionInternal_AST!=null &&typeDefinitionInternal_AST.getFirstChild()!=null ?
1625                    typeDefinitionInternal_AST.getFirstChild() : typeDefinitionInternal_AST;
1626                currentAST.advanceChildToEnd();
1627            }
1628            typeDefinitionInternal_AST = (AST)currentAST.root;
1629            break;
1630        }
1631        default:
1632        {
1633            throw new NoViableAltException(LT(1), getFilename());
1634        }
1635        }
1636        returnAST = typeDefinitionInternal_AST;
1637    }
1638    
1639    public final void classDefinition(
1640        AST modifiers
1641    ) throws RecognitionException, TokenStreamException {
1642        
1643        returnAST = null;
1644        ASTPair currentAST = new ASTPair();
1645        AST classDefinition_AST = null;
1646        AST tp_AST = null;
1647        AST sc_AST = null;
1648        AST ic_AST = null;
1649        AST cb_AST = null;
1650        Token first = LT(1);AST prevCurrentClass = currentClass;
1651        
1652        match(LITERAL_class);
1653        AST tmp39_AST = null;
1654        tmp39_AST = astFactory.create(LT(1));
1655        match(IDENT);
1656        nls();
1657        if ( inputState.guessing==0 ) {
1658            currentClass = tmp39_AST;
1659        }
1660        {
1661        switch ( LA(1)) {
1662        case LT:
1663        {
1664            typeParameters();
1665            tp_AST = (AST)returnAST;
1666            break;
1667        }
1668        case LITERAL_extends:
1669        case LCURLY:
1670        case LITERAL_implements:
1671        {
1672            break;
1673        }
1674        default:
1675        {
1676            throw new NoViableAltException(LT(1), getFilename());
1677        }
1678        }
1679        }
1680        superClassClause();
1681        sc_AST = (AST)returnAST;
1682        implementsClause();
1683        ic_AST = (AST)returnAST;
1684        classBlock();
1685        cb_AST = (AST)returnAST;
1686        if ( inputState.guessing==0 ) {
1687            classDefinition_AST = (AST)currentAST.root;
1688            classDefinition_AST = (AST)astFactory.make( (new ASTArray(7)).add(create(CLASS_DEF,"CLASS_DEF",first,LT(1))).add(modifiers).add(tmp39_AST).add(tp_AST).add(sc_AST).add(ic_AST).add(cb_AST));
1689            currentAST.root = classDefinition_AST;
1690            currentAST.child = classDefinition_AST!=null &&classDefinition_AST.getFirstChild()!=null ?
1691                classDefinition_AST.getFirstChild() : classDefinition_AST;
1692            currentAST.advanceChildToEnd();
1693        }
1694        if ( inputState.guessing==0 ) {
1695            currentClass = prevCurrentClass;
1696        }
1697        returnAST = classDefinition_AST;
1698    }
1699    
1700    public final void interfaceDefinition(
1701        AST modifiers
1702    ) throws RecognitionException, TokenStreamException {
1703        
1704        returnAST = null;
1705        ASTPair currentAST = new ASTPair();
1706        AST interfaceDefinition_AST = null;
1707        AST tp_AST = null;
1708        AST ie_AST = null;
1709        AST ib_AST = null;
1710        Token first = LT(1);
1711        
1712        match(LITERAL_interface);
1713        AST tmp41_AST = null;
1714        tmp41_AST = astFactory.create(LT(1));
1715        match(IDENT);
1716        nls();
1717        {
1718        switch ( LA(1)) {
1719        case LT:
1720        {
1721            typeParameters();
1722            tp_AST = (AST)returnAST;
1723            break;
1724        }
1725        case LITERAL_extends:
1726        case LCURLY:
1727        {
1728            break;
1729        }
1730        default:
1731        {
1732            throw new NoViableAltException(LT(1), getFilename());
1733        }
1734        }
1735        }
1736        interfaceExtends();
1737        ie_AST = (AST)returnAST;
1738        interfaceBlock();
1739        ib_AST = (AST)returnAST;
1740        if ( inputState.guessing==0 ) {
1741            interfaceDefinition_AST = (AST)currentAST.root;
1742            interfaceDefinition_AST = (AST)astFactory.make( (new ASTArray(6)).add(create(INTERFACE_DEF,"INTERFACE_DEF",first,LT(1))).add(modifiers).add(tmp41_AST).add(tp_AST).add(ie_AST).add(ib_AST));
1743            currentAST.root = interfaceDefinition_AST;
1744            currentAST.child = interfaceDefinition_AST!=null &&interfaceDefinition_AST.getFirstChild()!=null ?
1745                interfaceDefinition_AST.getFirstChild() : interfaceDefinition_AST;
1746            currentAST.advanceChildToEnd();
1747        }
1748        returnAST = interfaceDefinition_AST;
1749    }
1750    
1751    public final void enumDefinition(
1752        AST modifiers
1753    ) throws RecognitionException, TokenStreamException {
1754        
1755        returnAST = null;
1756        ASTPair currentAST = new ASTPair();
1757        AST enumDefinition_AST = null;
1758        AST ic_AST = null;
1759        AST eb_AST = null;
1760        Token first = LT(1);
1761        
1762        match(LITERAL_enum);
1763        AST tmp43_AST = null;
1764        tmp43_AST = astFactory.create(LT(1));
1765        match(IDENT);
1766        implementsClause();
1767        ic_AST = (AST)returnAST;
1768        enumBlock();
1769        eb_AST = (AST)returnAST;
1770        if ( inputState.guessing==0 ) {
1771            enumDefinition_AST = (AST)currentAST.root;
1772            enumDefinition_AST = (AST)astFactory.make( (new ASTArray(5)).add(create(ENUM_DEF,"ENUM_DEF",first,LT(1))).add(modifiers).add(tmp43_AST).add(ic_AST).add(eb_AST));
1773            currentAST.root = enumDefinition_AST;
1774            currentAST.child = enumDefinition_AST!=null &&enumDefinition_AST.getFirstChild()!=null ?
1775                enumDefinition_AST.getFirstChild() : enumDefinition_AST;
1776            currentAST.advanceChildToEnd();
1777        }
1778        returnAST = enumDefinition_AST;
1779    }
1780    
1781    public final void annotationDefinition(
1782        AST modifiers
1783    ) throws RecognitionException, TokenStreamException {
1784        
1785        returnAST = null;
1786        ASTPair currentAST = new ASTPair();
1787        AST annotationDefinition_AST = null;
1788        AST ab_AST = null;
1789        Token first = LT(1);
1790        
1791        AST tmp44_AST = null;
1792        tmp44_AST = astFactory.create(LT(1));
1793        match(AT);
1794        match(LITERAL_interface);
1795        AST tmp46_AST = null;
1796        tmp46_AST = astFactory.create(LT(1));
1797        match(IDENT);
1798        annotationBlock();
1799        ab_AST = (AST)returnAST;
1800        if ( inputState.guessing==0 ) {
1801            annotationDefinition_AST = (AST)currentAST.root;
1802            annotationDefinition_AST = (AST)astFactory.make( (new ASTArray(4)).add(create(ANNOTATION_DEF,"ANNOTATION_DEF",first,LT(1))).add(modifiers).add(tmp46_AST).add(ab_AST));
1803            currentAST.root = annotationDefinition_AST;
1804            currentAST.child = annotationDefinition_AST!=null &&annotationDefinition_AST.getFirstChild()!=null ?
1805                annotationDefinition_AST.getFirstChild() : annotationDefinition_AST;
1806            currentAST.advanceChildToEnd();
1807        }
1808        returnAST = annotationDefinition_AST;
1809    }
1810    
1811/** A declaration is the creation of a reference or primitive-type variable,
1812 * or (if arguments are present) of a method.
1813 * Generically, this is called a 'variable' definition, even in the case of a class field or method.
1814 * It may start with the modifiers and/or a declaration keyword "def".
1815 * It may also start with the modifiers and a capitalized type name.
1816 * <p>
1817 * AST effect: Create a separate Type/Var tree for each var in the var list.
1818 * Must be guarded, as in (declarationStart) => declaration.
1819 */

1820    public final void declaration() throws RecognitionException, TokenStreamException {
1821        
1822        returnAST = null;
1823        ASTPair currentAST = new ASTPair();
1824        AST declaration_AST = null;
1825        AST m_AST = null;
1826        AST t_AST = null;
1827        AST v_AST = null;
1828        AST t2_AST = null;
1829        AST v2_AST = null;
1830        
1831        switch ( LA(1)) {
1832        case FINAL:
1833        case ABSTRACT:
1834        case STRICTFP:
1835        case LITERAL_static:
1836        case LITERAL_def:
1837        case AT:
1838        case LITERAL_private:
1839        case LITERAL_public:
1840        case LITERAL_protected:
1841        case LITERAL_transient:
1842        case LITERAL_native:
1843        case LITERAL_threadsafe:
1844        case LITERAL_synchronized:
1845        case LITERAL_volatile:
1846        {
1847            modifiers();
1848            m_AST = (AST)returnAST;
1849            {
1850            if ((_tokenSet_26.member(LA(1))) && (_tokenSet_27.member(LA(2)))) {
1851                typeSpec(false);
1852                t_AST = (AST)returnAST;
1853            }
1854            else if ((LA(1)==IDENT||LA(1)==STRING_LITERAL) && (_tokenSet_28.member(LA(2)))) {
1855            }
1856            else {
1857                throw new NoViableAltException(LT(1), getFilename());
1858            }
1859            
1860            }
1861            variableDefinitions(m_AST, t_AST);
1862            v_AST = (AST)returnAST;
1863            if ( inputState.guessing==0 ) {
1864                declaration_AST = (AST)currentAST.root;
1865                declaration_AST = v_AST;
1866                currentAST.root = declaration_AST;
1867                currentAST.child = declaration_AST!=null &&declaration_AST.getFirstChild()!=null ?
1868                    declaration_AST.getFirstChild() : declaration_AST;
1869                currentAST.advanceChildToEnd();
1870            }
1871            break;
1872        }
1873        case IDENT:
1874        case LITERAL_void:
1875        case LITERAL_boolean:
1876        case LITERAL_byte:
1877        case LITERAL_char:
1878        case LITERAL_short:
1879        case LITERAL_int:
1880        case LITERAL_float:
1881        case LITERAL_long:
1882        case LITERAL_double:
1883        case LITERAL_any:
1884        {
1885            typeSpec(false);
1886            t2_AST = (AST)returnAST;
1887            variableDefinitions(null,t2_AST);
1888            v2_AST = (AST)returnAST;
1889            if ( inputState.guessing==0 ) {
1890                declaration_AST = (AST)currentAST.root;
1891                declaration_AST = v2_AST;
1892                currentAST.root = declaration_AST;
1893                currentAST.child = declaration_AST!=null &&declaration_AST.getFirstChild()!=null ?
1894                    declaration_AST.getFirstChild() : declaration_AST;
1895                currentAST.advanceChildToEnd();
1896            }
1897            break;
1898        }
1899        default:
1900        {
1901            throw new NoViableAltException(LT(1), getFilename());
1902        }
1903        }
1904        returnAST = declaration_AST;
1905    }
1906    
1907/** A list of one or more modifier, annotation, or "def". */
1908    public final void modifiers() throws RecognitionException, TokenStreamException {
1909        
1910        returnAST = null;
1911        ASTPair currentAST = new ASTPair();
1912        AST modifiers_AST = null;
1913        Token first = LT(1);
1914        
1915        modifiersInternal();
1916        astFactory.addASTChild(currentAST, returnAST);
1917        if ( inputState.guessing==0 ) {
1918            modifiers_AST = (AST)currentAST.root;
1919            modifiers_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(MODIFIERS,"MODIFIERS",first,LT(1))).add(modifiers_AST));
1920            currentAST.root = modifiers_AST;
1921            currentAST.child = modifiers_AST!=null &&modifiers_AST.getFirstChild()!=null ?
1922                modifiers_AST.getFirstChild() : modifiers_AST;
1923            currentAST.advanceChildToEnd();
1924        }
1925        modifiers_AST = (AST)currentAST.root;
1926        returnAST = modifiers_AST;
1927    }
1928    
1929    public final void typeSpec(
1930        boolean addImagNode
1931    ) throws RecognitionException, TokenStreamException {
1932        
1933        returnAST = null;
1934        ASTPair currentAST = new ASTPair();
1935        AST typeSpec_AST = null;
1936        
1937        switch ( LA(1)) {
1938        case IDENT:
1939        {
1940            classTypeSpec(addImagNode);
1941            astFactory.addASTChild(currentAST, returnAST);
1942            typeSpec_AST = (AST)currentAST.root;
1943            break;
1944        }
1945        case LITERAL_void:
1946        case LITERAL_boolean:
1947        case LITERAL_byte:
1948        case LITERAL_char:
1949        case LITERAL_short:
1950        case LITERAL_int:
1951        case LITERAL_float:
1952        case LITERAL_long:
1953        case LITERAL_double:
1954        case LITERAL_any:
1955        {
1956            builtInTypeSpec(addImagNode);
1957            astFactory.addASTChild(currentAST, returnAST);
1958            typeSpec_AST = (AST)currentAST.root;
1959            break;
1960        }
1961        default:
1962        {
1963            throw new NoViableAltException(LT(1), getFilename());
1964        }
1965        }
1966        returnAST = typeSpec_AST;
1967    }
1968    
1969/** The tail of a declaration.
1970  * Either v1, v2, ... (with possible initializers) or else m(args){body}.
1971  * The two arguments are the modifier list (if any) and the declaration head (if any).
1972  * The declaration head is the variable type, or (for a method) the return type.
1973  * If it is missing, then the variable type is taken from its initializer (if there is one).
1974  * Otherwise, the variable type defaults to 'any'.
1975  * DECIDE: Method return types default to the type of the method body, as an expression.
1976  */

1977    public final void variableDefinitions(
1978        AST mods, AST t
1979    ) throws RecognitionException, TokenStreamException {
1980        
1981        returnAST = null;
1982        ASTPair currentAST = new ASTPair();
1983        AST variableDefinitions_AST = null;
1984        Token id = null;
1985        AST id_AST = null;
1986        Token qid = null;
1987        AST qid_AST = null;
1988        AST param_AST = null;
1989        AST tc_AST = null;
1990        AST mb_AST = null;
1991        Token first = LT(1);
1992        
1993        if ((LA(1)==IDENT) && (_tokenSet_29.member(LA(2)))) {
1994            variableDeclarator(getASTFactory().dupTree(mods),
1995                           getASTFactory().dupTree(t));
1996            astFactory.addASTChild(currentAST, returnAST);
1997            {
1998            _loop188:
1999            do {
2000                if ((LA(1)==COMMA)) {
2001                    match(COMMA);
2002                    nls();
2003                    variableDeclarator(getASTFactory().dupTree(mods),
2004                               getASTFactory().dupTree(t));
2005                    astFactory.addASTChild(currentAST, returnAST);
2006                }
2007                else {
2008                    break _loop188;
2009                }
2010                
2011            } while (true);
2012            }
2013            variableDefinitions_AST = (AST)currentAST.root;
2014        }
2015        else if ((LA(1)==IDENT||LA(1)==STRING_LITERAL) && (LA(2)==LPAREN)) {
2016            {
2017            switch ( LA(1)) {
2018            case IDENT:
2019            {
2020                id = LT(1);
2021                id_AST = astFactory.create(id);
2022                astFactory.addASTChild(currentAST, id_AST);
2023                match(IDENT);
2024                break;
2025            }
2026            case STRING_LITERAL:
2027            {
2028                qid = LT(1);
2029                qid_AST = astFactory.create(qid);
2030                astFactory.addASTChild(currentAST, qid_AST);
2031                match(STRING_LITERAL);
2032                if ( inputState.guessing==0 ) {
2033                    qid_AST.setType(IDENT);
2034                }
2035                break;
2036            }
2037            default:
2038            {
2039                throw new NoViableAltException(LT(1), getFilename());
2040            }
2041            }
2042            }
2043            match(LPAREN);
2044            parameterDeclarationList();
2045            param_AST = (AST)returnAST;
2046            match(RPAREN);
2047            {
2048            switch ( LA(1)) {
2049            case LITERAL_throws:
2050            {
2051                throwsClause();
2052                tc_AST = (AST)returnAST;
2053                break;
2054            }
2055            case EOF:
2056            case LCURLY:
2057            case RCURLY:
2058            case SEMI:
2059            case NLS:
2060            case LITERAL_default:
2061            case LITERAL_else:
2062            case LITERAL_case:
2063            {
2064                break;
2065            }
2066            default:
2067            {
2068                throw new NoViableAltException(LT(1), getFilename());
2069            }
2070            }
2071            }
2072            nlsWarn();
2073            {
2074            switch ( LA(1)) {
2075            case LCURLY:
2076            {
2077                openBlock();
2078                mb_AST = (AST)returnAST;
2079                break;
2080            }
2081            case EOF:
2082            case RCURLY:
2083            case SEMI:
2084            case NLS:
2085            case LITERAL_default:
2086            case LITERAL_else:
2087            case LITERAL_case:
2088            {
2089                break;
2090            }
2091            default:
2092            {
2093                throw new NoViableAltException(LT(1), getFilename());
2094            }
2095            }
2096            }
2097            if ( inputState.guessing==0 ) {
2098                variableDefinitions_AST = (AST)currentAST.root;
2099                if (qid_AST != null) id_AST = qid_AST;
2100                variableDefinitions_AST =
2101                (AST)astFactory.make( (new ASTArray(7)).add(create(METHOD_DEF,"METHOD_DEF",first,LT(1))).add(mods).add((AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(t))).add(id_AST).add(param_AST).add(tc_AST).add(mb_AST));
2102                
2103                currentAST.root = variableDefinitions_AST;
2104                currentAST.child = variableDefinitions_AST!=null &&variableDefinitions_AST.getFirstChild()!=null ?
2105                    variableDefinitions_AST.getFirstChild() : variableDefinitions_AST;
2106                currentAST.advanceChildToEnd();
2107            }
2108            variableDefinitions_AST = (AST)currentAST.root;
2109        }
2110        else {
2111            throw new NoViableAltException(LT(1), getFilename());
2112        }
2113        
2114        returnAST = variableDefinitions_AST;
2115    }
2116    
2117/** A declaration with one declarator and no initialization, like a parameterDeclaration.
2118 * Used to parse loops like <code>for (int x in y)</code> (up to the <code>in</code> keyword).
2119 */

2120    public final void singleDeclarationNoInit() throws RecognitionException, TokenStreamException {
2121        
2122        returnAST = null;
2123        ASTPair currentAST = new ASTPair();
2124        AST singleDeclarationNoInit_AST = null;
2125        AST m_AST = null;
2126        AST t_AST = null;
2127        AST v_AST = null;
2128        AST t2_AST = null;
2129        AST v2_AST = null;
2130        
2131        switch ( LA(1)) {
2132        case FINAL:
2133        case ABSTRACT:
2134        case STRICTFP:
2135        case LITERAL_static:
2136        case LITERAL_def:
2137        case AT:
2138        case LITERAL_private:
2139        case LITERAL_public:
2140        case LITERAL_protected:
2141        case LITERAL_transient:
2142        case LITERAL_native:
2143        case LITERAL_threadsafe:
2144        case LITERAL_synchronized:
2145        case LITERAL_volatile:
2146        {
2147            modifiers();
2148            m_AST = (AST)returnAST;
2149            {
2150            if ((_tokenSet_26.member(LA(1))) && (_tokenSet_30.member(LA(2)))) {
2151                typeSpec(false);
2152                t_AST = (AST)returnAST;
2153            }
2154            else if ((LA(1)==IDENT) && (_tokenSet_31.member(LA(2)))) {
2155            }
2156            else {
2157                throw new NoViableAltException(LT(1), getFilename());
2158            }
2159            
2160            }
2161            singleVariable(m_AST, t_AST);
2162            v_AST = (AST)returnAST;
2163            if ( inputState.guessing==0 ) {
2164                singleDeclarationNoInit_AST = (AST)currentAST.root;
2165                singleDeclarationNoInit_AST = v_AST;
2166                currentAST.root = singleDeclarationNoInit_AST;
2167                currentAST.child = singleDeclarationNoInit_AST!=null &&singleDeclarationNoInit_AST.getFirstChild()!=null ?
2168                    singleDeclarationNoInit_AST.getFirstChild() : singleDeclarationNoInit_AST;
2169                currentAST.advanceChildToEnd();
2170            }
2171            break;
2172        }
2173        case IDENT:
2174        case LITERAL_void:
2175        case LITERAL_boolean:
2176        case LITERAL_byte:
2177        case LITERAL_char:
2178        case LITERAL_short:
2179        case LITERAL_int:
2180        case LITERAL_float:
2181        case LITERAL_long:
2182        case LITERAL_double:
2183        case LITERAL_any:
2184        {
2185            typeSpec(false);
2186            t2_AST = (AST)returnAST;
2187            singleVariable(null,t2_AST);
2188            v2_AST = (AST)returnAST;
2189            if ( inputState.guessing==0 ) {
2190                singleDeclarationNoInit_AST = (AST)currentAST.root;
2191                singleDeclarationNoInit_AST = v2_AST;
2192                currentAST.root = singleDeclarationNoInit_AST;
2193                currentAST.child = singleDeclarationNoInit_AST!=null &&singleDeclarationNoInit_AST.getFirstChild()!=null ?
2194                    singleDeclarationNoInit_AST.getFirstChild() : singleDeclarationNoInit_AST;
2195                currentAST.advanceChildToEnd();
2196            }
2197            break;
2198        }
2199        default:
2200        {
2201            throw new NoViableAltException(LT(1), getFilename());
2202        }
2203        }
2204        returnAST = singleDeclarationNoInit_AST;
2205    }
2206    
2207/** Used in cases where a declaration cannot have commas, or ends with the "in" operator instead of '='. */
2208    public final void singleVariable(
2209        AST mods, AST t
2210    ) throws RecognitionException, TokenStreamException {
2211        
2212        returnAST = null;
2213        ASTPair currentAST = new ASTPair();
2214        AST singleVariable_AST = null;
2215        AST id_AST = null;
2216        Token first = LT(1);
2217        
2218        variableName();
2219        id_AST = (AST)returnAST;
2220        if ( inputState.guessing==0 ) {
2221            singleVariable_AST = (AST)currentAST.root;
2222            singleVariable_AST = (AST)astFactory.make( (new ASTArray(4)).add(create(VARIABLE_DEF,"VARIABLE_DEF",first,LT(1))).add(mods).add((AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(t))).add(id_AST));
2223            currentAST.root = singleVariable_AST;
2224            currentAST.child = singleVariable_AST!=null &&singleVariable_AST.getFirstChild()!=null ?
2225                singleVariable_AST.getFirstChild() : singleVariable_AST;
2226            currentAST.advanceChildToEnd();
2227        }
2228        returnAST = singleVariable_AST;
2229    }
2230    
2231/** A declaration with one declarator and optional initialization, like a parameterDeclaration.
2232 * Used to parse declarations used for both binding and effect, in places like argument
2233 * lists and <code>while</code> statements.
2234 */

2235    public final void singleDeclaration() throws RecognitionException, TokenStreamException {
2236        
2237        returnAST = null;
2238        ASTPair currentAST = new ASTPair();
2239        AST singleDeclaration_AST = null;
2240        AST sd_AST = null;
2241        
2242        singleDeclarationNoInit();
2243        sd_AST = (AST)returnAST;
2244        if ( inputState.guessing==0 ) {
2245            singleDeclaration_AST = (AST)currentAST.root;
2246            singleDeclaration_AST = sd_AST;
2247            currentAST.root = singleDeclaration_AST;
2248            currentAST.child = singleDeclaration_AST!=null &&singleDeclaration_AST.getFirstChild()!=null ?
2249                singleDeclaration_AST.getFirstChild() : singleDeclaration_AST;
2250            currentAST.advanceChildToEnd();
2251        }
2252        {
2253        switch ( LA(1)) {
2254        case ASSIGN:
2255        {
2256            varInitializer();
2257            astFactory.addASTChild(currentAST, returnAST);
2258            break;
2259        }
2260        case RBRACK:
2261        case COMMA:
2262        case RPAREN:
2263        case SEMI:
2264        {
2265            break;
2266        }
2267        default:
2268        {
2269            throw new NoViableAltException(LT(1), getFilename());
2270        }
2271        }
2272        }
2273        singleDeclaration_AST = (AST)currentAST.root;
2274        returnAST = singleDeclaration_AST;
2275    }
2276    
2277/** An assignment operator '=' followed by an expression. (Never empty.) */
2278    public final void varInitializer() throws RecognitionException, TokenStreamException {
2279        
2280        returnAST = null;
2281        ASTPair currentAST = new ASTPair();
2282        AST varInitializer_AST = null;
2283        
2284        AST tmp50_AST = null;
2285        tmp50_AST = astFactory.create(LT(1));
2286        astFactory.makeASTRoot(currentAST, tmp50_AST);
2287        match(ASSIGN);
2288        nls();
2289        expression(LC_INIT);
2290        astFactory.addASTChild(currentAST, returnAST);
2291        varInitializer_AST = (AST)currentAST.root;
2292        returnAST = varInitializer_AST;
2293    }
2294    
2295/** Used only as a lookahead predicate, before diving in and parsing a declaration.
2296 * A declaration can be unambiguously introduced with "def", an annotation or a modifier token like "final".
2297 * It may also be introduced by a simple identifier whose first character is an uppercase letter,
2298 * as in {String x}. A declaration can also be introduced with a built in type like 'int' or 'void'.
2299 * Brackets (array and generic) are allowed, as in {List[] x} or {int[][] y}.
2300 * Anything else is parsed as a statement of some sort (expression or command).
2301 * <p>
2302 * (In the absence of explicit method-call parens, we assume a capitalized name is a type name.
2303 * Yes, this is a little hacky. Alternatives are to complicate the declaration or command
2304 * syntaxes, or to have the parser query the symbol table. Parse-time queries are evil.
2305 * And we want both {String x} and {println x}. So we need a syntactic razor-edge to slip
2306 * between 'println' and 'String'.)
2307 *
2308 * *TODO* The declarationStart production needs to be strengthened to recognize
2309 * things like {List<String> foo}.
2310 * Right now it only knows how to skip square brackets after the type, not
2311 * angle brackets.
2312 * This probably turns out to be tricky because of >> vs. > >. If so,
2313 * just put a TODO comment in.
2314 */

2315    public final void declarationStart() throws RecognitionException, TokenStreamException {
2316        
2317        returnAST = null;
2318        ASTPair currentAST = new ASTPair();
2319        AST declarationStart_AST = null;
2320        
2321        switch ( LA(1)) {
2322        case LITERAL_def:
2323        {
2324            match(LITERAL_def);
2325            break;
2326        }
2327        case FINAL:
2328        case ABSTRACT:
2329        case STRICTFP:
2330        case LITERAL_static:
2331        case LITERAL_private:
2332        case LITERAL_public:
2333        case LITERAL_protected:
2334        case LITERAL_transient:
2335        case LITERAL_native:
2336        case LITERAL_threadsafe:
2337        case LITERAL_synchronized:
2338        case LITERAL_volatile:
2339        {
2340            modifier();
2341            break;
2342        }
2343        case AT:
2344        {
2345            AST tmp52_AST = null;
2346            tmp52_AST = astFactory.create(LT(1));
2347            match(AT);
2348            AST tmp53_AST = null;
2349            tmp53_AST = astFactory.create(LT(1));
2350            match(IDENT);
2351            break;
2352        }
2353        case IDENT:
2354        case LITERAL_void:
2355        case LITERAL_boolean:
2356        case LITERAL_byte:
2357        case LITERAL_char:
2358        case LITERAL_short:
2359        case LITERAL_int:
2360        case LITERAL_float:
2361        case LITERAL_long:
2362        case LITERAL_double:
2363        case LITERAL_any:
2364        {
2365            {
2366            if ((LA(1)==IDENT) && (LA(2)==IDENT||LA(2)==LBRACK)) {
2367                upperCaseIdent();
2368            }
2369            else if (((LA(1) >= LITERAL_void && LA(1) <= LITERAL_any))) {
2370                builtInType();
2371            }
2372            else if ((LA(1)==IDENT) && (LA(2)==DOT)) {
2373                qualifiedTypeName();
2374            }
2375            else {
2376                throw new NoViableAltException(LT(1), getFilename());
2377            }
2378            
2379            }
2380            {
2381            _loop24:
2382            do {
2383                if ((LA(1)==LBRACK)) {
2384                    AST tmp54_AST = null;
2385                    tmp54_AST = astFactory.create(LT(1));
2386                    match(LBRACK);
2387                    balancedTokens();
2388                    AST tmp55_AST = null;
2389                    tmp55_AST = astFactory.create(LT(1));
2390                    match(RBRACK);
2391                }
2392                else {
2393                    break _loop24;
2394                }
2395                
2396            } while (true);
2397            }
2398            AST tmp56_AST = null;
2399            tmp56_AST = astFactory.create(LT(1));
2400            match(IDENT);
2401            break;
2402        }
2403        default:
2404        {
2405            throw new NoViableAltException(LT(1), getFilename());
2406        }
2407        }
2408        returnAST = declarationStart_AST;
2409    }
2410    
2411    public final void modifier() throws RecognitionException, TokenStreamException {
2412        
2413        returnAST = null;
2414        ASTPair currentAST = new ASTPair();
2415        AST modifier_AST = null;
2416        
2417        switch ( LA(1)) {
2418        case LITERAL_private:
2419        {
2420            AST tmp57_AST = null;
2421            tmp57_AST = astFactory.create(LT(1));
2422            astFactory.addASTChild(currentAST, tmp57_AST);
2423            match(LITERAL_private);
2424            modifier_AST = (AST)currentAST.root;
2425            break;
2426        }
2427        case LITERAL_public:
2428        {
2429            AST tmp58_AST = null;
2430            tmp58_AST = astFactory.create(LT(1));
2431            astFactory.addASTChild(currentAST, tmp58_AST);
2432            match(LITERAL_public);
2433            modifier_AST = (AST)currentAST.root;
2434            break;
2435        }
2436        case LITERAL_protected:
2437        {
2438            AST tmp59_AST = null;
2439            tmp59_AST = astFactory.create(LT(1));
2440            astFactory.addASTChild(currentAST, tmp59_AST);
2441            match(LITERAL_protected);
2442            modifier_AST = (AST)currentAST.root;
2443            break;
2444        }
2445        case LITERAL_static:
2446        {
2447            AST tmp60_AST = null;
2448            tmp60_AST = astFactory.create(LT(1));
2449            astFactory.addASTChild(currentAST, tmp60_AST);
2450            match(LITERAL_static);
2451            modifier_AST = (AST)currentAST.root;
2452            break;
2453        }
2454        case LITERAL_transient:
2455        {
2456            AST tmp61_AST = null;
2457            tmp61_AST = astFactory.create(LT(1));
2458            astFactory.addASTChild(currentAST, tmp61_AST);
2459            match(LITERAL_transient);
2460            modifier_AST = (AST)currentAST.root;
2461            break;
2462        }
2463        case FINAL:
2464        {
2465            AST tmp62_AST = null;
2466            tmp62_AST = astFactory.create(LT(1));
2467            astFactory.addASTChild(currentAST, tmp62_AST);
2468            match(FINAL);
2469            modifier_AST = (AST)currentAST.root;
2470            break;
2471        }
2472        case ABSTRACT:
2473        {
2474            AST tmp63_AST = null;
2475            tmp63_AST = astFactory.create(LT(1));
2476            astFactory.addASTChild(currentAST, tmp63_AST);
2477            match(ABSTRACT);
2478            modifier_AST = (AST)currentAST.root;
2479            break;
2480        }
2481        case LITERAL_native:
2482        {
2483            AST tmp64_AST = null;
2484            tmp64_AST = astFactory.create(LT(1));
2485            astFactory.addASTChild(currentAST, tmp64_AST);
2486            match(LITERAL_native);
2487            modifier_AST = (AST)currentAST.root;
2488            break;
2489        }
2490        case LITERAL_threadsafe:
2491        {
2492            AST tmp65_AST = null;
2493            tmp65_AST = astFactory.create(LT(1));
2494            astFactory.addASTChild(currentAST, tmp65_AST);
2495            match(LITERAL_threadsafe);
2496            modifier_AST = (AST)currentAST.root;
2497            break;
2498        }
2499        case LITERAL_synchronized:
2500        {
2501            AST tmp66_AST = null;
2502            tmp66_AST = astFactory.create(LT(1));
2503            astFactory.addASTChild(currentAST, tmp66_AST);
2504            match(LITERAL_synchronized);
2505            modifier_AST = (AST)currentAST.root;
2506            break;
2507        }
2508        case LITERAL_volatile:
2509        {
2510            AST tmp67_AST = null;
2511            tmp67_AST = astFactory.create(LT(1));
2512            astFactory.addASTChild(currentAST, tmp67_AST);
2513            match(LITERAL_volatile);
2514            modifier_AST = (AST)currentAST.root;
2515            break;
2516        }
2517        case STRICTFP:
2518        {
2519            AST tmp68_AST = null;
2520            tmp68_AST = astFactory.create(LT(1));
2521            astFactory.addASTChild(currentAST, tmp68_AST);
2522            match(STRICTFP);
2523            modifier_AST = (AST)currentAST.root;
2524            break;
2525        }
2526        default:
2527        {
2528            throw new NoViableAltException(LT(1), getFilename());
2529        }
2530        }
2531        returnAST = modifier_AST;
2532    }
2533    
2534/** An IDENT token whose spelling is required to start with an uppercase letter.
2535 * In the case of a simple statement {UpperID name} the identifier is taken to be a type name, not a command name.
2536 */

2537    public final void upperCaseIdent() throws RecognitionException, TokenStreamException {
2538        
2539        returnAST = null;
2540        ASTPair currentAST = new ASTPair();
2541        AST upperCaseIdent_AST = null;
2542        
2543        if (!(isUpperCase(LT(1))))
2544          throw new SemanticException("isUpperCase(LT(1))");
2545        AST tmp69_AST = null;
2546        tmp69_AST = astFactory.create(LT(1));
2547        astFactory.addASTChild(currentAST, tmp69_AST);
2548        match(IDENT);
2549        upperCaseIdent_AST = (AST)currentAST.root;
2550        returnAST = upperCaseIdent_AST;
2551    }
2552    
2553    public final void builtInType() throws RecognitionException, TokenStreamException {
2554        
2555        returnAST = null;
2556        ASTPair currentAST = new ASTPair();
2557        AST builtInType_AST = null;
2558        
2559        switch ( LA(1)) {
2560        case LITERAL_void:
2561        {
2562            AST tmp70_AST = null;
2563            tmp70_AST = astFactory.create(LT(1));
2564            astFactory.addASTChild(currentAST, tmp70_AST);
2565            match(LITERAL_void);
2566            builtInType_AST = (AST)currentAST.root;
2567            break;
2568        }
2569        case LITERAL_boolean:
2570        {
2571            AST tmp71_AST = null;
2572            tmp71_AST = astFactory.create(LT(1));
2573            astFactory.addASTChild(currentAST, tmp71_AST);
2574            match(LITERAL_boolean);
2575            builtInType_AST = (AST)currentAST.root;
2576            break;
2577        }
2578        case LITERAL_byte:
2579        {
2580            AST tmp72_AST = null;
2581            tmp72_AST = astFactory.create(LT(1));
2582            astFactory.addASTChild(currentAST, tmp72_AST);
2583            match(LITERAL_byte);
2584            builtInType_AST = (AST)currentAST.root;
2585            break;
2586        }
2587        case LITERAL_char:
2588        {
2589            AST tmp73_AST = null;
2590            tmp73_AST = astFactory.create(LT(1));
2591            astFactory.addASTChild(currentAST, tmp73_AST);
2592            match(LITERAL_char);
2593            builtInType_AST = (AST)currentAST.root;
2594            break;
2595        }
2596        case LITERAL_short:
2597        {
2598            AST tmp74_AST = null;
2599            tmp74_AST = astFactory.create(LT(1));
2600            astFactory.addASTChild(currentAST, tmp74_AST);
2601            match(LITERAL_short);
2602            builtInType_AST = (AST)currentAST.root;
2603            break;
2604        }
2605        case LITERAL_int:
2606        {
2607            AST tmp75_AST = null;
2608            tmp75_AST = astFactory.create(LT(1));
2609            astFactory.addASTChild(currentAST, tmp75_AST);
2610            match(LITERAL_int);
2611            builtInType_AST = (AST)currentAST.root;
2612            break;
2613        }
2614        case LITERAL_float:
2615        {
2616            AST tmp76_AST = null;
2617            tmp76_AST = astFactory.create(LT(1));
2618            astFactory.addASTChild(currentAST, tmp76_AST);
2619            match(LITERAL_float);
2620            builtInType_AST = (AST)currentAST.root;
2621            break;
2622        }
2623        case LITERAL_long:
2624        {
2625            AST tmp77_AST = null;
2626            tmp77_AST = astFactory.create(LT(1));
2627            astFactory.addASTChild(currentAST, tmp77_AST);
2628            match(LITERAL_long);
2629            builtInType_AST = (AST)currentAST.root;
2630            break;
2631        }
2632        case LITERAL_double:
2633        {
2634            AST tmp78_AST = null;
2635            tmp78_AST = astFactory.create(LT(1));
2636            astFactory.addASTChild(currentAST, tmp78_AST);
2637            match(LITERAL_double);
2638            builtInType_AST = (AST)currentAST.root;
2639            break;
2640        }
2641        case LITERAL_any:
2642        {
2643            AST tmp79_AST = null;
2644            tmp79_AST = astFactory.create(LT(1));
2645            astFactory.addASTChild(currentAST, tmp79_AST);
2646            match(LITERAL_any);
2647            builtInType_AST = (AST)currentAST.root;
2648            break;
2649        }
2650        default:
2651        {
2652            throw new NoViableAltException(LT(1), getFilename());
2653        }
2654        }
2655        returnAST = builtInType_AST;
2656    }
2657    
2658/** Not yet used - but we could use something like this to look for fully qualified type names
2659 */

2660    public final void qualifiedTypeName() throws RecognitionException, TokenStreamException {
2661        
2662        returnAST = null;
2663        ASTPair currentAST = new ASTPair();
2664        AST qualifiedTypeName_AST = null;
2665        
2666        AST tmp80_AST = null;
2667        tmp80_AST = astFactory.create(LT(1));
2668        match(IDENT);
2669        {
2670        _loop27:
2671        do {
2672            if ((LA(1)==DOT) && (LA(2)==IDENT) && (LA(3)==DOT)) {
2673                AST tmp81_AST = null;
2674                tmp81_AST = astFactory.create(LT(1));
2675                match(DOT);
2676                AST tmp82_AST = null;
2677                tmp82_AST = astFactory.create(LT(1));
2678                match(IDENT);
2679            }
2680            else {
2681                break _loop27;
2682            }
2683            
2684        } while (true);
2685        }
2686        AST tmp83_AST = null;
2687        tmp83_AST = astFactory.create(LT(1));
2688        match(DOT);
2689        upperCaseIdent();
2690        returnAST = qualifiedTypeName_AST;
2691    }
2692    
2693    public final void balancedTokens() throws RecognitionException, TokenStreamException {
2694        
2695        returnAST = null;
2696        ASTPair currentAST = new ASTPair();
2697        AST balancedTokens_AST = null;
2698        
2699        {
2700        _loop477:
2701        do {
2702            if ((_tokenSet_32.member(LA(1)))) {
2703                balancedBrackets();
2704            }
2705            else if ((_tokenSet_33.member(LA(1)))) {
2706                {
2707                match(_tokenSet_33);
2708                }
2709            }
2710            else {
2711                break _loop477;
2712            }
2713            
2714        } while (true);
2715        }
2716        returnAST = balancedTokens_AST;
2717    }
2718    
2719/** Used to look ahead for a constructor
2720 */

2721    public final void constructorStart() throws RecognitionException, TokenStreamException {
2722        
2723        returnAST = null;
2724        ASTPair currentAST = new ASTPair();
2725        AST constructorStart_AST = null;
2726        Token id = null;
2727        AST id_AST = null;
2728        
2729        modifiersOpt();
2730        id = LT(1);
2731        id_AST = astFactory.create(id);
2732        match(IDENT);
2733        if (!(isConstructorIdent(id)))
2734          throw new SemanticException("isConstructorIdent(id)");
2735        nls();
2736        match(LPAREN);
2737        returnAST = constructorStart_AST;
2738    }
2739    
2740/** A list of zero or more modifiers, annotations, or "def". */
2741    public final void modifiersOpt() throws RecognitionException, TokenStreamException {
2742        
2743        returnAST = null;
2744        ASTPair currentAST = new ASTPair();
2745        AST modifiersOpt_AST = null;
2746        Token first = LT(1);
2747        
2748        {
2749        if ((_tokenSet_34.member(LA(1))) && (_tokenSet_35.member(LA(2))) && (_tokenSet_36.member(LA(3)))) {
2750            modifiersInternal();
2751            astFactory.addASTChild(currentAST, returnAST);
2752        }
2753        else if ((_tokenSet_37.member(LA(1))) && (_tokenSet_38.member(LA(2))) && (_tokenSet_39.member(LA(3)))) {
2754        }
2755        else {
2756            throw new NoViableAltException(LT(1), getFilename());
2757        }
2758        
2759        }
2760        if ( inputState.guessing==0 ) {
2761            modifiersOpt_AST = (AST)currentAST.root;
2762            modifiersOpt_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(MODIFIERS,"MODIFIERS",first,LT(1))).add(modifiersOpt_AST));
2763            currentAST.root = modifiersOpt_AST;
2764            currentAST.child = modifiersOpt_AST!=null &&modifiersOpt_AST.getFirstChild()!=null ?
2765                modifiersOpt_AST.getFirstChild() : modifiersOpt_AST;
2766            currentAST.advanceChildToEnd();
2767        }
2768        modifiersOpt_AST = (AST)currentAST.root;
2769        returnAST = modifiersOpt_AST;
2770    }
2771    
2772/** Used only as a lookahead predicate for nested type declarations. */
2773    public final void typeDeclarationStart() throws RecognitionException, TokenStreamException {
2774        
2775        returnAST = null;
2776        ASTPair currentAST = new ASTPair();
2777        AST typeDeclarationStart_AST = null;
2778        
2779        modifiersOpt();
2780        {
2781        switch ( LA(1)) {
2782        case LITERAL_class:
2783        {
2784            match(LITERAL_class);
2785            break;
2786        }
2787        case LITERAL_interface:
2788        {
2789            match(LITERAL_interface);
2790            break;
2791        }
2792        case LITERAL_enum:
2793        {
2794            match(LITERAL_enum);
2795            break;
2796        }
2797        case AT:
2798        {
2799            AST tmp89_AST = null;
2800            tmp89_AST = astFactory.create(LT(1));
2801            match(AT);
2802            match(LITERAL_interface);
2803            break;
2804        }
2805        default:
2806        {
2807            throw new NoViableAltException(LT(1), getFilename());
2808        }
2809        }
2810        }
2811        returnAST = typeDeclarationStart_AST;
2812    }
2813    
2814    public final void classTypeSpec(
2815        boolean addImagNode
2816    ) throws RecognitionException, TokenStreamException {
2817        
2818        returnAST = null;
2819        ASTPair currentAST = new ASTPair();
2820        AST classTypeSpec_AST = null;
2821        AST ct_AST = null;
2822        Token first = LT(1);
2823        
2824        classOrInterfaceType(false);
2825        ct_AST = (AST)returnAST;
2826        declaratorBrackets(ct_AST);
2827        astFactory.addASTChild(currentAST, returnAST);
2828        if ( inputState.guessing==0 ) {
2829            classTypeSpec_AST = (AST)currentAST.root;
2830            
2831            if ( addImagNode ) {
2832            classTypeSpec_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(classTypeSpec_AST));
2833            }
2834            
2835            currentAST.root = classTypeSpec_AST;
2836            currentAST.child = classTypeSpec_AST!=null &&classTypeSpec_AST.getFirstChild()!=null ?
2837                classTypeSpec_AST.getFirstChild() : classTypeSpec_AST;
2838            currentAST.advanceChildToEnd();
2839        }
2840        classTypeSpec_AST = (AST)currentAST.root;
2841        returnAST = classTypeSpec_AST;
2842    }
2843    
2844    public final void builtInTypeSpec(
2845        boolean addImagNode
2846    ) throws RecognitionException, TokenStreamException {
2847        
2848        returnAST = null;
2849        ASTPair currentAST = new ASTPair();
2850        AST builtInTypeSpec_AST = null;
2851        AST bt_AST = null;
2852        Token first = LT(1);
2853        
2854        builtInType();
2855        bt_AST = (AST)returnAST;
2856        declaratorBrackets(bt_AST);
2857        astFactory.addASTChild(currentAST, returnAST);
2858        if ( inputState.guessing==0 ) {
2859            builtInTypeSpec_AST = (AST)currentAST.root;
2860            
2861            if ( addImagNode ) {
2862            builtInTypeSpec_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(builtInTypeSpec_AST));
2863            }
2864            
2865            currentAST.root = builtInTypeSpec_AST;
2866            currentAST.child = builtInTypeSpec_AST!=null &&builtInTypeSpec_AST.getFirstChild()!=null ?
2867                builtInTypeSpec_AST.getFirstChild() : builtInTypeSpec_AST;
2868            currentAST.advanceChildToEnd();
2869        }
2870        builtInTypeSpec_AST = (AST)currentAST.root;
2871        returnAST = builtInTypeSpec_AST;
2872    }
2873    
2874    public final void classOrInterfaceType(
2875        boolean addImagNode
2876    ) throws RecognitionException, TokenStreamException {
2877        
2878        returnAST = null;
2879        ASTPair currentAST = new ASTPair();
2880        AST classOrInterfaceType_AST = null;
2881        Token first = LT(1);
2882        
2883        AST tmp91_AST = null;
2884        tmp91_AST = astFactory.create(LT(1));
2885        astFactory.makeASTRoot(currentAST, tmp91_AST);
2886        match(IDENT);
2887        {
2888        switch ( LA(1)) {
2889        case LT:
2890        {
2891            typeArguments();
2892            astFactory.addASTChild(currentAST, returnAST);
2893            break;
2894        }
2895        case EOF:
2896        case UNUSED_DO:
2897        case LITERAL_def:
2898        case AT:
2899        case IDENT:
2900        case LBRACK:
2901        case RBRACK:
2902        case DOT:
2903        case LPAREN:
2904        case LITERAL_class:
2905        case QUESTION:
2906        case LITERAL_extends:
2907        case LITERAL_super:
2908        case COMMA:
2909        case GT:
2910        case SR:
2911        case BSR:
2912        case LITERAL_void:
2913        case LITERAL_boolean:
2914        case LITERAL_byte:
2915        case LITERAL_char:
2916        case LITERAL_short:
2917        case LITERAL_int:
2918        case LITERAL_float:
2919        case LITERAL_long:
2920        case LITERAL_double:
2921        case LITERAL_any:
2922        case LITERAL_as:
2923        case RPAREN:
2924        case ASSIGN:
2925        case BAND:
2926        case LCURLY:
2927        case RCURLY:
2928        case SEMI:
2929        case NLS:
2930        case LITERAL_default:
2931        case LITERAL_implements:
2932        case LITERAL_this:
2933        case STRING_LITERAL:
2934        case TRIPLE_DOT:
2935        case CLOSURE_OP:
2936        case LOR:
2937        case BOR:
2938        case COLON:
2939        case LITERAL_if:
2940        case LITERAL_else:
2941        case LITERAL_while:
2942        case LITERAL_switch:
2943        case LITERAL_for:
2944        case LITERAL_in:
2945        case PLUS:
2946        case MINUS:
2947        case LITERAL_case:
2948        case LITERAL_try:
2949        case LITERAL_finally:
2950        case LITERAL_catch:
2951        case PLUS_ASSIGN:
2952        case MINUS_ASSIGN:
2953        case STAR_ASSIGN:
2954        case DIV_ASSIGN:
2955        case MOD_ASSIGN:
2956        case SR_ASSIGN:
2957        case BSR_ASSIGN:
2958        case SL_ASSIGN:
2959        case BAND_ASSIGN:
2960        case BXOR_ASSIGN:
2961        case BOR_ASSIGN:
2962        case STAR_STAR_ASSIGN:
2963        case LAND:
2964        case BXOR:
2965        case REGEX_FIND:
2966        case REGEX_MATCH:
2967        case NOT_EQUAL:
2968        case EQUAL:
2969        case COMPARE_TO:
2970        case INC:
2971        case DEC:
2972        case BNOT:
2973        case LNOT:
2974        case DOLLAR:
2975        case STRING_CTOR_START:
2976        case LITERAL_new:
2977        case LITERAL_true:
2978        case LITERAL_false:
2979        case LITERAL_null:
2980        case NUM_INT:
2981        case NUM_FLOAT:
2982        case NUM_LONG:
2983        case NUM_DOUBLE:
2984        case NUM_BIG_INT:
2985        case NUM_BIG_DECIMAL:
2986        {
2987            break;
2988        }
2989        default:
2990        {
2991            throw new NoViableAltException(LT(1), getFilename());
2992        }
2993        }
2994        }
2995        {
2996        _loop38:
2997        do {
2998            if ((LA(1)==DOT) && (LA(2)==IDENT) && (_tokenSet_40.member(LA(3)))) {
2999                AST tmp92_AST = null;
3000                tmp92_AST = astFactory.create(LT(1));
3001                astFactory.makeASTRoot(currentAST, tmp92_AST);
3002                match(DOT);
3003                AST tmp93_AST = null;
3004                tmp93_AST = astFactory.create(LT(1));
3005                astFactory.addASTChild(currentAST, tmp93_AST);
3006                match(IDENT);
3007                {
3008                switch ( LA(1)) {
3009                case LT:
3010                {
3011                    typeArguments();
3012                    astFactory.addASTChild(currentAST, returnAST);
3013                    break;
3014                }
3015                case EOF:
3016                case UNUSED_DO:
3017                case LITERAL_def:
3018                case AT:
3019                case IDENT:
3020                case LBRACK:
3021                case RBRACK:
3022                case DOT:
3023                case LPAREN:
3024                case LITERAL_class:
3025                case QUESTION:
3026                case LITERAL_extends:
3027                case LITERAL_super:
3028                case COMMA:
3029                case GT:
3030                case SR:
3031                case BSR:
3032                case LITERAL_void:
3033                case LITERAL_boolean:
3034                case LITERAL_byte:
3035                case LITERAL_char:
3036                case LITERAL_short:
3037                case LITERAL_int:
3038                case LITERAL_float:
3039                case LITERAL_long:
3040                case LITERAL_double:
3041                case LITERAL_any:
3042                case LITERAL_as:
3043                case RPAREN:
3044                case ASSIGN:
3045                case BAND:
3046                case LCURLY:
3047                case RCURLY:
3048                case SEMI:
3049                case NLS:
3050                case LITERAL_default:
3051                case LITERAL_implements:
3052                case LITERAL_this:
3053                case STRING_LITERAL:
3054                case TRIPLE_DOT:
3055                case CLOSURE_OP:
3056                case LOR:
3057                case BOR:
3058                case COLON:
3059                case LITERAL_if:
3060                case LITERAL_else:
3061                case LITERAL_while:
3062                case LITERAL_switch:
3063                case LITERAL_for:
3064                case LITERAL_in:
3065                case PLUS:
3066                case MINUS:
3067                case LITERAL_case:
3068                case LITERAL_try:
3069                case LITERAL_finally:
3070                case LITERAL_catch:
3071                case PLUS_ASSIGN:
3072                case MINUS_ASSIGN:
3073                case STAR_ASSIGN:
3074                case DIV_ASSIGN:
3075                case MOD_ASSIGN:
3076                case SR_ASSIGN:
3077                case BSR_ASSIGN:
3078                case SL_ASSIGN:
3079                case BAND_ASSIGN:
3080                case BXOR_ASSIGN:
3081                case BOR_ASSIGN:
3082                case STAR_STAR_ASSIGN:
3083                case LAND:
3084                case BXOR:
3085                case REGEX_FIND:
3086                case REGEX_MATCH:
3087                case NOT_EQUAL:
3088                case EQUAL:
3089                case COMPARE_TO:
3090                case INC:
3091                case DEC:
3092                case BNOT:
3093                case LNOT:
3094                case DOLLAR:
3095                case STRING_CTOR_START:
3096                case LITERAL_new:
3097                case LITERAL_true:
3098                case LITERAL_false:
3099                case LITERAL_null:
3100                case NUM_INT:
3101                case NUM_FLOAT:
3102                case NUM_LONG:
3103                case NUM_DOUBLE:
3104                case NUM_BIG_INT:
3105                case NUM_BIG_DECIMAL:
3106                {
3107                    break;
3108                }
3109                default:
3110                {
3111                    throw new NoViableAltException(LT(1), getFilename());
3112                }
3113                }
3114                }
3115            }
3116            else {
3117                break _loop38;
3118            }
3119            
3120        } while (true);
3121        }
3122        if ( inputState.guessing==0 ) {
3123            classOrInterfaceType_AST = (AST)currentAST.root;
3124            
3125            if ( addImagNode ) {
3126            classOrInterfaceType_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(classOrInterfaceType_AST));
3127            }
3128            
3129            currentAST.root = classOrInterfaceType_AST;
3130            currentAST.child = classOrInterfaceType_AST!=null &&classOrInterfaceType_AST.getFirstChild()!=null ?
3131                classOrInterfaceType_AST.getFirstChild() : classOrInterfaceType_AST;
3132            currentAST.advanceChildToEnd();
3133        }
3134        classOrInterfaceType_AST = (AST)currentAST.root;
3135        returnAST = classOrInterfaceType_AST;
3136    }
3137    
3138/** After some type names, where zero or more empty bracket pairs are allowed.
3139 * We use ARRAY_DECLARATOR to represent this.
3140 * TODO: Is there some more Groovy way to view this in terms of the indexed property syntax?
3141 */

3142    public final void declaratorBrackets(
3143        AST typ
3144    ) throws RecognitionException, TokenStreamException {
3145        
3146        returnAST = null;
3147        ASTPair currentAST = new ASTPair();
3148        AST declaratorBrackets_AST = null;
3149        Token lb = null;
3150        AST lb_AST = null;
3151        
3152        if ( inputState.guessing==0 ) {
3153            declaratorBrackets_AST = (AST)currentAST.root;
3154            declaratorBrackets_AST=typ;
3155            currentAST.root = declaratorBrackets_AST;
3156            currentAST.child = declaratorBrackets_AST!=null &&declaratorBrackets_AST.getFirstChild()!=null ?
3157                declaratorBrackets_AST.getFirstChild() : declaratorBrackets_AST;
3158            currentAST.advanceChildToEnd();
3159        }
3160        {
3161        _loop200:
3162        do {
3163            if ((LA(1)==LBRACK) && (LA(2)==RBRACK) && (_tokenSet_41.member(LA(3)))) {
3164                lb = LT(1);
3165                lb_AST = astFactory.create(lb);
3166                astFactory.makeASTRoot(currentAST, lb_AST);
3167                match(LBRACK);
3168                if ( inputState.guessing==0 ) {
3169                    lb_AST.setType(ARRAY_DECLARATOR);
3170                }
3171                match(RBRACK);
3172            }
3173            else {
3174                break _loop200;
3175            }
3176            
3177        } while (true);
3178        }
3179        declaratorBrackets_AST = (AST)currentAST.root;
3180        returnAST = declaratorBrackets_AST;
3181    }
3182    
3183    public final void typeArguments() throws RecognitionException, TokenStreamException {
3184        
3185        returnAST = null;
3186        ASTPair currentAST = new ASTPair();
3187        AST typeArguments_AST = null;
3188        Token first = LT(1);
3189        int currentLtLevel = 0;
3190        
3191        if ( inputState.guessing==0 ) {
3192            currentLtLevel = ltCounter;
3193        }
3194        match(LT);
3195        if ( inputState.guessing==0 ) {
3196            ltCounter++;
3197        }
3198        nls();
3199        typeArgument();
3200        astFactory.addASTChild(currentAST, returnAST);
3201        {
3202        _loop48:
3203        do {
3204            if (((LA(1)==COMMA) && (_tokenSet_42.member(LA(2))) && (_tokenSet_40.member(LA(3))))&&(inputState.guessing !=0 || ltCounter == currentLtLevel + 1)) {
3205                match(COMMA);
3206                nls();
3207                typeArgument();
3208                astFactory.addASTChild(currentAST, returnAST);
3209            }
3210            else {
3211                break _loop48;
3212            }
3213            
3214        } while (true);
3215        }
3216        nls();
3217        {
3218        if (((LA(1) >= GT && LA(1) <= BSR)) && (_tokenSet_41.member(LA(2))) && (_tokenSet_5.member(LA(3)))) {
3219            typeArgumentsOrParametersEnd();
3220            astFactory.addASTChild(currentAST, returnAST);
3221        }
3222        else if ((_tokenSet_41.member(LA(1))) && (_tokenSet_5.member(LA(2))) && (_tokenSet_5.member(LA(3)))) {
3223        }
3224        else {
3225            throw new NoViableAltException(LT(1), getFilename());
3226        }
3227        
3228        }
3229        if (!((currentLtLevel != 0) || ltCounter == currentLtLevel))
3230          throw new SemanticException("(currentLtLevel != 0) || ltCounter == currentLtLevel");
3231        if ( inputState.guessing==0 ) {
3232            typeArguments_AST = (AST)currentAST.root;
3233            typeArguments_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE_ARGUMENTS,"TYPE_ARGUMENTS",first,LT(1))).add(typeArguments_AST));
3234            currentAST.root = typeArguments_AST;
3235            currentAST.child = typeArguments_AST!=null &&typeArguments_AST.getFirstChild()!=null ?
3236                typeArguments_AST.getFirstChild() : typeArguments_AST;
3237            currentAST.advanceChildToEnd();
3238        }
3239        typeArguments_AST = (AST)currentAST.root;
3240        returnAST = typeArguments_AST;
3241    }
3242    
3243    public final void typeArgumentSpec() throws RecognitionException, TokenStreamException {
3244        
3245        returnAST = null;
3246        ASTPair currentAST = new ASTPair();
3247        AST typeArgumentSpec_AST = null;
3248        
3249        switch ( LA(1)) {
3250        case IDENT:
3251        {
3252            classTypeSpec(true);
3253            astFactory.addASTChild(currentAST, returnAST);
3254            typeArgumentSpec_AST = (AST)currentAST.root;
3255            break;
3256        }
3257        case LITERAL_void:
3258        case LITERAL_boolean:
3259        case LITERAL_byte:
3260        case LITERAL_char:
3261        case LITERAL_short:
3262        case LITERAL_int:
3263        case LITERAL_float:
3264        case LITERAL_long:
3265        case LITERAL_double:
3266        case LITERAL_any:
3267        {
3268            builtInTypeArraySpec(true);
3269            astFactory.addASTChild(currentAST, returnAST);
3270            typeArgumentSpec_AST = (AST)currentAST.root;
3271            break;
3272        }
3273        default:
3274        {
3275            throw new NoViableAltException(LT(1), getFilename());
3276        }
3277        }
3278        returnAST = typeArgumentSpec_AST;
3279    }
3280    
3281    public final void builtInTypeArraySpec(
3282        boolean addImagNode
3283    ) throws RecognitionException, TokenStreamException {
3284        
3285        returnAST = null;
3286        ASTPair currentAST = new ASTPair();
3287        AST builtInTypeArraySpec_AST = null;
3288        AST bt_AST = null;
3289        Token first = LT(1);
3290        
3291        builtInType();
3292        bt_AST = (AST)returnAST;
3293        {
3294        boolean synPredMatched56 = false;
3295        if (((_tokenSet_41.member(LA(1))) && (_tokenSet_5.member(LA(2))) && (_tokenSet_5.member(LA(3))))) {
3296            int _m56 = mark();
3297            synPredMatched56 = true;
3298            inputState.guessing++;
3299            try {
3300                {
3301                match(LBRACK);
3302                }
3303            }
3304            catch (RecognitionException pe) {
3305                synPredMatched56 = false;
3306            }
3307            rewind(_m56);
3308            inputState.guessing--;
3309        }
3310        if ( synPredMatched56 ) {
3311            declaratorBrackets(bt_AST);
3312            astFactory.addASTChild(currentAST, returnAST);
3313        }
3314        else if ((_tokenSet_41.member(LA(1))) && (_tokenSet_5.member(LA(2))) && (_tokenSet_5.member(LA(3)))) {
3315            if ( inputState.guessing==0 ) {
3316                require(false,
3317                "primitive type parameters not allowed here",
3318                "use the corresponding wrapper type, such as Integer for int"
3319                );
3320            }
3321        }
3322        else {
3323            throw new NoViableAltException(LT(1), getFilename());
3324        }
3325        
3326        }
3327        if ( inputState.guessing==0 ) {
3328            builtInTypeArraySpec_AST = (AST)currentAST.root;
3329            
3330            if ( addImagNode ) {
3331            builtInTypeArraySpec_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(builtInTypeArraySpec_AST));
3332            }
3333            
3334            currentAST.root = builtInTypeArraySpec_AST;
3335            currentAST.child = builtInTypeArraySpec_AST!=null &&builtInTypeArraySpec_AST.getFirstChild()!=null ?
3336                builtInTypeArraySpec_AST.getFirstChild() : builtInTypeArraySpec_AST;
3337            currentAST.advanceChildToEnd();
3338        }
3339        builtInTypeArraySpec_AST = (AST)currentAST.root;
3340        returnAST = builtInTypeArraySpec_AST;
3341    }
3342    
3343    public final void typeArgument() throws RecognitionException, TokenStreamException {
3344        
3345        returnAST = null;
3346        ASTPair currentAST = new ASTPair();
3347        AST typeArgument_AST = null;
3348        Token first = LT(1);
3349        
3350        {
3351        switch ( LA(1)) {
3352        case IDENT:
3353        case LITERAL_void:
3354        case LITERAL_boolean:
3355        case LITERAL_byte:
3356        case LITERAL_char:
3357        case LITERAL_short:
3358        case LITERAL_int:
3359        case LITERAL_float:
3360        case LITERAL_long:
3361        case LITERAL_double:
3362        case LITERAL_any:
3363        {
3364            typeArgumentSpec();
3365            astFactory.addASTChild(currentAST, returnAST);
3366            break;
3367        }
3368        case QUESTION:
3369        {
3370            wildcardType();
3371            astFactory.addASTChild(currentAST, returnAST);
3372            break;
3373        }
3374        default:
3375        {
3376            throw new NoViableAltException(LT(1), getFilename());
3377        }
3378        }
3379        }
3380        if ( inputState.guessing==0 ) {
3381            typeArgument_AST = (AST)currentAST.root;
3382            typeArgument_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE_ARGUMENT,"TYPE_ARGUMENT",first,LT(1))).add(typeArgument_AST));
3383            currentAST.root = typeArgument_AST;
3384            currentAST.child = typeArgument_AST!=null &&typeArgument_AST.getFirstChild()!=null ?
3385                typeArgument_AST.getFirstChild() : typeArgument_AST;
3386            currentAST.advanceChildToEnd();
3387        }
3388        typeArgument_AST = (AST)currentAST.root;
3389        returnAST = typeArgument_AST;
3390    }
3391    
3392    public final void wildcardType() throws RecognitionException, TokenStreamException {
3393        
3394        returnAST = null;
3395        ASTPair currentAST = new ASTPair();
3396        AST wildcardType_AST = null;
3397        Token q = null;
3398        AST q_AST = null;
3399        
3400        q = LT(1);
3401        q_AST = astFactory.create(q);
3402        astFactory.makeASTRoot(currentAST, q_AST);
3403        match(QUESTION);
3404        if ( inputState.guessing==0 ) {
3405            q_AST.setType(WILDCARD_TYPE);
3406        }
3407        {
3408        boolean synPredMatched45 = false;
3409        if (((LA(1)==LITERAL_extends||LA(1)==LITERAL_super) && (LA(2)==IDENT||LA(2)==NLS) && (_tokenSet_40.member(LA(3))))) {
3410            int _m45 = mark();
3411            synPredMatched45 = true;
3412            inputState.guessing++;
3413            try {
3414                {
3415                switch ( LA(1)) {
3416                case LITERAL_extends:
3417                {
3418                    match(LITERAL_extends);
3419                    break;
3420                }
3421                case LITERAL_super:
3422                {
3423                    match(LITERAL_super);
3424                    break;
3425                }
3426                default:
3427                {
3428                    throw new NoViableAltException(LT(1), getFilename());
3429                }
3430                }
3431                }
3432            }
3433            catch (RecognitionException pe) {
3434                synPredMatched45 = false;
3435            }
3436            rewind(_m45);
3437            inputState.guessing--;
3438        }
3439        if ( synPredMatched45 ) {
3440            typeArgumentBounds();
3441            astFactory.addASTChild(currentAST, returnAST);
3442        }
3443        else if ((_tokenSet_41.member(LA(1))) && (_tokenSet_5.member(LA(2))) && (_tokenSet_5.member(LA(3)))) {
3444        }
3445        else {
3446            throw new NoViableAltException(LT(1), getFilename());
3447        }
3448        
3449        }
3450        wildcardType_AST = (AST)currentAST.root;
3451        returnAST = wildcardType_AST;
3452    }
3453    
3454    public final void typeArgumentBounds() throws RecognitionException, TokenStreamException {
3455        
3456        returnAST = null;
3457        ASTPair currentAST = new ASTPair();
3458        AST typeArgumentBounds_AST = null;
3459        Token first = LT(1);boolean isUpperBounds = false;
3460        
3461        {
3462        switch ( LA(1)) {
3463        case LITERAL_extends:
3464        {
3465            match(LITERAL_extends);
3466            if ( inputState.guessing==0 ) {
3467                isUpperBounds=true;
3468            }
3469            break;
3470        }
3471        case LITERAL_super:
3472        {
3473            match(LITERAL_super);
3474            break;
3475        }
3476        default:
3477        {
3478            throw new NoViableAltException(LT(1), getFilename());
3479        }
3480        }
3481        }
3482        nls();
3483        classOrInterfaceType(false);
3484        astFactory.addASTChild(currentAST, returnAST);
3485        nls();
3486        if ( inputState.guessing==0 ) {
3487            typeArgumentBounds_AST = (AST)currentAST.root;
3488            
3489            if (isUpperBounds)
3490            {
3491            typeArgumentBounds_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE_UPPER_BOUNDS,"TYPE_UPPER_BOUNDS",first,LT(1))).add(typeArgumentBounds_AST));
3492            }
3493            else
3494            {
3495            typeArgumentBounds_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE_LOWER_BOUNDS,"TYPE_LOWER_BOUNDS",first,LT(1))).add(typeArgumentBounds_AST));
3496            }
3497            
3498            currentAST.root = typeArgumentBounds_AST;
3499            currentAST.child = typeArgumentBounds_AST!=null &&typeArgumentBounds_AST.getFirstChild()!=null ?
3500                typeArgumentBounds_AST.getFirstChild() : typeArgumentBounds_AST;
3501            currentAST.advanceChildToEnd();
3502        }
3503        typeArgumentBounds_AST = (AST)currentAST.root;
3504        returnAST = typeArgumentBounds_AST;
3505    }
3506    
3507    protected final void typeArgumentsOrParametersEnd() throws RecognitionException, TokenStreamException {
3508        
3509        returnAST = null;
3510        ASTPair currentAST = new ASTPair();
3511        AST typeArgumentsOrParametersEnd_AST = null;
3512        
3513        switch ( LA(1)) {
3514        case GT:
3515        {
3516            match(GT);
3517            if ( inputState.guessing==0 ) {
3518                ltCounter-=1;
3519            }
3520            nls();
3521            typeArgumentsOrParametersEnd_AST = (AST)currentAST.root;
3522            break;
3523        }
3524        case SR:
3525        {
3526            match(SR);
3527            if ( inputState.guessing==0 ) {
3528                ltCounter-=2;
3529            }
3530            nls();
3531            typeArgumentsOrParametersEnd_AST = (AST)currentAST.root;
3532            break;
3533        }
3534        case BSR:
3535        {
3536            match(BSR);
3537            if ( inputState.guessing==0 ) {
3538                ltCounter-=3;
3539            }
3540            nls();
3541            typeArgumentsOrParametersEnd_AST = (AST)currentAST.root;
3542            break;
3543        }
3544        default:
3545        {
3546            throw new NoViableAltException(LT(1), getFilename());
3547        }
3548        }
3549        returnAST = typeArgumentsOrParametersEnd_AST;
3550    }
3551    
3552    public final void type() throws RecognitionException, TokenStreamException {
3553        
3554        returnAST = null;
3555        ASTPair currentAST = new ASTPair();
3556        AST type_AST = null;
3557        
3558        switch ( LA(1)) {
3559        case IDENT:
3560        {
3561            classOrInterfaceType(false);
3562            astFactory.addASTChild(currentAST, returnAST);
3563            type_AST = (AST)currentAST.root;
3564            break;
3565        }
3566        case LITERAL_void:
3567        case LITERAL_boolean:
3568        case LITERAL_byte:
3569        case LITERAL_char:
3570        case LITERAL_short:
3571        case LITERAL_int:
3572        case LITERAL_float:
3573        case LITERAL_long:
3574        case LITERAL_double:
3575        case LITERAL_any:
3576        {
3577            builtInType();
3578            astFactory.addASTChild(currentAST, returnAST);
3579            type_AST = (AST)currentAST.root;
3580            break;
3581        }
3582        default:
3583        {
3584            throw new NoViableAltException(LT(1), getFilename());
3585        }
3586        }
3587        returnAST = type_AST;
3588    }
3589    
3590    public final void modifiersInternal() throws RecognitionException, TokenStreamException {
3591        
3592        returnAST = null;
3593        ASTPair currentAST = new ASTPair();
3594        AST modifiersInternal_AST = null;
3595        int seenDef = 0;
3596        
3597        {
3598        int _cnt69=0;
3599        _loop69:
3600        do {
3601            if (((LA(1)==LITERAL_def))&&(seenDef++ == 0)) {
3602                match(LITERAL_def);
3603                nls();
3604            }
3605            else if ((_tokenSet_43.member(LA(1)))) {
3606                modifier();
3607                astFactory.addASTChild(currentAST, returnAST);
3608                nls();
3609            }
3610            else if (((LA(1)==AT) && (LA(2)==IDENT) && (_tokenSet_44.member(LA(3))))&&(LA(1)==AT && !LT(2).getText().equals("interface"))) {
3611                annotation();
3612                astFactory.addASTChild(currentAST, returnAST);
3613                nls();
3614            }
3615            else {
3616                if ( _cnt69>=1 ) { break _loop69; } else {throw new NoViableAltException(LT(1), getFilename());}
3617            }
3618            
3619            _cnt69++;
3620        } while (true);
3621        }
3622        modifiersInternal_AST = (AST)currentAST.root;
3623        returnAST = modifiersInternal_AST;
3624    }
3625    
3626    public final void annotation() throws RecognitionException, TokenStreamException {
3627        
3628        returnAST = null;
3629        ASTPair currentAST = new ASTPair();
3630        AST annotation_AST = null;
3631        AST i_AST = null;
3632        AST args_AST = null;
3633        Token first = LT(1);
3634        
3635        match(AT);
3636        identifier();
3637        i_AST = (AST)returnAST;
3638        {
3639        switch ( LA(1)) {
3640        case LPAREN:
3641        {
3642            match(LPAREN);
3643            {
3644            switch ( LA(1)) {
3645            case AT:
3646            case IDENT:
3647            case LBRACK:
3648            case LPAREN:
3649            case LITERAL_super:
3650            case LITERAL_void:
3651            case LITERAL_boolean:
3652            case LITERAL_byte:
3653            case LITERAL_char:
3654            case LITERAL_short:
3655            case LITERAL_int:
3656            case LITERAL_float:
3657            case LITERAL_long:
3658            case LITERAL_double:
3659            case LITERAL_any:
3660            case LCURLY:
3661            case LITERAL_this:
3662            case STRING_LITERAL:
3663            case PLUS:
3664            case MINUS:
3665            case INC:
3666            case DEC:
3667            case BNOT:
3668            case LNOT:
3669            case DOLLAR:
3670            case STRING_CTOR_START:
3671            case LITERAL_new:
3672            case LITERAL_true:
3673            case LITERAL_false:
3674            case LITERAL_null:
3675            case NUM_INT:
3676            case NUM_FLOAT:
3677            case NUM_LONG:
3678            case NUM_DOUBLE:
3679            case NUM_BIG_INT:
3680            case NUM_BIG_DECIMAL:
3681            {
3682                annotationArguments();
3683                args_AST = (AST)returnAST;
3684                break;
3685            }
3686            case RPAREN:
3687            {
3688                break;
3689            }
3690            default:
3691            {
3692                throw new NoViableAltException(LT(1), getFilename());
3693            }
3694            }
3695            }
3696            match(RPAREN);
3697            break;
3698        }
3699        case EOF:
3700        case FINAL:
3701        case ABSTRACT:
3702        case STRICTFP:
3703        case LITERAL_package:
3704        case LITERAL_static:
3705        case LITERAL_def:
3706        case AT:
3707        case IDENT:
3708        case RBRACK:
3709        case LITERAL_class:
3710        case LITERAL_interface:
3711        case LITERAL_enum:
3712        case LT:
3713        case COMMA:
3714        case LITERAL_void:
3715        case LITERAL_boolean:
3716        case LITERAL_byte:
3717        case LITERAL_char:
3718        case LITERAL_short:
3719        case LITERAL_int:
3720        case LITERAL_float:
3721        case LITERAL_long:
3722        case LITERAL_double:
3723        case LITERAL_any:
3724        case LITERAL_private:
3725        case LITERAL_public:
3726        case LITERAL_protected:
3727        case LITERAL_transient:
3728        case LITERAL_native:
3729        case LITERAL_threadsafe:
3730        case LITERAL_synchronized:
3731        case LITERAL_volatile:
3732        case RPAREN:
3733        case RCURLY:
3734        case SEMI:
3735        case NLS:
3736        case STRING_LITERAL:
3737        case TRIPLE_DOT:
3738        {
3739            break;
3740        }
3741        default:
3742        {
3743            throw new NoViableAltException(LT(1), getFilename());
3744        }
3745        }
3746        }
3747        if ( inputState.guessing==0 ) {
3748            annotation_AST = (AST)currentAST.root;
3749            annotation_AST = (AST)astFactory.make( (new ASTArray(3)).add(create(ANNOTATION,"ANNOTATION",first,LT(1))).add(i_AST).add(args_AST));
3750            currentAST.root = annotation_AST;
3751            currentAST.child = annotation_AST!=null &&annotation_AST.getFirstChild()!=null ?
3752                annotation_AST.getFirstChild() : annotation_AST;
3753            currentAST.advanceChildToEnd();
3754        }
3755        returnAST = annotation_AST;
3756    }
3757    
3758    public final void annotationArguments() throws RecognitionException, TokenStreamException {
3759        
3760        returnAST = null;
3761        ASTPair currentAST = new ASTPair();
3762        AST annotationArguments_AST = null;
3763        
3764        if ((_tokenSet_45.member(LA(1))) && (_tokenSet_46.member(LA(2)))) {
3765            annotationMemberValueInitializer();
3766            astFactory.addASTChild(currentAST, returnAST);
3767            annotationArguments_AST = (AST)currentAST.root;
3768        }
3769        else if ((LA(1)==IDENT) && (LA(2)==ASSIGN)) {
3770            anntotationMemberValuePairs();
3771            astFactory.addASTChild(currentAST, returnAST);
3772            annotationArguments_AST = (AST)currentAST.root;
3773        }
3774        else {
3775            throw new NoViableAltException(LT(1), getFilename());
3776        }
3777        
3778        returnAST = annotationArguments_AST;
3779    }
3780    
3781    public final void annotationMemberValueInitializer() throws RecognitionException, TokenStreamException {
3782        
3783        returnAST = null;
3784        ASTPair currentAST = new ASTPair();
3785        AST annotationMemberValueInitializer_AST = null;
3786        
3787        switch ( LA(1)) {
3788        case IDENT:
3789        case LBRACK:
3790        case LPAREN:
3791        case LITERAL_super:
3792        case LITERAL_void:
3793        case LITERAL_boolean:
3794        case LITERAL_byte:
3795        case LITERAL_char:
3796        case LITERAL_short:
3797        case LITERAL_int:
3798        case LITERAL_float:
3799        case LITERAL_long:
3800        case LITERAL_double:
3801        case LITERAL_any:
3802        case LCURLY:
3803        case LITERAL_this:
3804        case STRING_LITERAL:
3805        case PLUS:
3806        case MINUS:
3807        case INC:
3808        case DEC:
3809        case BNOT:
3810        case LNOT:
3811        case DOLLAR:
3812        case STRING_CTOR_START:
3813        case LITERAL_new:
3814        case LITERAL_true:
3815        case LITERAL_false:
3816        case LITERAL_null:
3817        case NUM_INT:
3818        case NUM_FLOAT:
3819        case NUM_LONG:
3820        case NUM_DOUBLE:
3821        case NUM_BIG_INT:
3822        case NUM_BIG_DECIMAL:
3823        {
3824            conditionalExpression(0);
3825            astFactory.addASTChild(currentAST, returnAST);
3826            annotationMemberValueInitializer_AST = (AST)currentAST.root;
3827            break;
3828        }
3829        case AT:
3830        {
3831            annotation();
3832            astFactory.addASTChild(currentAST, returnAST);
3833            annotationMemberValueInitializer_AST = (AST)currentAST.root;
3834            break;
3835        }
3836        default:
3837        {
3838            throw new NoViableAltException(LT(1), getFilename());
3839        }
3840        }
3841        returnAST = annotationMemberValueInitializer_AST;
3842    }
3843    
3844    public final void anntotationMemberValuePairs() throws RecognitionException, TokenStreamException {
3845        
3846        returnAST = null;
3847        ASTPair currentAST = new ASTPair();
3848        AST anntotationMemberValuePairs_AST = null;
3849        
3850        annotationMemberValuePair();
3851        astFactory.addASTChild(currentAST, returnAST);
3852        {
3853        _loop83:
3854        do {
3855            if ((LA(1)==COMMA)) {
3856                match(COMMA);
3857                nls();
3858                annotationMemberValuePair();
3859                astFactory.addASTChild(currentAST, returnAST);
3860            }
3861            else {
3862                break _loop83;
3863            }
3864            
3865        } while (true);
3866        }
3867        anntotationMemberValuePairs_AST = (AST)currentAST.root;
3868        returnAST = anntotationMemberValuePairs_AST;
3869    }
3870    
3871    public final void annotationMemberValuePair() throws RecognitionException, TokenStreamException {
3872        
3873        returnAST = null;
3874        ASTPair currentAST = new ASTPair();
3875        AST annotationMemberValuePair_AST = null;
3876        Token i = null;
3877        AST i_AST = null;
3878        AST v_AST = null;
3879        Token first = LT(1);
3880        
3881        i = LT(1);
3882        i_AST = astFactory.create(i);
3883        match(IDENT);
3884        match(ASSIGN);
3885        nls();
3886        annotationMemberValueInitializer();
3887        v_AST = (AST)returnAST;
3888        if ( inputState.guessing==0 ) {
3889            annotationMemberValuePair_AST = (AST)currentAST.root;
3890            annotationMemberValuePair_AST = (AST)astFactory.make( (new ASTArray(3)).add(create(ANNOTATION_MEMBER_VALUE_PAIR,"ANNOTATION_MEMBER_VALUE_PAIR",first,LT(1))).add(i_AST).add(v_AST));
3891            currentAST.root = annotationMemberValuePair_AST;
3892            currentAST.child = annotationMemberValuePair_AST!=null &&annotationMemberValuePair_AST.getFirstChild()!=null ?
3893                annotationMemberValuePair_AST.getFirstChild() : annotationMemberValuePair_AST;
3894            currentAST.advanceChildToEnd();
3895        }
3896        returnAST = annotationMemberValuePair_AST;
3897    }
3898    
3899    public final void conditionalExpression(
3900        int lc_stmt
3901    ) throws RecognitionException, TokenStreamException {
3902        
3903        returnAST = null;
3904        ASTPair currentAST = new ASTPair();
3905        AST conditionalExpression_AST = null;
3906        
3907        logicalOrExpression(lc_stmt);
3908        astFactory.addASTChild(currentAST, returnAST);
3909        {
3910        switch ( LA(1)) {
3911        case QUESTION:
3912        {
3913            AST tmp108_AST = null;
3914            tmp108_AST = astFactory.create(LT(1));
3915            astFactory.makeASTRoot(currentAST, tmp108_AST);
3916            match(QUESTION);
3917            nls();
3918            assignmentExpression(0);
3919            astFactory.addASTChild(currentAST, returnAST);
3920            match(COLON);
3921            nls();
3922            conditionalExpression(0);
3923            astFactory.addASTChild(currentAST, returnAST);
3924            break;
3925        }
3926        case EOF:
3927        case IDENT:
3928        case LBRACK:
3929        case RBRACK:
3930        case LPAREN:
3931        case LITERAL_super:
3932        case COMMA:
3933        case LITERAL_void:
3934        case LITERAL_boolean:
3935        case LITERAL_byte:
3936        case LITERAL_char:
3937        case LITERAL_short:
3938        case LITERAL_int:
3939        case LITERAL_float:
3940        case LITERAL_long:
3941        case LITERAL_double:
3942        case LITERAL_any:
3943        case RPAREN:
3944        case ASSIGN:
3945        case LCURLY:
3946        case RCURLY:
3947        case SEMI:
3948        case NLS:
3949        case LITERAL_default:
3950        case LITERAL_this:
3951        case STRING_LITERAL:
3952        case CLOSURE_OP:
3953        case COLON:
3954        case LITERAL_else:
3955        case PLUS:
3956        case MINUS:
3957        case LITERAL_case:
3958        case PLUS_ASSIGN:
3959        case MINUS_ASSIGN:
3960        case STAR_ASSIGN:
3961        case DIV_ASSIGN:
3962        case MOD_ASSIGN:
3963        case SR_ASSIGN:
3964        case BSR_ASSIGN:
3965        case SL_ASSIGN:
3966        case BAND_ASSIGN:
3967        case BXOR_ASSIGN:
3968        case BOR_ASSIGN:
3969        case STAR_STAR_ASSIGN:
3970        case INC:
3971        case DEC:
3972        case BNOT:
3973        case LNOT:
3974        case DOLLAR:
3975        case STRING_CTOR_START:
3976        case LITERAL_new:
3977        case LITERAL_true:
3978        case LITERAL_false:
3979        case LITERAL_null:
3980        case NUM_INT:
3981        case NUM_FLOAT:
3982        case NUM_LONG:
3983        case NUM_DOUBLE:
3984        case NUM_BIG_INT:
3985        case NUM_BIG_DECIMAL:
3986        {
3987            break;
3988        }
3989        default:
3990        {
3991            throw new NoViableAltException(LT(1), getFilename());
3992        }
3993        }
3994        }
3995        conditionalExpression_AST = (AST)currentAST.root;
3996        returnAST = conditionalExpression_AST;
3997    }
3998    
3999    public final void annotationMemberArrayValueInitializer() throws RecognitionException, TokenStreamException {
4000        
4001        returnAST = null;
4002        ASTPair currentAST = new ASTPair();
4003        AST annotationMemberArrayValueInitializer_AST = null;
4004        
4005        switch ( LA(1)) {
4006        case IDENT:
4007        case LBRACK:
4008        case LPAREN:
4009        case LITERAL_super:
4010        case LITERAL_void:
4011        case LITERAL_boolean:
4012        case LITERAL_byte:
4013        case LITERAL_char:
4014        case LITERAL_short:
4015        case LITERAL_int:
4016        case LITERAL_float:
4017        case LITERAL_long:
4018        case LITERAL_double:
4019        case LITERAL_any:
4020        case LCURLY:
4021        case LITERAL_this:
4022        case STRING_LITERAL:
4023        case PLUS:
4024        case MINUS:
4025        case INC:
4026        case DEC:
4027        case BNOT:
4028        case LNOT:
4029        case DOLLAR:
4030        case STRING_CTOR_START:
4031        case LITERAL_new:
4032        case LITERAL_true:
4033        case LITERAL_false:
4034        case LITERAL_null:
4035        case NUM_INT:
4036        case NUM_FLOAT:
4037        case NUM_LONG:
4038        case NUM_DOUBLE:
4039        case NUM_BIG_INT:
4040        case NUM_BIG_DECIMAL:
4041        {
4042            conditionalExpression(0);
4043            astFactory.addASTChild(currentAST, returnAST);
4044            annotationMemberArrayValueInitializer_AST = (AST)currentAST.root;
4045            break;
4046        }
4047        case AT:
4048        {
4049            annotation();
4050            astFactory.addASTChild(currentAST, returnAST);
4051            nls();
4052            annotationMemberArrayValueInitializer_AST = (AST)currentAST.root;
4053            break;
4054        }
4055        default:
4056        {
4057            throw new NoViableAltException(LT(1), getFilename());
4058        }
4059        }
4060        returnAST = annotationMemberArrayValueInitializer_AST;
4061    }
4062    
4063    public final void superClassClause() throws RecognitionException, TokenStreamException {
4064        
4065        returnAST = null;
4066        ASTPair currentAST = new ASTPair();
4067        AST superClassClause_AST = null;
4068        AST c_AST = null;
4069        Token first = LT(1);
4070        
4071        {
4072        switch ( LA(1)) {
4073        case LITERAL_extends:
4074        {
4075            match(LITERAL_extends);
4076            nls();
4077            classOrInterfaceType(false);
4078            c_AST = (AST)returnAST;
4079            nls();
4080            break;
4081        }
4082        case LCURLY:
4083        case LITERAL_implements:
4084        {
4085            break;
4086        }
4087        default:
4088        {
4089            throw new NoViableAltException(LT(1), getFilename());
4090        }
4091        }
4092        }
4093        if ( inputState.guessing==0 ) {
4094            superClassClause_AST = (AST)currentAST.root;
4095            superClassClause_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(EXTENDS_CLAUSE,"EXTENDS_CLAUSE",first,LT(1))).add(c_AST));
4096            currentAST.root = superClassClause_AST;
4097            currentAST.child = superClassClause_AST!=null &&superClassClause_AST.getFirstChild()!=null ?
4098                superClassClause_AST.getFirstChild() : superClassClause_AST;
4099            currentAST.advanceChildToEnd();
4100        }
4101        returnAST = superClassClause_AST;
4102    }
4103    
4104    public final void typeParameters() throws RecognitionException, TokenStreamException {
4105        
4106        returnAST = null;
4107        ASTPair currentAST = new ASTPair();
4108        AST typeParameters_AST = null;
4109        Token first = LT(1);int currentLtLevel = 0;
4110        
4111        if ( inputState.guessing==0 ) {
4112            currentLtLevel = ltCounter;
4113        }
4114        match(LT);
4115        if ( inputState.guessing==0 ) {
4116            ltCounter++;
4117        }
4118        nls();
4119        typeParameter();
4120        astFactory.addASTChild(currentAST, returnAST);
4121        {
4122        _loop97:
4123        do {
4124            if ((LA(1)==COMMA)) {
4125                match(COMMA);
4126                nls();
4127                typeParameter();
4128                astFactory.addASTChild(currentAST, returnAST);
4129            }
4130            else {
4131                break _loop97;
4132            }
4133            
4134        } while (true);
4135        }
4136        nls();
4137        {
4138        switch ( LA(1)) {
4139        case GT:
4140        case SR:
4141        case BSR:
4142        {
4143            typeArgumentsOrParametersEnd();
4144            astFactory.addASTChild(currentAST, returnAST);
4145            break;
4146        }
4147        case IDENT:
4148        case LITERAL_extends:
4149        case LITERAL_void:
4150        case LITERAL_boolean:
4151        case LITERAL_byte:
4152        case LITERAL_char:
4153        case LITERAL_short:
4154        case LITERAL_int:
4155        case LITERAL_float:
4156        case LITERAL_long:
4157        case LITERAL_double:
4158        case LITERAL_any:
4159        case LCURLY:
4160        case LITERAL_implements:
4161        {
4162            break;
4163        }
4164        default:
4165        {
4166            throw new NoViableAltException(LT(1), getFilename());
4167        }
4168        }
4169        }
4170        if (!((currentLtLevel != 0) || ltCounter == currentLtLevel))
4171          throw new SemanticException("(currentLtLevel != 0) || ltCounter == currentLtLevel");
4172        if ( inputState.guessing==0 ) {
4173            typeParameters_AST = (AST)currentAST.root;
4174            typeParameters_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE_PARAMETERS,"TYPE_PARAMETERS",first,LT(1))).add(typeParameters_AST));
4175            currentAST.root = typeParameters_AST;
4176            currentAST.child = typeParameters_AST!=null &&typeParameters_AST.getFirstChild()!=null ?
4177                typeParameters_AST.getFirstChild() : typeParameters_AST;
4178            currentAST.advanceChildToEnd();
4179        }
4180        typeParameters_AST = (AST)currentAST.root;
4181        returnAST = typeParameters_AST;
4182    }
4183    
4184    public final void implementsClause() throws RecognitionException, TokenStreamException {
4185        
4186        returnAST = null;
4187        ASTPair currentAST = new ASTPair();
4188        AST implementsClause_AST = null;
4189        Token i = null;
4190        AST i_AST = null;
4191        Token first = LT(1);
4192        
4193        {
4194        switch ( LA(1)) {
4195        case LITERAL_implements:
4196        {
4197            i = LT(1);
4198            i_AST = astFactory.create(i);
4199            match(LITERAL_implements);
4200            nls();
4201            classOrInterfaceType(false);
4202            astFactory.addASTChild(currentAST, returnAST);
4203            {
4204            _loop163:
4205            do {
4206                if ((LA(1)==COMMA)) {
4207                    match(COMMA);
4208                    nls();
4209                    classOrInterfaceType(false);
4210                    astFactory.addASTChild(currentAST, returnAST);
4211                }
4212                else {
4213                    break _loop163;
4214                }
4215                
4216            } while (true);
4217            }
4218            nls();
4219            break;
4220        }
4221        case LCURLY:
4222        {
4223            break;
4224        }
4225        default:
4226        {
4227            throw new NoViableAltException(LT(1), getFilename());
4228        }
4229        }
4230        }
4231        if ( inputState.guessing==0 ) {
4232            implementsClause_AST = (AST)currentAST.root;
4233            implementsClause_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(IMPLEMENTS_CLAUSE,"IMPLEMENTS_CLAUSE",first,LT(1))).add(implementsClause_AST));
4234            currentAST.root = implementsClause_AST;
4235            currentAST.child = implementsClause_AST!=null &&implementsClause_AST.getFirstChild()!=null ?
4236                implementsClause_AST.getFirstChild() : implementsClause_AST;
4237            currentAST.advanceChildToEnd();
4238        }
4239        implementsClause_AST = (AST)currentAST.root;
4240        returnAST = implementsClause_AST;
4241    }
4242    
4243    public final void classBlock() throws RecognitionException, TokenStreamException {
4244        
4245        returnAST = null;
4246        ASTPair currentAST = new ASTPair();
4247        AST classBlock_AST = null;
4248        Token first = LT(1);
4249        
4250        match(LCURLY);
4251        {
4252        switch ( LA(1)) {
4253        case FINAL:
4254        case ABSTRACT:
4255        case STRICTFP:
4256        case LITERAL_static:
4257        case LITERAL_def:
4258        case AT:
4259        case IDENT:
4260        case LITERAL_class:
4261        case LITERAL_interface:
4262        case LITERAL_enum:
4263        case LITERAL_void:
4264        case LITERAL_boolean:
4265        case LITERAL_byte:
4266        case LITERAL_char:
4267        case LITERAL_short:
4268        case LITERAL_int:
4269        case LITERAL_float:
4270        case LITERAL_long:
4271        case LITERAL_double:
4272        case LITERAL_any:
4273        case LITERAL_private:
4274        case LITERAL_public:
4275        case LITERAL_protected:
4276        case LITERAL_transient:
4277        case LITERAL_native:
4278        case LITERAL_threadsafe:
4279        case LITERAL_synchronized:
4280        case LITERAL_volatile:
4281        case LCURLY:
4282        {
4283            classField();
4284            astFactory.addASTChild(currentAST, returnAST);
4285            break;
4286        }
4287        case RCURLY:
4288        case SEMI:
4289        case NLS:
4290        {
4291            break;
4292        }
4293        default:
4294        {
4295            throw new NoViableAltException(LT(1), getFilename());
4296        }
4297        }
4298        }
4299        {
4300        _loop109:
4301        do {
4302            if ((LA(1)==SEMI||LA(1)==NLS)) {
4303                sep();
4304                {
4305                switch ( LA(1)) {
4306                case FINAL:
4307                case ABSTRACT:
4308                case STRICTFP:
4309                case LITERAL_static:
4310                case LITERAL_def:
4311                case AT:
4312                case IDENT:
4313                case LITERAL_class:
4314                case LITERAL_interface:
4315                case LITERAL_enum:
4316                case LITERAL_void:
4317                case LITERAL_boolean:
4318                case LITERAL_byte:
4319                case LITERAL_char:
4320                case LITERAL_short:
4321                case LITERAL_int:
4322                case LITERAL_float:
4323                case LITERAL_long:
4324                case LITERAL_double:
4325                case LITERAL_any:
4326                case LITERAL_private:
4327                case LITERAL_public:
4328                case LITERAL_protected:
4329                case LITERAL_transient:
4330                case LITERAL_native:
4331                case LITERAL_threadsafe:
4332                case LITERAL_synchronized:
4333                case LITERAL_volatile:
4334                case LCURLY:
4335                {
4336                    classField();
4337                    astFactory.addASTChild(currentAST, returnAST);
4338                    break;
4339                }
4340                case RCURLY:
4341                case SEMI:
4342                case NLS:
4343                {
4344                    break;
4345                }
4346                default:
4347                {
4348                    throw new NoViableAltException(LT(1), getFilename());
4349                }
4350                }
4351                }
4352            }
4353            else {
4354                break _loop109;
4355            }
4356            
4357        } while (true);
4358        }
4359        match(RCURLY);
4360        if ( inputState.guessing==0 ) {
4361            classBlock_AST = (AST)currentAST.root;
4362            classBlock_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(OBJBLOCK,"OBJBLOCK",first,LT(1))).add(classBlock_AST));
4363            currentAST.root = classBlock_AST;
4364            currentAST.child = classBlock_AST!=null &&classBlock_AST.getFirstChild()!=null ?
4365                classBlock_AST.getFirstChild() : classBlock_AST;
4366            currentAST.advanceChildToEnd();
4367        }
4368        classBlock_AST = (AST)currentAST.root;
4369        returnAST = classBlock_AST;
4370    }
4371    
4372    public final void interfaceExtends() throws RecognitionException, TokenStreamException {
4373        
4374        returnAST = null;
4375        ASTPair currentAST = new ASTPair();
4376        AST interfaceExtends_AST = null;
4377        Token e = null;
4378        AST e_AST = null;
4379        Token first = LT(1);
4380        
4381        {
4382        switch ( LA(1)) {
4383        case LITERAL_extends:
4384        {
4385            e = LT(1);
4386            e_AST = astFactory.create(e);
4387            match(LITERAL_extends);
4388            nls();
4389            classOrInterfaceType(false);
4390            astFactory.addASTChild(currentAST, returnAST);
4391            {
4392            _loop159:
4393            do {
4394                if ((LA(1)==COMMA)) {
4395                    match(COMMA);
4396                    nls();
4397                    classOrInterfaceType(false);
4398                    astFactory.addASTChild(currentAST, returnAST);
4399                }
4400                else {
4401                    break _loop159;
4402                }
4403                
4404            } while (true);
4405            }
4406            nls();
4407            break;
4408        }
4409        case LCURLY:
4410        {
4411            break;
4412        }
4413        default:
4414        {
4415            throw new NoViableAltException(LT(1), getFilename());
4416        }
4417        }
4418        }
4419        if ( inputState.guessing==0 ) {
4420            interfaceExtends_AST = (AST)currentAST.root;
4421            interfaceExtends_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(EXTENDS_CLAUSE,"EXTENDS_CLAUSE",first,LT(1))).add(interfaceExtends_AST));
4422            currentAST.root = interfaceExtends_AST;
4423            currentAST.child = interfaceExtends_AST!=null &&interfaceExtends_AST.getFirstChild()!=null ?
4424                interfaceExtends_AST.getFirstChild() : interfaceExtends_AST;
4425            currentAST.advanceChildToEnd();
4426        }
4427        interfaceExtends_AST = (AST)currentAST.root;
4428        returnAST = interfaceExtends_AST;
4429    }
4430    
4431    public final void interfaceBlock() throws RecognitionException, TokenStreamException {
4432        
4433        returnAST = null;
4434        ASTPair currentAST = new ASTPair();
4435        AST interfaceBlock_AST = null;
4436        Token first = LT(1);
4437        
4438        match(LCURLY);
4439        {
4440        switch ( LA(1)) {
4441        case FINAL:
4442        case ABSTRACT:
4443        case STRICTFP:
4444        case LITERAL_static:
4445        case LITERAL_def:
4446        case AT:
4447        case IDENT:
4448        case LITERAL_class:
4449        case LITERAL_interface:
4450        case LITERAL_enum:
4451        case LITERAL_void:
4452        case LITERAL_boolean:
4453        case LITERAL_byte:
4454        case LITERAL_char:
4455        case LITERAL_short:
4456        case LITERAL_int:
4457        case LITERAL_float:
4458        case LITERAL_long:
4459        case LITERAL_double:
4460        case LITERAL_any:
4461        case LITERAL_private:
4462        case LITERAL_public:
4463        case LITERAL_protected:
4464        case LITERAL_transient:
4465        case LITERAL_native:
4466        case LITERAL_threadsafe:
4467        case LITERAL_synchronized:
4468        case LITERAL_volatile:
4469        {
4470            interfaceField();
4471            astFactory.addASTChild(currentAST, returnAST);
4472            break;
4473        }
4474        case RCURLY:
4475        case SEMI:
4476        case NLS:
4477        {
4478            break;
4479        }
4480        default:
4481        {
4482            throw new NoViableAltException(LT(1), getFilename());
4483        }
4484        }
4485        }
4486        {
4487        _loop114:
4488        do {
4489            if ((LA(1)==SEMI||LA(1)==NLS)) {
4490                sep();
4491                {
4492                switch ( LA(1)) {
4493                case FINAL:
4494                case ABSTRACT:
4495                case STRICTFP:
4496                case LITERAL_static:
4497                case LITERAL_def:
4498                case AT:
4499                case IDENT:
4500                case LITERAL_class:
4501                case LITERAL_interface:
4502                case LITERAL_enum:
4503                case LITERAL_void:
4504                case LITERAL_boolean:
4505                case LITERAL_byte:
4506                case LITERAL_char:
4507                case LITERAL_short:
4508                case LITERAL_int:
4509                case LITERAL_float:
4510                case LITERAL_long:
4511                case LITERAL_double:
4512                case LITERAL_any:
4513                case LITERAL_private:
4514                case LITERAL_public:
4515                case LITERAL_protected:
4516                case LITERAL_transient:
4517                case LITERAL_native:
4518                case LITERAL_threadsafe:
4519                case LITERAL_synchronized:
4520                case LITERAL_volatile:
4521                {
4522                    interfaceField();
4523                    astFactory.addASTChild(currentAST, returnAST);
4524                    break;
4525                }
4526                case RCURLY:
4527                case SEMI:
4528                case NLS:
4529                {
4530                    break;
4531                }
4532                default:
4533                {
4534                    throw new NoViableAltException(LT(1), getFilename());
4535                }
4536                }
4537                }
4538            }
4539            else {
4540                break _loop114;
4541            }
4542            
4543        } while (true);
4544        }
4545        match(RCURLY);
4546        if ( inputState.guessing==0 ) {
4547            interfaceBlock_AST = (AST)currentAST.root;
4548            interfaceBlock_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(OBJBLOCK,"OBJBLOCK",first,LT(1))).add(interfaceBlock_AST));
4549            currentAST.root = interfaceBlock_AST;
4550            currentAST.child = interfaceBlock_AST!=null &&interfaceBlock_AST.getFirstChild()!=null ?
4551                interfaceBlock_AST.getFirstChild() : interfaceBlock_AST;
4552            currentAST.advanceChildToEnd();
4553        }
4554        interfaceBlock_AST = (AST)currentAST.root;
4555        returnAST = interfaceBlock_AST;
4556    }
4557    
4558    public final void enumBlock() throws RecognitionException, TokenStreamException {
4559        
4560        returnAST = null;
4561        ASTPair currentAST = new ASTPair();
4562        AST enumBlock_AST = null;
4563        Token first = LT(1);
4564        
4565        match(LCURLY);
4566        {
4567        boolean synPredMatched123 = false;
4568        if (((LA(1)==AT||LA(1)==IDENT) && (_tokenSet_47.member(LA(2))) && (_tokenSet_48.member(LA(3))))) {
4569            int _m123 = mark();
4570            synPredMatched123 = true;
4571            inputState.guessing++;
4572            try {
4573                {
4574                enumConstantsStart();
4575                }
4576            }
4577            catch (RecognitionException pe) {
4578                synPredMatched123 = false;
4579            }
4580            rewind(_m123);
4581            inputState.guessing--;
4582        }
4583        if ( synPredMatched123 ) {
4584            enumConstants();
4585            astFactory.addASTChild(currentAST, returnAST);
4586        }
4587        else if ((_tokenSet_49.member(LA(1))) && (_tokenSet_50.member(LA(2))) && (_tokenSet_18.member(LA(3)))) {
4588            {
4589            switch ( LA(1)) {
4590            case FINAL:
4591            case ABSTRACT:
4592            case STRICTFP:
4593            case LITERAL_static:
4594            case LITERAL_def:
4595            case AT:
4596            case IDENT:
4597            case LITERAL_class:
4598            case LITERAL_interface:
4599            case LITERAL_enum:
4600            case LITERAL_void:
4601            case LITERAL_boolean:
4602            case LITERAL_byte:
4603            case LITERAL_char:
4604            case LITERAL_short:
4605            case LITERAL_int:
4606            case LITERAL_float:
4607            case LITERAL_long:
4608            case LITERAL_double:
4609            case LITERAL_any:
4610            case LITERAL_private:
4611            case LITERAL_public:
4612            case LITERAL_protected:
4613            case LITERAL_transient:
4614            case LITERAL_native:
4615            case LITERAL_threadsafe:
4616            case LITERAL_synchronized:
4617            case LITERAL_volatile:
4618            case LCURLY:
4619            {
4620                classField();
4621                astFactory.addASTChild(currentAST, returnAST);
4622                break;
4623            }
4624            case RCURLY:
4625            case SEMI:
4626            case NLS:
4627            {
4628                break;
4629            }
4630            default:
4631            {
4632                throw new NoViableAltException(LT(1), getFilename());
4633            }
4634            }
4635            }
4636        }
4637        else {
4638            throw new NoViableAltException(LT(1), getFilename());
4639        }
4640        
4641        }
4642        {
4643        _loop127:
4644        do {
4645            if ((LA(1)==SEMI||LA(1)==NLS)) {
4646                sep();
4647                {
4648                switch ( LA(1)) {
4649                case FINAL:
4650                case ABSTRACT:
4651                case STRICTFP:
4652                case LITERAL_static:
4653                case LITERAL_def:
4654                case AT:
4655                case IDENT:
4656                case LITERAL_class:
4657                case LITERAL_interface:
4658                case LITERAL_enum:
4659                case LITERAL_void:
4660                case LITERAL_boolean:
4661                case LITERAL_byte:
4662                case LITERAL_char:
4663                case LITERAL_short:
4664                case LITERAL_int:
4665                case LITERAL_float:
4666                case LITERAL_long:
4667                case LITERAL_double:
4668                case LITERAL_any:
4669                case LITERAL_private:
4670                case LITERAL_public:
4671                case LITERAL_protected:
4672                case LITERAL_transient:
4673                case LITERAL_native:
4674                case LITERAL_threadsafe:
4675                case LITERAL_synchronized:
4676                case LITERAL_volatile:
4677                case LCURLY:
4678                {
4679                    classField();
4680                    astFactory.addASTChild(currentAST, returnAST);
4681                    break;
4682                }
4683                case RCURLY:
4684                case SEMI:
4685                case NLS:
4686                {
4687                    break;
4688                }
4689                default:
4690                {
4691                    throw new NoViableAltException(LT(1), getFilename());
4692                }
4693                }
4694                }
4695            }
4696            else {
4697                break _loop127;
4698            }
4699            
4700        } while (true);
4701        }
4702        match(RCURLY);
4703        if ( inputState.guessing==0 ) {
4704            enumBlock_AST = (AST)currentAST.root;
4705            enumBlock_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(OBJBLOCK,"OBJBLOCK",first,LT(1))).add(enumBlock_AST));
4706            currentAST.root = enumBlock_AST;
4707            currentAST.child = enumBlock_AST!=null &&enumBlock_AST.getFirstChild()!=null ?
4708                enumBlock_AST.getFirstChild() : enumBlock_AST;
4709            currentAST.advanceChildToEnd();
4710        }
4711        enumBlock_AST = (AST)currentAST.root;
4712        returnAST = enumBlock_AST;
4713    }
4714    
4715    public final void annotationBlock() throws RecognitionException, TokenStreamException {
4716        
4717        returnAST = null;
4718        ASTPair currentAST = new ASTPair();
4719        AST annotationBlock_AST = null;
4720        Token first = LT(1);
4721        
4722        match(LCURLY);
4723        {
4724        switch ( LA(1)) {
4725        case FINAL:
4726        case ABSTRACT:
4727        case STRICTFP:
4728        case LITERAL_static:
4729        case LITERAL_def:
4730        case AT:
4731        case IDENT:
4732        case LITERAL_class:
4733        case LITERAL_interface:
4734        case LITERAL_enum:
4735        case LITERAL_void:
4736        case LITERAL_boolean:
4737        case LITERAL_byte:
4738        case LITERAL_char:
4739        case LITERAL_short:
4740        case LITERAL_int:
4741        case LITERAL_float:
4742        case LITERAL_long:
4743        case LITERAL_double:
4744        case LITERAL_any:
4745        case LITERAL_private:
4746        case LITERAL_public:
4747        case LITERAL_protected:
4748        case LITERAL_transient:
4749        case LITERAL_native:
4750        case LITERAL_threadsafe:
4751        case LITERAL_synchronized:
4752        case LITERAL_volatile:
4753        {
4754            annotationField();
4755            astFactory.addASTChild(currentAST, returnAST);
4756            break;
4757        }
4758        case RCURLY:
4759        case SEMI:
4760        case NLS:
4761        {
4762            break;
4763        }
4764        default:
4765        {
4766            throw new NoViableAltException(LT(1), getFilename());
4767        }
4768        }
4769        }
4770        {
4771        _loop119:
4772        do {
4773            if ((LA(1)==SEMI||LA(1)==NLS)) {
4774                sep();
4775                {
4776                switch ( LA(1)) {
4777                case FINAL:
4778                case ABSTRACT:
4779                case STRICTFP:
4780                case LITERAL_static:
4781                case LITERAL_def:
4782                case AT:
4783                case IDENT:
4784                case LITERAL_class:
4785                case LITERAL_interface:
4786                case LITERAL_enum:
4787                case LITERAL_void:
4788                case LITERAL_boolean:
4789                case LITERAL_byte:
4790                case LITERAL_char:
4791                case LITERAL_short:
4792                case LITERAL_int:
4793                case LITERAL_float:
4794                case LITERAL_long:
4795                case LITERAL_double:
4796                case LITERAL_any:
4797                case LITERAL_private:
4798                case LITERAL_public:
4799                case LITERAL_protected:
4800                case LITERAL_transient:
4801                case LITERAL_native:
4802                case LITERAL_threadsafe:
4803                case LITERAL_synchronized:
4804                case LITERAL_volatile:
4805                {
4806                    annotationField();
4807                    astFactory.addASTChild(currentAST, returnAST);
4808                    break;
4809                }
4810                case RCURLY:
4811                case SEMI:
4812                case NLS:
4813                {
4814                    break;
4815                }
4816                default:
4817                {
4818                    throw new NoViableAltException(LT(1), getFilename());
4819                }
4820                }
4821                }
4822            }
4823            else {
4824                break _loop119;
4825            }
4826            
4827        } while (true);
4828        }
4829        match(RCURLY);
4830        if ( inputState.guessing==0 ) {
4831            annotationBlock_AST = (AST)currentAST.root;
4832            annotationBlock_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(OBJBLOCK,"OBJBLOCK",first,LT(1))).add(annotationBlock_AST));
4833            currentAST.root = annotationBlock_AST;
4834            currentAST.child = annotationBlock_AST!=null &&annotationBlock_AST.getFirstChild()!=null ?
4835                annotationBlock_AST.getFirstChild() : annotationBlock_AST;
4836            currentAST.advanceChildToEnd();
4837        }
4838        annotationBlock_AST = (AST)currentAST.root;
4839        returnAST = annotationBlock_AST;
4840    }
4841    
4842    public final void typeParameter() throws RecognitionException, TokenStreamException {
4843        
4844        returnAST = null;
4845        ASTPair currentAST = new ASTPair();
4846        AST typeParameter_AST = null;
4847        Token id = null;
4848        AST id_AST = null;
4849        Token first = LT(1);
4850        
4851        {
4852        id = LT(1);
4853        id_AST = astFactory.create(id);
4854        astFactory.addASTChild(currentAST, id_AST);
4855        match(IDENT);
4856        }
4857        {
4858        if ((LA(1)==LITERAL_extends) && (LA(2)==IDENT||LA(2)==NLS) && (_tokenSet_51.member(LA(3)))) {
4859            typeParameterBounds();
4860            astFactory.addASTChild(currentAST, returnAST);
4861        }
4862        else if ((_tokenSet_52.member(LA(1))) && (_tokenSet_53.member(LA(2))) && (_tokenSet_54.member(LA(3)))) {
4863        }
4864        else {
4865            throw new NoViableAltException(LT(1), getFilename());
4866        }
4867        
4868        }
4869        if ( inputState.guessing==0 ) {
4870            typeParameter_AST = (AST)currentAST.root;
4871            typeParameter_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE_PARAMETER,"TYPE_PARAMETER",first,LT(1))).add(typeParameter_AST));
4872            currentAST.root = typeParameter_AST;
4873            currentAST.child = typeParameter_AST!=null &&typeParameter_AST.getFirstChild()!=null ?
4874                typeParameter_AST.getFirstChild() : typeParameter_AST;
4875            currentAST.advanceChildToEnd();
4876        }
4877        typeParameter_AST = (AST)currentAST.root;
4878        returnAST = typeParameter_AST;
4879    }
4880    
4881    public final void typeParameterBounds() throws RecognitionException, TokenStreamException {
4882        
4883        returnAST = null;
4884        ASTPair currentAST = new ASTPair();
4885        AST typeParameterBounds_AST = null;
4886        Token first = LT(1);
4887        
4888        match(LITERAL_extends);
4889        nls();
4890        classOrInterfaceType(false);
4891        astFactory.addASTChild(currentAST, returnAST);
4892        {
4893        _loop104:
4894        do {
4895            if ((LA(1)==BAND)) {
4896                match(BAND);
4897                nls();
4898                classOrInterfaceType(false);
4899                astFactory.addASTChild(currentAST, returnAST);
4900            }
4901            else {
4902                break _loop104;
4903            }
4904            
4905        } while (true);
4906        }
4907        if ( inputState.guessing==0 ) {
4908            typeParameterBounds_AST = (AST)currentAST.root;
4909            typeParameterBounds_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE_UPPER_BOUNDS,"TYPE_UPPER_BOUNDS",first,LT(1))).add(typeParameterBounds_AST));
4910            currentAST.root = typeParameterBounds_AST;
4911            currentAST.child = typeParameterBounds_AST!=null &&typeParameterBounds_AST.getFirstChild()!=null ?
4912                typeParameterBounds_AST.getFirstChild() : typeParameterBounds_AST;
4913            currentAST.advanceChildToEnd();
4914        }
4915        typeParameterBounds_AST = (AST)currentAST.root;
4916        returnAST = typeParameterBounds_AST;
4917    }
4918    
4919    public final void classField() throws RecognitionException, TokenStreamException {
4920        
4921        returnAST = null;
4922        ASTPair currentAST = new ASTPair();
4923        AST classField_AST = null;
4924        AST mc_AST = null;
4925        AST ctor_AST = null;
4926        AST d_AST = null;
4927        AST mods_AST = null;
4928        AST td_AST = null;
4929        AST s3_AST = null;
4930        AST s4_AST = null;
4931        Token first = LT(1);
4932        
4933        boolean synPredMatched166 = false;
4934        if (((_tokenSet_55.member(LA(1))) && (_tokenSet_56.member(LA(2))) && (_tokenSet_57.member(LA(3))))) {
4935            int _m166 = mark();
4936            synPredMatched166 = true;
4937            inputState.guessing++;
4938            try {
4939                {
4940                constructorStart();
4941                }
4942            }
4943            catch (RecognitionException pe) {
4944                synPredMatched166 = false;
4945            }
4946            rewind(_m166);
4947            inputState.guessing--;
4948        }
4949        if ( synPredMatched166 ) {
4950            modifiersOpt();
4951            mc_AST = (AST)returnAST;
4952            constructorDefinition(mc_AST);
4953            ctor_AST = (AST)returnAST;
4954            if ( inputState.guessing==0 ) {
4955                classField_AST = (AST)currentAST.root;
4956                classField_AST = ctor_AST;
4957                currentAST.root = classField_AST;
4958                currentAST.child = classField_AST!=null &&classField_AST.getFirstChild()!=null ?
4959                    classField_AST.getFirstChild() : classField_AST;
4960                currentAST.advanceChildToEnd();
4961            }
4962        }
4963        else {
4964            boolean synPredMatched168 = false;
4965            if (((_tokenSet_12.member(LA(1))) && (_tokenSet_13.member(LA(2))) && (_tokenSet_58.member(LA(3))))) {
4966                int _m168 = mark();
4967                synPredMatched168 = true;
4968                inputState.guessing++;
4969                try {
4970                    {
4971                    declarationStart();
4972                    }
4973                }
4974                catch (RecognitionException pe) {
4975                    synPredMatched168 = false;
4976                }
4977                rewind(_m168);
4978                inputState.guessing--;
4979            }
4980            if ( synPredMatched168 ) {
4981                declaration();
4982                d_AST = (AST)returnAST;
4983                if ( inputState.guessing==0 ) {
4984                    classField_AST = (AST)currentAST.root;
4985                    classField_AST = d_AST;
4986                    currentAST.root = classField_AST;
4987                    currentAST.child = classField_AST!=null &&classField_AST.getFirstChild()!=null ?
4988                        classField_AST.getFirstChild() : classField_AST;
4989                    currentAST.advanceChildToEnd();
4990                }
4991            }
4992            else {
4993                boolean synPredMatched170 = false;
4994                if (((_tokenSet_21.member(LA(1))) && (_tokenSet_22.member(LA(2))) && (_tokenSet_23.member(LA(3))))) {
4995                    int _m170 = mark();
4996                    synPredMatched170 = true;
4997                    inputState.guessing++;
4998                    try {
4999                        {
5000                        typeDeclarationStart();
5001                        }
5002                    }
5003                    catch (RecognitionException pe) {
5004                        synPredMatched170 = false;
5005                    }
5006                    rewind(_m170);
5007                    inputState.guessing--;
5008                }
5009                if ( synPredMatched170 ) {
5010                    modifiersOpt();
5011                    mods_AST = (AST)returnAST;
5012                    {
5013                    typeDefinitionInternal(mods_AST);
5014                    td_AST = (AST)returnAST;
5015                    if ( inputState.guessing==0 ) {
5016                        classField_AST = (AST)currentAST.root;
5017                        classField_AST = td_AST;
5018                        currentAST.root = classField_AST;
5019                        currentAST.child = classField_AST!=null &&classField_AST.getFirstChild()!=null ?
5020                            classField_AST.getFirstChild() : classField_AST;
5021                        currentAST.advanceChildToEnd();
5022                    }
5023                    }
5024                }
5025                else if ((LA(1)==LITERAL_static) && (LA(2)==LCURLY)) {
5026                    match(LITERAL_static);
5027                    compoundStatement();
5028                    s3_AST = (AST)returnAST;
5029                    if ( inputState.guessing==0 ) {
5030                        classField_AST = (AST)currentAST.root;
5031                        classField_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(STATIC_INIT,"STATIC_INIT",first,LT(1))).add(s3_AST));
5032                        currentAST.root = classField_AST;
5033                        currentAST.child = classField_AST!=null &&classField_AST.getFirstChild()!=null ?
5034                            classField_AST.getFirstChild() : classField_AST;
5035                        currentAST.advanceChildToEnd();
5036                    }
5037                }
5038                else if ((LA(1)==LCURLY)) {
5039                    compoundStatement();
5040                    s4_AST = (AST)returnAST;
5041                    if ( inputState.guessing==0 ) {
5042                        classField_AST = (AST)currentAST.root;
5043                        classField_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(INSTANCE_INIT,"INSTANCE_INIT",first,LT(1))).add(s4_AST));
5044                        currentAST.root = classField_AST;
5045                        currentAST.child = classField_AST!=null &&classField_AST.getFirstChild()!=null ?
5046                            classField_AST.getFirstChild() : classField_AST;
5047                        currentAST.advanceChildToEnd();
5048                    }
5049                }
5050                else {
5051                    throw new NoViableAltException(LT(1), getFilename());
5052                }
5053                }}
5054                returnAST = classField_AST;
5055            }
5056            
5057    public final void interfaceField() throws RecognitionException, TokenStreamException {
5058        
5059        returnAST = null;
5060        ASTPair currentAST = new ASTPair();
5061        AST interfaceField_AST = null;
5062        AST d_AST = null;
5063        AST mods_AST = null;
5064        AST td_AST = null;
5065        
5066        boolean synPredMatched174 = false;
5067        if (((_tokenSet_12.member(LA(1))) && (_tokenSet_13.member(LA(2))) && (_tokenSet_58.member(LA(3))))) {
5068            int _m174 = mark();
5069            synPredMatched174 = true;
5070            inputState.guessing++;
5071            try {
5072                {
5073                declarationStart();
5074                }
5075            }
5076            catch (RecognitionException pe) {
5077                synPredMatched174 = false;
5078            }
5079            rewind(_m174);
5080            inputState.guessing--;
5081        }
5082        if ( synPredMatched174 ) {
5083            declaration();
5084            d_AST = (AST)returnAST;
5085            if ( inputState.guessing==0 ) {
5086                interfaceField_AST = (AST)currentAST.root;
5087                interfaceField_AST = d_AST;
5088                currentAST.root = interfaceField_AST;
5089                currentAST.child = interfaceField_AST!=null &&interfaceField_AST.getFirstChild()!=null ?
5090                    interfaceField_AST.getFirstChild() : interfaceField_AST;
5091                currentAST.advanceChildToEnd();
5092            }
5093        }
5094        else {
5095            boolean synPredMatched176 = false;
5096            if (((_tokenSet_21.member(LA(1))) && (_tokenSet_22.member(LA(2))) && (_tokenSet_23.member(LA(3))))) {
5097                int _m176 = mark();
5098                synPredMatched176 = true;
5099                inputState.guessing++;
5100                try {
5101                    {
5102                    typeDeclarationStart();
5103                    }
5104                }
5105                catch (RecognitionException pe) {
5106                    synPredMatched176 = false;
5107                }
5108                rewind(_m176);
5109                inputState.guessing--;
5110            }
5111            if ( synPredMatched176 ) {
5112                modifiersOpt();
5113                mods_AST = (AST)returnAST;
5114                {
5115                typeDefinitionInternal(mods_AST);
5116                td_AST = (AST)returnAST;
5117                if ( inputState.guessing==0 ) {
5118                    interfaceField_AST = (AST)currentAST.root;
5119                    interfaceField_AST = td_AST;
5120                    currentAST.root = interfaceField_AST;
5121                    currentAST.child = interfaceField_AST!=null &&interfaceField_AST.getFirstChild()!=null ?
5122                        interfaceField_AST.getFirstChild() : interfaceField_AST;
5123                    currentAST.advanceChildToEnd();
5124                }
5125                }
5126            }
5127            else {
5128                throw new NoViableAltException(LT(1), getFilename());
5129            }
5130            }
5131            returnAST = interfaceField_AST;
5132        }
5133        
5134    public final void annotationField() throws RecognitionException, TokenStreamException {
5135        
5136        returnAST = null;
5137        ASTPair currentAST = new ASTPair();
5138        AST annotationField_AST = null;
5139        AST mods_AST = null;
5140        AST td_AST = null;
5141        AST t_AST = null;
5142        Token i = null;
5143        AST i_AST = null;
5144        AST amvi_AST = null;
5145        AST v_AST = null;
5146        Token first = LT(1);
5147        
5148        modifiersOpt();
5149        mods_AST = (AST)returnAST;
5150        {
5151        switch ( LA(1)) {
5152        case AT:
5153        case LITERAL_class:
5154        case LITERAL_interface:
5155        case LITERAL_enum:
5156        {
5157            typeDefinitionInternal(mods_AST);
5158            td_AST = (AST)returnAST;
5159            if ( inputState.guessing==0 ) {
5160                annotationField_AST = (AST)currentAST.root;
5161                annotationField_AST = td_AST;
5162                currentAST.root = annotationField_AST;
5163                currentAST.child = annotationField_AST!=null &&annotationField_AST.getFirstChild()!=null ?
5164                    annotationField_AST.getFirstChild() : annotationField_AST;
5165                currentAST.advanceChildToEnd();
5166            }
5167            break;
5168        }
5169        case IDENT:
5170        case LITERAL_void:
5171        case LITERAL_boolean:
5172        case LITERAL_byte:
5173        case LITERAL_char:
5174        case LITERAL_short:
5175        case LITERAL_int:
5176        case LITERAL_float:
5177        case LITERAL_long:
5178        case LITERAL_double:
5179        case LITERAL_any:
5180        {
5181            typeSpec(false);
5182            t_AST = (AST)returnAST;
5183            {
5184            boolean synPredMatched138 = false;
5185            if (((LA(1)==IDENT) && (LA(2)==LPAREN) && (LA(3)==RPAREN))) {
5186                int _m138 = mark();
5187                synPredMatched138 = true;
5188                inputState.guessing++;
5189                try {
5190                    {
5191                    match(IDENT);
5192                    match(LPAREN);
5193                    }
5194                }
5195                catch (RecognitionException pe) {
5196                    synPredMatched138 = false;
5197                }
5198                rewind(_m138);
5199                inputState.guessing--;
5200            }
5201            if ( synPredMatched138 ) {
5202                i = LT(1);
5203                i_AST = astFactory.create(i);
5204                match(IDENT);
5205                match(LPAREN);
5206                match(RPAREN);
5207                {
5208                switch ( LA(1)) {
5209                case LITERAL_default:
5210                {
5211                    match(LITERAL_default);
5212                    nls();
5213                    annotationMemberValueInitializer();
5214                    amvi_AST = (AST)returnAST;
5215                    break;
5216                }
5217                case RCURLY:
5218                case SEMI:
5219                case NLS:
5220                {
5221                    break;
5222                }
5223                default:
5224                {
5225                    throw new NoViableAltException(LT(1), getFilename());
5226                }
5227                }
5228                }
5229                if ( inputState.guessing==0 ) {
5230                    annotationField_AST = (AST)currentAST.root;
5231                    annotationField_AST =
5232                    (AST)astFactory.make( (new ASTArray(5)).add(create(ANNOTATION_FIELD_DEF,"ANNOTATION_FIELD_DEF",first,LT(1))).add(mods_AST).add((AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(t_AST))).add(i_AST).add(amvi_AST));
5233                    currentAST.root = annotationField_AST;
5234                    currentAST.child = annotationField_AST!=null &&annotationField_AST.getFirstChild()!=null ?
5235                        annotationField_AST.getFirstChild() : annotationField_AST;
5236                    currentAST.advanceChildToEnd();
5237                }
5238            }
5239            else if ((LA(1)==IDENT||LA(1)==STRING_LITERAL) && (_tokenSet_59.member(LA(2))) && (_tokenSet_60.member(LA(3)))) {
5240                variableDefinitions(mods_AST,t_AST);
5241                v_AST = (AST)returnAST;
5242                if ( inputState.guessing==0 ) {
5243                    annotationField_AST = (AST)currentAST.root;
5244                    annotationField_AST = v_AST;
5245                    currentAST.root = annotationField_AST;
5246                    currentAST.child = annotationField_AST!=null &&annotationField_AST.getFirstChild()!=null ?
5247                        annotationField_AST.getFirstChild() : annotationField_AST;
5248                    currentAST.advanceChildToEnd();
5249                }
5250            }
5251            else {
5252                throw new NoViableAltException(LT(1), getFilename());
5253            }
5254            
5255            }
5256            break;
5257        }
5258        default:
5259        {
5260            throw new NoViableAltException(LT(1), getFilename());
5261        }
5262        }
5263        }
5264        returnAST = annotationField_AST;
5265    }
5266    
5267/** Guard for enumConstants. */
5268    public final void enumConstantsStart() throws RecognitionException, TokenStreamException {
5269        
5270        returnAST = null;
5271        ASTPair currentAST = new ASTPair();
5272        AST enumConstantsStart_AST = null;
5273        
5274        enumConstant();
5275        astFactory.addASTChild(currentAST, returnAST);
5276        {
5277        switch ( LA(1)) {
5278        case COMMA:
5279        {
5280            AST tmp129_AST = null;
5281            tmp129_AST = astFactory.create(LT(1));
5282            astFactory.addASTChild(currentAST, tmp129_AST);
5283            match(COMMA);
5284            break;
5285        }
5286        case SEMI:
5287        {
5288            AST tmp130_AST = null;
5289            tmp130_AST = astFactory.create(LT(1));
5290            astFactory.addASTChild(currentAST, tmp130_AST);
5291            match(SEMI);
5292            break;
5293        }
5294        case NLS:
5295        {
5296            AST tmp131_AST = null;
5297            tmp131_AST = astFactory.create(LT(1));
5298            astFactory.addASTChild(currentAST, tmp131_AST);
5299            match(NLS);
5300            break;
5301        }
5302        case RCURLY:
5303        {
5304            AST tmp132_AST = null;
5305            tmp132_AST = astFactory.create(LT(1));
5306            astFactory.addASTChild(currentAST, tmp132_AST);
5307            match(RCURLY);
5308            break;
5309        }
5310        default:
5311        {
5312            throw new NoViableAltException(LT(1), getFilename());
5313        }
5314        }
5315        }
5316        enumConstantsStart_AST = (AST)currentAST.root;
5317        returnAST = enumConstantsStart_AST;
5318    }
5319    
5320/** Comma-separated list of one or more enum constant definitions. */
5321    public final void enumConstants() throws RecognitionException, TokenStreamException {
5322        
5323        returnAST = null;
5324        ASTPair currentAST = new ASTPair();
5325        AST enumConstants_AST = null;
5326        
5327        enumConstant();
5328        astFactory.addASTChild(currentAST, returnAST);
5329        {
5330        _loop132:
5331        do {
5332            if ((LA(1)==COMMA) && (_tokenSet_61.member(LA(2))) && (_tokenSet_62.member(LA(3)))) {
5333                match(COMMA);
5334                nls();
5335                enumConstant();
5336                astFactory.addASTChild(currentAST, returnAST);
5337            }
5338            else {
5339                break _loop132;
5340            }
5341            
5342        } while (true);
5343        }
5344        {
5345        switch ( LA(1)) {
5346        case COMMA:
5347        {
5348            match(COMMA);
5349            nls();
5350            break;
5351        }
5352        case RCURLY:
5353        case SEMI:
5354        case NLS:
5355        {
5356            break;
5357        }
5358        default:
5359        {
5360            throw new NoViableAltException(LT(1), getFilename());
5361        }
5362        }
5363        }
5364        enumConstants_AST = (AST)currentAST.root;
5365        returnAST = enumConstants_AST;
5366    }
5367    
5368    public final void enumConstant() throws RecognitionException, TokenStreamException {
5369        
5370        returnAST = null;
5371        ASTPair currentAST = new ASTPair();
5372        AST enumConstant_AST = null;
5373        AST an_AST = null;
5374        Token i = null;
5375        AST i_AST = null;
5376        AST a_AST = null;
5377        AST b_AST = null;
5378        Token first = LT(1);
5379        
5380        annotationsOpt();
5381        an_AST = (AST)returnAST;
5382        i = LT(1);
5383        i_AST = astFactory.create(i);
5384        match(IDENT);
5385        {
5386        switch ( LA(1)) {
5387        case LPAREN:
5388        {
5389            match(LPAREN);
5390            argList();
5391            a_AST = (AST)returnAST;
5392            match(RPAREN);
5393            break;
5394        }
5395        case COMMA:
5396        case LCURLY:
5397        case RCURLY:
5398        case SEMI:
5399        case NLS:
5400        {
5401            break;
5402        }
5403        default:
5404        {
5405            throw new NoViableAltException(LT(1), getFilename());
5406        }
5407        }
5408        }
5409        {
5410        switch ( LA(1)) {
5411        case LCURLY:
5412        {
5413            enumConstantBlock();
5414            b_AST = (AST)returnAST;
5415            break;
5416        }
5417        case COMMA:
5418        case RCURLY:
5419        case SEMI:
5420        case NLS:
5421        {
5422            break;
5423        }
5424        default:
5425        {
5426            throw new NoViableAltException(LT(1), getFilename());
5427        }
5428        }
5429        }
5430        if ( inputState.guessing==0 ) {
5431            enumConstant_AST = (AST)currentAST.root;
5432            enumConstant_AST = (AST)astFactory.make( (new ASTArray(5)).add(create(ENUM_CONSTANT_DEF,"ENUM_CONSTANT_DEF",first,LT(1))).add(an_AST).add(i_AST).add(a_AST).add(b_AST));
5433            currentAST.root = enumConstant_AST;
5434            currentAST.child = enumConstant_AST!=null &&enumConstant_AST.getFirstChild()!=null ?
5435                enumConstant_AST.getFirstChild() : enumConstant_AST;
5436            currentAST.advanceChildToEnd();
5437        }
5438        returnAST = enumConstant_AST;
5439    }
5440    
5441    public final void argList() throws RecognitionException, TokenStreamException {
5442        
5443        returnAST = null;
5444        ASTPair currentAST = new ASTPair();
5445        AST argList_AST = null;
5446        Token first = LT(1); boolean hl = false, hl2;
5447        
5448        {
5449        switch ( LA(1)) {
5450        case FINAL:
5451        case ABSTRACT:
5452        case UNUSED_DO:
5453        case STRICTFP:
5454        case LITERAL_static:
5455        case LITERAL_def:
5456        case AT:
5457        case IDENT:
5458        case LBRACK:
5459        case LPAREN:
5460        case LITERAL_class:
5461        case LITERAL_super:
5462        case LITERAL_void:
5463        case LITERAL_boolean:
5464        case LITERAL_byte:
5465        case LITERAL_char:
5466        case LITERAL_short:
5467        case LITERAL_int:
5468        case LITERAL_float:
5469        case LITERAL_long:
5470        case LITERAL_double:
5471        case LITERAL_any:
5472        case STAR:
5473        case LITERAL_as:
5474        case LITERAL_private:
5475        case LITERAL_public:
5476        case LITERAL_protected:
5477        case LITERAL_transient:
5478        case LITERAL_native:
5479        case LITERAL_threadsafe:
5480        case LITERAL_synchronized:
5481        case LITERAL_volatile:
5482        case LCURLY:
5483        case LITERAL_this:
5484        case STRING_LITERAL:
5485        case LITERAL_if:
5486        case LITERAL_else:
5487        case LITERAL_while:
5488        case LITERAL_switch:
5489        case LITERAL_for:
5490        case LITERAL_in:
5491        case LITERAL_return:
5492        case LITERAL_break:
5493        case LITERAL_continue:
5494        case LITERAL_throw:
5495        case LITERAL_assert:
5496        case PLUS:
5497        case MINUS:
5498        case LITERAL_try:
5499        case LITERAL_finally:
5500        case LITERAL_catch:
5501        case INC:
5502        case DEC:
5503        case BNOT:
5504        case LNOT:
5505        case DOLLAR:
5506        case STRING_CTOR_START:
5507        case LITERAL_new:
5508        case LITERAL_true:
5509        case LITERAL_false:
5510        case LITERAL_null:
5511        case NUM_INT:
5512        case NUM_FLOAT:
5513        case NUM_LONG:
5514        case NUM_DOUBLE:
5515        case NUM_BIG_INT:
5516        case NUM_BIG_DECIMAL:
5517        {
5518            hl=argument();
5519            astFactory.addASTChild(currentAST, returnAST);
5520            {
5521            _loop451:
5522            do {
5523                if ((LA(1)==COMMA) && (_tokenSet_63.member(LA(2))) && (_tokenSet_64.member(LA(3)))) {
5524                    match(COMMA);
5525                    hl2=argument();
5526                    astFactory.addASTChild(currentAST, returnAST);
5527                    if ( inputState.guessing==0 ) {
5528                        hl |= hl2;
5529                    }
5530                }
5531                else {
5532                    break _loop451;
5533                }
5534                
5535            } while (true);
5536            }
5537            if ( inputState.guessing==0 ) {
5538                argList_AST = (AST)currentAST.root;
5539                argList_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(ELIST,"ELIST",first,LT(1))).add(argList_AST));
5540                currentAST.root = argList_AST;
5541                currentAST.child = argList_AST!=null &&argList_AST.getFirstChild()!=null ?
5542                    argList_AST.getFirstChild() : argList_AST;
5543                currentAST.advanceChildToEnd();
5544            }
5545            break;
5546        }
5547        case RBRACK:
5548        case COMMA:
5549        case RPAREN:
5550        {
5551            if ( inputState.guessing==0 ) {
5552                argList_AST = (AST)currentAST.root;
5553                argList_AST = create(ELIST,"ELIST",first,LT(1));
5554                currentAST.root = argList_AST;
5555                currentAST.child = argList_AST!=null &&argList_AST.getFirstChild()!=null ?
5556                    argList_AST.getFirstChild() : argList_AST;
5557                currentAST.advanceChildToEnd();
5558            }
5559            break;
5560        }
5561        default:
5562        {
5563            throw new NoViableAltException(LT(1), getFilename());
5564        }
5565        }
5566        }
5567        {
5568        switch ( LA(1)) {
5569        case COMMA:
5570        {
5571            match(COMMA);
5572            break;
5573        }
5574        case RBRACK:
5575        case RPAREN:
5576        {
5577            break;
5578        }
5579        default:
5580        {
5581            throw new NoViableAltException(LT(1), getFilename());
5582        }
5583        }
5584        }
5585        if ( inputState.guessing==0 ) {
5586            argListHasLabels = hl;
5587        }
5588        argList_AST = (AST)currentAST.root;
5589        returnAST = argList_AST;
5590    }
5591    
5592    public final void enumConstantBlock() throws RecognitionException, TokenStreamException {
5593        
5594        returnAST = null;
5595        ASTPair currentAST = new ASTPair();
5596        AST enumConstantBlock_AST = null;
5597        Token first = LT(1);
5598        
5599        match(LCURLY);
5600        {
5601        switch ( LA(1)) {
5602        case FINAL:
5603        case ABSTRACT:
5604        case STRICTFP:
5605        case LITERAL_static:
5606        case LITERAL_def:
5607        case AT:
5608        case IDENT:
5609        case LITERAL_class:
5610        case LITERAL_interface:
5611        case LITERAL_enum:
5612        case LT:
5613        case LITERAL_void:
5614        case LITERAL_boolean:
5615        case LITERAL_byte:
5616        case LITERAL_char:
5617        case LITERAL_short:
5618        case LITERAL_int:
5619        case LITERAL_float:
5620        case LITERAL_long:
5621        case LITERAL_double:
5622        case LITERAL_any:
5623        case LITERAL_private:
5624        case LITERAL_public:
5625        case LITERAL_protected:
5626        case LITERAL_transient:
5627        case LITERAL_native:
5628        case LITERAL_threadsafe:
5629        case LITERAL_synchronized:
5630        case LITERAL_volatile:
5631        case LCURLY:
5632        {
5633            enumConstantField();
5634            astFactory.addASTChild(currentAST, returnAST);
5635            break;
5636        }
5637        case RCURLY:
5638        case SEMI:
5639        case NLS:
5640        {
5641            break;
5642        }
5643        default:
5644        {
5645            throw new NoViableAltException(LT(1), getFilename());
5646        }
5647        }
5648        }
5649        {
5650        _loop147:
5651        do {
5652            if ((LA(1)==SEMI||LA(1)==NLS)) {
5653                sep();
5654                {
5655                switch ( LA(1)) {
5656                case FINAL:
5657                case ABSTRACT:
5658                case STRICTFP:
5659                case LITERAL_static:
5660                case LITERAL_def:
5661                case AT:
5662                case IDENT:
5663                case LITERAL_class:
5664                case LITERAL_interface:
5665                case LITERAL_enum:
5666                case LT:
5667                case LITERAL_void:
5668                case LITERAL_boolean:
5669                case LITERAL_byte:
5670                case LITERAL_char:
5671                case LITERAL_short:
5672                case LITERAL_int:
5673                case LITERAL_float:
5674                case LITERAL_long:
5675                case LITERAL_double:
5676                case LITERAL_any:
5677                case LITERAL_private:
5678                case LITERAL_public:
5679                case LITERAL_protected:
5680                case LITERAL_transient:
5681                case LITERAL_native:
5682                case LITERAL_threadsafe:
5683                case LITERAL_synchronized:
5684                case LITERAL_volatile:
5685                case LCURLY:
5686                {
5687                    enumConstantField();
5688                    astFactory.addASTChild(currentAST, returnAST);
5689                    break;
5690                }
5691                case RCURLY:
5692                case SEMI:
5693                case NLS:
5694                {
5695                    break;
5696                }
5697                default:
5698                {
5699                    throw new NoViableAltException(LT(1), getFilename());
5700                }
5701                }
5702                }
5703            }
5704            else {
5705                break _loop147;
5706            }
5707            
5708        } while (true);
5709        }
5710        match(RCURLY);
5711        if ( inputState.guessing==0 ) {
5712            enumConstantBlock_AST = (AST)currentAST.root;
5713            enumConstantBlock_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(OBJBLOCK,"OBJBLOCK",first,LT(1))).add(enumConstantBlock_AST));
5714            currentAST.root = enumConstantBlock_AST;
5715            currentAST.child = enumConstantBlock_AST!=null &&enumConstantBlock_AST.getFirstChild()!=null ?
5716                enumConstantBlock_AST.getFirstChild() : enumConstantBlock_AST;
5717            currentAST.advanceChildToEnd();
5718        }
5719        enumConstantBlock_AST = (AST)currentAST.root;
5720        returnAST = enumConstantBlock_AST;
5721    }
5722    
5723    public final void enumConstantField() throws RecognitionException, TokenStreamException {
5724        
5725        returnAST = null;
5726        ASTPair currentAST = new ASTPair();
5727        AST enumConstantField_AST = null;
5728        AST mods_AST = null;
5729        AST td_AST = null;
5730        AST tp_AST = null;
5731        AST t_AST = null;
5732        AST param_AST = null;
5733        AST tc_AST = null;
5734        AST s2_AST = null;
5735        AST v_AST = null;
5736        AST s4_AST = null;
5737        Token first = LT(1);
5738        
5739        switch ( LA(1)) {
5740        case FINAL:
5741        case ABSTRACT:
5742        case STRICTFP:
5743        case LITERAL_static:
5744        case LITERAL_def:
5745        case AT:
5746        case IDENT:
5747        case LITERAL_class:
5748        case LITERAL_interface:
5749        case LITERAL_enum:
5750        case LT:
5751        case LITERAL_void:
5752        case LITERAL_boolean:
5753        case LITERAL_byte:
5754        case LITERAL_char:
5755        case LITERAL_short:
5756        case LITERAL_int:
5757        case LITERAL_float:
5758        case LITERAL_long:
5759        case LITERAL_double:
5760        case LITERAL_any:
5761        case LITERAL_private:
5762        case LITERAL_public:
5763        case LITERAL_protected:
5764        case LITERAL_transient:
5765        case LITERAL_native:
5766        case LITERAL_threadsafe:
5767        case LITERAL_synchronized:
5768        case LITERAL_volatile:
5769        {
5770            modifiersOpt();
5771            mods_AST = (AST)returnAST;
5772            {
5773            switch ( LA(1)) {
5774            case AT:
5775            case LITERAL_class:
5776            case LITERAL_interface:
5777            case LITERAL_enum:
5778            {
5779                typeDefinitionInternal(mods_AST);
5780                td_AST = (AST)returnAST;
5781                if ( inputState.guessing==0 ) {
5782                    enumConstantField_AST = (AST)currentAST.root;
5783                    enumConstantField_AST = td_AST;
5784                    currentAST.root = enumConstantField_AST;
5785                    currentAST.child = enumConstantField_AST!=null &&enumConstantField_AST.getFirstChild()!=null ?
5786                        enumConstantField_AST.getFirstChild() : enumConstantField_AST;
5787                    currentAST.advanceChildToEnd();
5788                }
5789                break;
5790            }
5791            case IDENT:
5792            case LT:
5793            case LITERAL_void:
5794            case LITERAL_boolean:
5795            case LITERAL_byte:
5796            case LITERAL_char:
5797            case LITERAL_short:
5798            case LITERAL_int:
5799            case LITERAL_float:
5800            case LITERAL_long:
5801            case LITERAL_double:
5802            case LITERAL_any:
5803            {
5804                {
5805                switch ( LA(1)) {
5806                case LT:
5807                {
5808                    typeParameters();
5809                    tp_AST = (AST)returnAST;
5810                    break;
5811                }
5812                case IDENT:
5813                case LITERAL_void:
5814                case LITERAL_boolean:
5815                case LITERAL_byte:
5816                case LITERAL_char:
5817                case LITERAL_short:
5818                case LITERAL_int:
5819                case LITERAL_float:
5820                case LITERAL_long:
5821                case LITERAL_double:
5822                case LITERAL_any:
5823                {
5824                    break;
5825                }
5826                default:
5827                {
5828                    throw new NoViableAltException(LT(1), getFilename());
5829                }
5830                }
5831                }
5832                typeSpec(false);
5833                t_AST = (AST)returnAST;
5834                {
5835                boolean synPredMatched153 = false;
5836                if (((LA(1)==IDENT) && (LA(2)==LPAREN) && (_tokenSet_65.member(LA(3))))) {
5837                    int _m153 = mark();
5838                    synPredMatched153 = true;
5839                    inputState.guessing++;
5840                    try {
5841                        {
5842                        match(IDENT);
5843                        match(LPAREN);
5844                        }
5845                    }
5846                    catch (RecognitionException pe) {
5847                        synPredMatched153 = false;
5848                    }
5849                    rewind(_m153);
5850                    inputState.guessing--;
5851                }
5852                if ( synPredMatched153 ) {
5853                    AST tmp141_AST = null;
5854                    tmp141_AST = astFactory.create(LT(1));
5855                    match(IDENT);
5856                    match(LPAREN);
5857                    parameterDeclarationList();
5858                    param_AST = (AST)returnAST;
5859                    match(RPAREN);
5860                    {
5861                    switch ( LA(1)) {
5862                    case LITERAL_throws:
5863                    {
5864                        throwsClause();
5865                        tc_AST = (AST)returnAST;
5866                        break;
5867                    }
5868                    case LCURLY:
5869                    case RCURLY:
5870                    case SEMI:
5871                    case NLS:
5872                    {
5873                        break;
5874                    }
5875                    default:
5876                    {
5877                        throw new NoViableAltException(LT(1), getFilename());
5878                    }
5879                    }
5880                    }
5881                    {
5882                    switch ( LA(1)) {
5883                    case LCURLY:
5884                    {
5885                        compoundStatement();
5886                        s2_AST = (AST)returnAST;
5887                        break;
5888                    }
5889                    case RCURLY:
5890                    case SEMI:
5891                    case NLS:
5892                    {
5893                        break;
5894                    }
5895                    default:
5896                    {
5897                        throw new NoViableAltException(LT(1), getFilename());
5898                    }
5899                    }
5900                    }
5901                    if ( inputState.guessing==0 ) {
5902                        enumConstantField_AST = (AST)currentAST.root;
5903                        enumConstantField_AST = (AST)astFactory.make( (new ASTArray(8)).add(create(METHOD_DEF,"METHOD_DEF",first,LT(1))).add(mods_AST).add(tp_AST).add((AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(t_AST))).add(tmp141_AST).add(param_AST).add(tc_AST).add(s2_AST));
5904                        currentAST.root = enumConstantField_AST;
5905                        currentAST.child = enumConstantField_AST!=null &&enumConstantField_AST.getFirstChild()!=null ?
5906                            enumConstantField_AST.getFirstChild() : enumConstantField_AST;
5907                        currentAST.advanceChildToEnd();
5908                    }
5909                }
5910                else if ((LA(1)==IDENT||LA(1)==STRING_LITERAL) && (_tokenSet_59.member(LA(2))) && (_tokenSet_66.member(LA(3)))) {
5911                    variableDefinitions(mods_AST,t_AST);
5912                    v_AST = (AST)returnAST;
5913                    if ( inputState.guessing==0 ) {
5914                        enumConstantField_AST = (AST)currentAST.root;
5915                        enumConstantField_AST = v_AST;
5916                        currentAST.root = enumConstantField_AST;
5917                        currentAST.child = enumConstantField_AST!=null &&enumConstantField_AST.getFirstChild()!=null ?
5918                            enumConstantField_AST.getFirstChild() : enumConstantField_AST;
5919                        currentAST.advanceChildToEnd();
5920                    }
5921                }
5922                else {
5923                    throw new NoViableAltException(LT(1), getFilename());
5924                }
5925                
5926                }
5927                break;
5928            }
5929            default:
5930            {
5931                throw new NoViableAltException(LT(1), getFilename());
5932            }
5933            }
5934            }
5935            break;
5936        }
5937        case LCURLY:
5938        {
5939            compoundStatement();
5940            s4_AST = (AST)returnAST;
5941            if ( inputState.guessing==0 ) {
5942                enumConstantField_AST = (AST)currentAST.root;
5943                enumConstantField_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(INSTANCE_INIT,"INSTANCE_INIT",first,LT(1))).add(s4_AST));
5944                currentAST.root = enumConstantField_AST;
5945                currentAST.child = enumConstantField_AST!=null &&enumConstantField_AST.getFirstChild()!=null ?
5946                    enumConstantField_AST.getFirstChild() : enumConstantField_AST;
5947                currentAST.advanceChildToEnd();
5948            }
5949            break;
5950        }
5951        default:
5952        {
5953            throw new NoViableAltException(LT(1), getFilename());
5954        }
5955        }
5956        returnAST = enumConstantField_AST;
5957    }
5958    
5959/** A list of zero or more formal parameters.
5960 * If a parameter is variable length (e.g. String... myArg) it should be
5961 * to the right of any other parameters of the same kind.
5962 * General form: (req, ..., opt, ..., [rest], key, ..., [restKeys], [block]
5963 * This must be sorted out after parsing, since the various declaration forms
5964 * are impossible to tell apart without backtracking.
5965 */

5966    public final void parameterDeclarationList() throws RecognitionException, TokenStreamException {
5967        
5968        returnAST = null;
5969        ASTPair currentAST = new ASTPair();
5970        AST parameterDeclarationList_AST = null;
5971        Token first = LT(1);
5972        
5973        {
5974        switch ( LA(1)) {
5975        case FINAL:
5976        case LITERAL_def:
5977        case AT:
5978        case IDENT:
5979        case LITERAL_void:
5980        case LITERAL_boolean:
5981        case LITERAL_byte:
5982        case LITERAL_char:
5983        case LITERAL_short:
5984        case LITERAL_int:
5985        case LITERAL_float:
5986        case LITERAL_long:
5987        case LITERAL_double:
5988        case LITERAL_any:
5989        case TRIPLE_DOT:
5990        {
5991            parameterDeclaration();
5992            astFactory.addASTChild(currentAST, returnAST);
5993            {
5994            _loop208:
5995            do {
5996                if ((LA(1)==COMMA)) {
5997                    match(COMMA);
5998                    nls();
5999                    parameterDeclaration();
6000                    astFactory.addASTChild(currentAST, returnAST);
6001                }
6002                else {
6003                    break _loop208;
6004                }
6005                
6006            } while (true);
6007            }
6008            break;
6009        }
6010        case RPAREN:
6011        case NLS:
6012        case CLOSURE_OP:
6013        {
6014            break;
6015        }
6016        default:
6017        {
6018            throw new NoViableAltException(LT(1), getFilename());
6019        }
6020        }
6021        }
6022        if ( inputState.guessing==0 ) {
6023            parameterDeclarationList_AST = (AST)currentAST.root;
6024            parameterDeclarationList_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(PARAMETERS,"PARAMETERS",first,LT(1))).add(parameterDeclarationList_AST));
6025            currentAST.root = parameterDeclarationList_AST;
6026            currentAST.child = parameterDeclarationList_AST!=null &&parameterDeclarationList_AST.getFirstChild()!=null ?
6027                parameterDeclarationList_AST.getFirstChild() : parameterDeclarationList_AST;
6028            currentAST.advanceChildToEnd();
6029        }
6030        parameterDeclarationList_AST = (AST)currentAST.root;
6031        returnAST = parameterDeclarationList_AST;
6032    }
6033    
6034    public final void throwsClause() throws RecognitionException, TokenStreamException {
6035        
6036        returnAST = null;
6037        ASTPair currentAST = new ASTPair();
6038        AST throwsClause_AST = null;
6039        
6040        AST tmp145_AST = null;
6041        tmp145_AST = astFactory.create(LT(1));
6042        astFactory.makeASTRoot(currentAST, tmp145_AST);
6043        match(LITERAL_throws);
6044        nls();
6045        identifier();
6046        astFactory.addASTChild(currentAST, returnAST);
6047        {
6048        _loop204:
6049        do {
6050            if ((LA(1)==COMMA)) {
6051                match(COMMA);
6052                nls();
6053                identifier();
6054                astFactory.addASTChild(currentAST, returnAST);
6055            }
6056            else {
6057                break _loop204;
6058            }
6059            
6060        } while (true);
6061        }
6062        nls();
6063        throwsClause_AST = (AST)currentAST.root;
6064        returnAST = throwsClause_AST;
6065    }
6066    
6067    public final void compoundStatement() throws RecognitionException, TokenStreamException {
6068        
6069        returnAST = null;
6070        ASTPair currentAST = new ASTPair();
6071        AST compoundStatement_AST = null;
6072        
6073        openBlock();
6074        astFactory.addASTChild(currentAST, returnAST);
6075        compoundStatement_AST = (AST)currentAST.root;
6076        returnAST = compoundStatement_AST;
6077    }
6078    
6079/** I've split out constructors separately; we could maybe integrate back into variableDefinitions
6080 * later on if we maybe simplified 'def' to be a type declaration?
6081 */

6082    public final void constructorDefinition(
6083        AST mods
6084    ) throws RecognitionException, TokenStreamException {
6085        
6086        returnAST = null;
6087        ASTPair currentAST = new ASTPair();
6088        AST constructorDefinition_AST = null;
6089        Token id = null;
6090        AST id_AST = null;
6091        AST param_AST = null;
6092        AST tc_AST = null;
6093        AST cb_AST = null;
6094        Token first = LT(1);
6095        
6096        id = LT(1);
6097        id_AST = astFactory.create(id);
6098        astFactory.addASTChild(currentAST, id_AST);
6099        match(IDENT);
6100        match(LPAREN);
6101        parameterDeclarationList();
6102        param_AST = (AST)returnAST;
6103        match(RPAREN);
6104        {
6105        switch ( LA(1)) {
6106        case LITERAL_throws:
6107        {
6108            throwsClause();
6109            tc_AST = (AST)returnAST;
6110            break;
6111        }
6112        case LCURLY:
6113        case NLS:
6114        {
6115            break;
6116        }
6117        default:
6118        {
6119            throw new NoViableAltException(LT(1), getFilename());
6120        }
6121        }
6122        }
6123        nlsWarn();
6124        if ( inputState.guessing==0 ) {
6125            isConstructorIdent(id);
6126        }
6127        constructorBody();
6128        cb_AST = (AST)returnAST;
6129        if ( inputState.guessing==0 ) {
6130            constructorDefinition_AST = (AST)currentAST.root;
6131            constructorDefinition_AST = (AST)astFactory.make( (new ASTArray(5)).add(create(CTOR_IDENT,"CTOR_IDENT",first,LT(1))).add(mods).add(param_AST).add(tc_AST).add(cb_AST));
6132            
6133            currentAST.root = constructorDefinition_AST;
6134            currentAST.child = constructorDefinition_AST!=null &&constructorDefinition_AST.getFirstChild()!=null ?
6135                constructorDefinition_AST.getFirstChild() : constructorDefinition_AST;
6136            currentAST.advanceChildToEnd();
6137        }
6138        constructorDefinition_AST = (AST)currentAST.root;
6139        returnAST = constructorDefinition_AST;
6140    }
6141    
6142    public final void constructorBody() throws RecognitionException, TokenStreamException {
6143        
6144        returnAST = null;
6145        ASTPair currentAST = new ASTPair();
6146        AST constructorBody_AST = null;
6147        Token lc = null;
6148        AST lc_AST = null;
6149        
6150        lc = LT(1);
6151        lc_AST = astFactory.create(lc);
6152        astFactory.makeASTRoot(currentAST, lc_AST);
6153        match(LCURLY);
6154        nls();
6155        if ( inputState.guessing==0 ) {
6156            lc_AST.setType(SLIST);
6157        }
6158        {
6159        boolean synPredMatched181 = false;
6160        if (((_tokenSet_67.member(LA(1))) && (_tokenSet_68.member(LA(2))) && (_tokenSet_69.member(LA(3))))) {
6161            int _m181 = mark();
6162            synPredMatched181 = true;
6163            inputState.guessing++;
6164            try {
6165                {
6166                explicitConstructorInvocation();
6167                }
6168            }
6169            catch (RecognitionException pe) {
6170                synPredMatched181 = false;
6171            }
6172            rewind(_m181);
6173            inputState.guessing--;
6174        }
6175        if ( synPredMatched181 ) {
6176            explicitConstructorInvocation();
6177            astFactory.addASTChild(currentAST, returnAST);
6178            {
6179            switch ( LA(1)) {
6180            case SEMI:
6181            case NLS:
6182            {
6183                sep();
6184                blockBody(sepToken);
6185                astFactory.addASTChild(currentAST, returnAST);
6186                break;
6187            }
6188            case RCURLY:
6189            {
6190                break;
6191            }
6192            default:
6193            {
6194                throw new NoViableAltException(LT(1), getFilename());
6195            }
6196            }
6197            }
6198        }
6199        else if ((_tokenSet_70.member(LA(1))) && (_tokenSet_71.member(LA(2))) && (_tokenSet_18.member(LA(3)))) {
6200            blockBody(EOF);
6201            astFactory.addASTChild(currentAST, returnAST);
6202        }
6203        else {
6204            throw new NoViableAltException(LT(1), getFilename());
6205        }
6206        
6207        }
6208        match(RCURLY);
6209        constructorBody_AST = (AST)currentAST.root;
6210        returnAST = constructorBody_AST;
6211    }
6212    
6213/** Catch obvious constructor calls, but not the expr.super(...) calls */
6214    public final void explicitConstructorInvocation() throws RecognitionException, TokenStreamException {
6215        
6216        returnAST = null;
6217        ASTPair currentAST = new ASTPair();
6218        AST explicitConstructorInvocation_AST = null;
6219        Token lp1 = null;
6220        AST lp1_AST = null;
6221        Token lp2 = null;
6222        AST lp2_AST = null;
6223        
6224        {
6225        switch ( LA(1)) {
6226        case LT:
6227        {
6228            typeArguments();
6229            astFactory.addASTChild(currentAST, returnAST);
6230            break;
6231        }
6232        case LITERAL_super:
6233        case LITERAL_this:
6234        {
6235            break;
6236        }
6237        default:
6238        {
6239            throw new NoViableAltException(LT(1), getFilename());
6240        }
6241        }
6242        }
6243        {
6244        switch ( LA(1)) {
6245        case LITERAL_this:
6246        {
6247            match(LITERAL_this);
6248            lp1 = LT(1);
6249            lp1_AST = astFactory.create(lp1);
6250            astFactory.makeASTRoot(currentAST, lp1_AST);
6251            match(LPAREN);
6252            argList();
6253            astFactory.addASTChild(currentAST, returnAST);
6254            match(RPAREN);
6255            if ( inputState.guessing==0 ) {
6256                lp1_AST.setType(CTOR_CALL);
6257            }
6258            break;
6259        }
6260        case LITERAL_super:
6261        {
6262            match(LITERAL_super);
6263            lp2 = LT(1);
6264            lp2_AST = astFactory.create(lp2);
6265            astFactory.makeASTRoot(currentAST, lp2_AST);
6266            match(LPAREN);
6267            argList();
6268            astFactory.addASTChild(currentAST, returnAST);
6269            match(RPAREN);
6270            if ( inputState.guessing==0 ) {
6271                lp2_AST.setType(SUPER_CTOR_CALL);
6272            }
6273            break;
6274        }
6275        default:
6276        {
6277            throw new NoViableAltException(LT(1), getFilename());
6278        }
6279        }
6280        }
6281        explicitConstructorInvocation_AST = (AST)currentAST.root;
6282        returnAST = explicitConstructorInvocation_AST;
6283    }
6284    
6285/** Declaration of a variable. This can be a class/instance variable,
6286 * or a local variable in a method
6287 * It can also include possible initialization.
6288 */

6289    public final void variableDeclarator(
6290        AST mods, AST t
6291    ) throws RecognitionException, TokenStreamException {
6292        
6293        returnAST = null;
6294        ASTPair currentAST = new ASTPair();
6295        AST variableDeclarator_AST = null;
6296        AST id_AST = null;
6297        AST v_AST = null;
6298        Token first = LT(1);
6299        
6300        variableName();
6301        id_AST = (AST)returnAST;
6302        {
6303        switch ( LA(1)) {
6304        case ASSIGN:
6305        {
6306            varInitializer();
6307            v_AST = (AST)returnAST;
6308            break;
6309        }
6310        case EOF:
6311        case COMMA:
6312        case RCURLY:
6313        case SEMI:
6314        case NLS:
6315        case LITERAL_default:
6316        case LITERAL_else:
6317        case LITERAL_case:
6318        {
6319            break;
6320        }
6321        default:
6322        {
6323            throw new NoViableAltException(LT(1), getFilename());
6324        }
6325        }
6326        }
6327        if ( inputState.guessing==0 ) {
6328            variableDeclarator_AST = (AST)currentAST.root;
6329            variableDeclarator_AST = (AST)astFactory.make( (new ASTArray(5)).add(create(VARIABLE_DEF,"VARIABLE_DEF",first,LT(1))).add(mods).add((AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(t))).add(id_AST).add(v_AST));
6330            currentAST.root = variableDeclarator_AST;
6331            currentAST.child = variableDeclarator_AST!=null &&variableDeclarator_AST.getFirstChild()!=null ?
6332                variableDeclarator_AST.getFirstChild() : variableDeclarator_AST;
6333            currentAST.advanceChildToEnd();
6334        }
6335        returnAST = variableDeclarator_AST;
6336    }
6337    
6338/** Zero or more insignificant newlines, all gobbled up and thrown away,
6339 * but a warning message is left for the user, if there was a newline.
6340 */

6341    public final void nlsWarn() throws RecognitionException, TokenStreamException {
6342        
6343        returnAST = null;
6344        ASTPair currentAST = new ASTPair();
6345        AST nlsWarn_AST = null;
6346        
6347        {
6348        boolean synPredMatched490 = false;
6349        if (((_tokenSet_72.member(LA(1))) && (_tokenSet_20.member(LA(2))) && (_tokenSet_5.member(LA(3))))) {
6350            int _m490 = mark();
6351            synPredMatched490 = true;
6352            inputState.guessing++;
6353            try {
6354                {
6355                match(NLS);
6356                }
6357            }
6358            catch (RecognitionException pe) {
6359                synPredMatched490 = false;
6360            }
6361            rewind(_m490);
6362            inputState.guessing--;
6363        }
6364        if ( synPredMatched490 ) {
6365            if ( inputState.guessing==0 ) {
6366                addWarning(
6367                "A newline at this point does not follow the Groovy Coding Conventions.",
6368                "Keep this statement on one line, or use curly braces to break across multiple lines."
6369                );
6370            }
6371        }
6372        else if ((_tokenSet_72.member(LA(1))) && (_tokenSet_20.member(LA(2))) && (_tokenSet_5.member(LA(3)))) {
6373        }
6374        else {
6375            throw new NoViableAltException(LT(1), getFilename());
6376        }
6377        
6378        }
6379        nls();
6380        returnAST = nlsWarn_AST;
6381    }
6382    
6383/** An open block is not allowed to have closure arguments. */
6384    public final void openBlock() throws RecognitionException, TokenStreamException {
6385        
6386        returnAST = null;
6387        ASTPair currentAST = new ASTPair();
6388        AST openBlock_AST = null;
6389        Token lc = null;
6390        AST lc_AST = null;
6391        
6392        lc = LT(1);
6393        lc_AST = astFactory.create(lc);
6394        astFactory.makeASTRoot(currentAST, lc_AST);
6395        match(LCURLY);
6396        nls();
6397        if ( inputState.guessing==0 ) {
6398            lc_AST.setType(SLIST);
6399        }
6400        blockBody(EOF);
6401        astFactory.addASTChild(currentAST, returnAST);
6402        match(RCURLY);
6403        openBlock_AST = (AST)currentAST.root;
6404        returnAST = openBlock_AST;
6405    }
6406    
6407    public final void variableName() throws RecognitionException, TokenStreamException {
6408        
6409        returnAST = null;
6410        ASTPair currentAST = new ASTPair();
6411        AST variableName_AST = null;
6412        
6413        AST tmp155_AST = null;
6414        tmp155_AST = astFactory.create(LT(1));
6415        astFactory.addASTChild(currentAST, tmp155_AST);
6416        match(IDENT);
6417        variableName_AST = (AST)currentAST.root;
6418        returnAST = variableName_AST;
6419    }
6420    
6421    public final void expression(
6422        int lc_stmt
6423    ) throws RecognitionException, TokenStreamException {
6424        
6425        returnAST = null;
6426        ASTPair currentAST = new ASTPair();
6427        AST expression_AST = null;
6428        
6429        assignmentExpression(lc_stmt);
6430        astFactory.addASTChild(currentAST, returnAST);
6431        expression_AST = (AST)currentAST.root;
6432        returnAST = expression_AST;
6433    }
6434    
6435/** A formal parameter for a method or closure. */
6436    public final void parameterDeclaration() throws RecognitionException, TokenStreamException {
6437        
6438        returnAST = null;
6439        ASTPair currentAST = new ASTPair();
6440        AST parameterDeclaration_AST = null;
6441        AST pm_AST = null;
6442        AST t_AST = null;
6443        Token id = null;
6444        AST id_AST = null;
6445        AST exp_AST = null;
6446        Token first = LT(1);boolean spreadParam = false;
6447        
6448        parameterModifiersOpt();
6449        pm_AST = (AST)returnAST;
6450        {
6451        if ((_tokenSet_26.member(LA(1))) && (_tokenSet_73.member(LA(2))) && (_tokenSet_74.member(LA(3)))) {
6452            typeSpec(false);
6453            t_AST = (AST)returnAST;
6454        }
6455        else if ((LA(1)==IDENT||LA(1)==TRIPLE_DOT) && (_tokenSet_75.member(LA(2))) && (_tokenSet_76.member(LA(3)))) {
6456        }
6457        else {
6458            throw new NoViableAltException(LT(1), getFilename());
6459        }
6460        
6461        }
6462        {
6463        switch ( LA(1)) {
6464        case TRIPLE_DOT:
6465        {
6466            match(TRIPLE_DOT);
6467            if ( inputState.guessing==0 ) {
6468                spreadParam = true;
6469            }
6470            break;
6471        }
6472        case IDENT:
6473        {
6474            break;
6475        }
6476        default:
6477        {
6478            throw new NoViableAltException(LT(1), getFilename());
6479        }
6480        }
6481        }
6482        id = LT(1);
6483        id_AST = astFactory.create(id);
6484        match(IDENT);
6485        {
6486        switch ( LA(1)) {
6487        case ASSIGN:
6488        {
6489            varInitializer();
6490            exp_AST = (AST)returnAST;
6491            break;
6492        }
6493        case COMMA:
6494        case RPAREN:
6495        case NLS:
6496        case CLOSURE_OP:
6497        {
6498            break;
6499        }
6500        default:
6501        {
6502            throw new NoViableAltException(LT(1), getFilename());
6503        }
6504        }
6505        }
6506        if ( inputState.guessing==0 ) {
6507            parameterDeclaration_AST = (AST)currentAST.root;
6508            
6509            if (spreadParam) {
6510            parameterDeclaration_AST = (AST)astFactory.make( (new ASTArray(5)).add(create(VARIABLE_PARAMETER_DEF,"VARIABLE_PARAMETER_DEF",first,LT(1))).add(pm_AST).add((AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(t_AST))).add(id_AST).add(exp_AST));
6511            } else {
6512            parameterDeclaration_AST = (AST)astFactory.make( (new ASTArray(5)).add(create(PARAMETER_DEF,"PARAMETER_DEF",first,LT(1))).add(pm_AST).add((AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(t_AST))).add(id_AST).add(exp_AST));
6513            }
6514            
6515            currentAST.root = parameterDeclaration_AST;
6516            currentAST.child = parameterDeclaration_AST!=null &&parameterDeclaration_AST.getFirstChild()!=null ?
6517                parameterDeclaration_AST.getFirstChild() : parameterDeclaration_AST;
6518            currentAST.advanceChildToEnd();
6519        }
6520        returnAST = parameterDeclaration_AST;
6521    }
6522    
6523    public final void parameterModifiersOpt() throws RecognitionException, TokenStreamException {
6524        
6525        returnAST = null;
6526        ASTPair currentAST = new ASTPair();
6527        AST parameterModifiersOpt_AST = null;
6528        Token first = LT(1);int seenDef = 0;
6529        
6530        {
6531        _loop220:
6532        do {
6533            switch ( LA(1)) {
6534            case FINAL:
6535            {
6536                AST tmp157_AST = null;
6537                tmp157_AST = astFactory.create(LT(1));
6538                astFactory.addASTChild(currentAST, tmp157_AST);
6539                match(FINAL);
6540                nls();
6541                break;
6542            }
6543            case AT:
6544            {
6545                annotation();
6546                astFactory.addASTChild(currentAST, returnAST);
6547                nls();
6548                break;
6549            }
6550            default:
6551                if (((LA(1)==LITERAL_def))&&(seenDef++ == 0)) {
6552                    match(LITERAL_def);
6553                    nls();
6554                }
6555            else {
6556                break _loop220;
6557            }
6558            }
6559        } while (true);
6560        }
6561        if ( inputState.guessing==0 ) {
6562            parameterModifiersOpt_AST = (AST)currentAST.root;
6563            parameterModifiersOpt_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(MODIFIERS,"MODIFIERS",first,LT(1))).add(parameterModifiersOpt_AST));
6564            currentAST.root = parameterModifiersOpt_AST;
6565            currentAST.child = parameterModifiersOpt_AST!=null &&parameterModifiersOpt_AST.getFirstChild()!=null ?
6566                parameterModifiersOpt_AST.getFirstChild() : parameterModifiersOpt_AST;
6567            currentAST.advanceChildToEnd();
6568        }
6569        parameterModifiersOpt_AST = (AST)currentAST.root;
6570        returnAST = parameterModifiersOpt_AST;
6571    }
6572    
6573/** A simplified formal parameter for closures, can occur outside parens.
6574 * It is not confused by a lookahead of BOR.
6575 * DECIDE: Is thie necessary, or do we change the closure-bar syntax?
6576 */

6577    public final void simpleParameterDeclaration() throws RecognitionException, TokenStreamException {
6578        
6579        returnAST = null;
6580        ASTPair currentAST = new ASTPair();
6581        AST simpleParameterDeclaration_AST = null;
6582        AST t_AST = null;
6583        Token id = null;
6584        AST id_AST = null;
6585        Token first = LT(1);
6586        
6587        {
6588        if ((_tokenSet_26.member(LA(1))) && (_tokenSet_30.member(LA(2)))) {
6589            typeSpec(false);
6590            t_AST = (AST)returnAST;
6591        }
6592        else if ((LA(1)==IDENT) && (_tokenSet_77.member(LA(2)))) {
6593        }
6594        else {
6595            throw new NoViableAltException(LT(1), getFilename());
6596        }
6597        
6598        }
6599        id = LT(1);
6600        id_AST = astFactory.create(id);
6601        match(IDENT);
6602        if ( inputState.guessing==0 ) {
6603            simpleParameterDeclaration_AST = (AST)currentAST.root;
6604            simpleParameterDeclaration_AST = (AST)astFactory.make( (new ASTArray(4)).add(create(PARAMETER_DEF,"PARAMETER_DEF",first,LT(1))).add((AST)astFactory.make( (new ASTArray(1)).add(create(MODIFIERS,"MODIFIERS",first,LT(1))))).add((AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(t_AST))).add(id_AST));
6605            currentAST.root = simpleParameterDeclaration_AST;
6606            currentAST.child = simpleParameterDeclaration_AST!=null &&simpleParameterDeclaration_AST.getFirstChild()!=null ?
6607                simpleParameterDeclaration_AST.getFirstChild() : simpleParameterDeclaration_AST;
6608            currentAST.advanceChildToEnd();
6609        }
6610        returnAST = simpleParameterDeclaration_AST;
6611    }
6612    
6613/** Simplified formal parameter list for closures. Never empty. */
6614    public final void simpleParameterDeclarationList() throws RecognitionException, TokenStreamException {
6615        
6616        returnAST = null;
6617        ASTPair currentAST = new ASTPair();
6618        AST simpleParameterDeclarationList_AST = null;
6619        Token first = LT(1);
6620        
6621        simpleParameterDeclaration();
6622        astFactory.addASTChild(currentAST, returnAST);
6623        {
6624        _loop217:
6625        do {
6626            if ((LA(1)==COMMA)) {
6627                match(COMMA);
6628                nls();
6629                simpleParameterDeclaration();
6630                astFactory.addASTChild(currentAST, returnAST);
6631            }
6632            else {
6633                break _loop217;
6634            }
6635            
6636        } while (true);
6637        }
6638        if ( inputState.guessing==0 ) {
6639            simpleParameterDeclarationList_AST = (AST)currentAST.root;
6640            simpleParameterDeclarationList_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(PARAMETERS,"PARAMETERS",first,LT(1))).add(simpleParameterDeclarationList_AST));
6641            currentAST.root = simpleParameterDeclarationList_AST;
6642            currentAST.child = simpleParameterDeclarationList_AST!=null &&simpleParameterDeclarationList_AST.getFirstChild()!=null ?
6643                simpleParameterDeclarationList_AST.getFirstChild() : simpleParameterDeclarationList_AST;
6644            currentAST.advanceChildToEnd();
6645        }
6646        simpleParameterDeclarationList_AST = (AST)currentAST.root;
6647        returnAST = simpleParameterDeclarationList_AST;
6648    }
6649    
6650/** Closure parameters are exactly like method parameters,
6651 * except that they are not enclosed in parentheses, but rather
6652 * are prepended to the front of a block, just after the brace.
6653 * They are separated from the closure body by a CLOSURE_OP token '->'.
6654 */

6655    public final void closureParametersOpt(
6656        boolean addImplicit
6657    ) throws RecognitionException, TokenStreamException {
6658        
6659        returnAST = null;
6660        ASTPair currentAST = new ASTPair();
6661        AST closureParametersOpt_AST = null;
6662        
6663        boolean synPredMatched223 = false;
6664        if (((_tokenSet_78.member(LA(1))) && (_tokenSet_79.member(LA(2))) && (_tokenSet_20.member(LA(3))))) {
6665            int _m223 = mark();
6666            synPredMatched223 = true;
6667            inputState.guessing++;
6668            try {
6669                {
6670                parameterDeclarationList();
6671                nls();
6672                match(CLOSURE_OP);
6673                }
6674            }
6675            catch (RecognitionException pe) {
6676                synPredMatched223 = false;
6677            }
6678            rewind(_m223);
6679            inputState.guessing--;
6680        }
6681        if ( synPredMatched223 ) {
6682            parameterDeclarationList();
6683            astFactory.addASTChild(currentAST, returnAST);
6684            nls();
6685            match(CLOSURE_OP);
6686            nls();
6687            closureParametersOpt_AST = (AST)currentAST.root;
6688        }
6689        else {
6690            boolean synPredMatched225 = false;
6691            if ((((_tokenSet_80.member(LA(1))) && (_tokenSet_81.member(LA(2))) && (_tokenSet_20.member(LA(3))))&&(compatibilityMode))) {
6692                int _m225 = mark();
6693                synPredMatched225 = true;
6694                inputState.guessing++;
6695                try {
6696                    {
6697                    oldClosureParametersStart();
6698                    }
6699                }
6700                catch (RecognitionException pe) {
6701                    synPredMatched225 = false;
6702                }
6703                rewind(_m225);
6704                inputState.guessing--;
6705            }
6706            if ( synPredMatched225 ) {
6707                oldClosureParameters();
6708                astFactory.addASTChild(currentAST, returnAST);
6709                closureParametersOpt_AST = (AST)currentAST.root;
6710            }
6711            else if (((_tokenSet_70.member(LA(1))) && (_tokenSet_20.member(LA(2))) && (_tokenSet_5.member(LA(3))))&&(addImplicit)) {
6712                implicitParameters();
6713                astFactory.addASTChild(currentAST, returnAST);
6714                closureParametersOpt_AST = (AST)currentAST.root;
6715            }
6716            else if ((_tokenSet_70.member(LA(1))) && (_tokenSet_20.member(LA(2))) && (_tokenSet_5.member(LA(3)))) {
6717                closureParametersOpt_AST = (AST)currentAST.root;
6718            }
6719            else {
6720                throw new NoViableAltException(LT(1), getFilename());
6721            }
6722            }
6723            returnAST = closureParametersOpt_AST;
6724        }
6725        
6726/** Lookahead for oldClosureParameters. */
6727    public final void oldClosureParametersStart() throws RecognitionException, TokenStreamException {
6728        
6729        returnAST = null;
6730        ASTPair currentAST = new ASTPair();
6731        AST oldClosureParametersStart_AST = null;
6732        
6733        switch ( LA(1)) {
6734        case BOR:
6735        {
6736            AST tmp161_AST = null;
6737            tmp161_AST = astFactory.create(LT(1));
6738            match(BOR);
6739            break;
6740        }
6741        case LOR:
6742        {
6743            AST tmp162_AST = null;
6744            tmp162_AST = astFactory.create(LT(1));
6745            match(LOR);
6746            break;
6747        }
6748        case LPAREN:
6749        {
6750            AST tmp163_AST = null;
6751            tmp163_AST = astFactory.create(LT(1));
6752            match(LPAREN);
6753            balancedTokens();
6754            AST tmp164_AST = null;
6755            tmp164_AST = astFactory.create(LT(1));
6756            match(RPAREN);
6757            nls();
6758            AST tmp165_AST = null;
6759            tmp165_AST = astFactory.create(LT(1));
6760            match(BOR);
6761            break;
6762        }
6763        case IDENT:
6764        case LITERAL_void:
6765        case LITERAL_boolean:
6766        case LITERAL_byte:
6767        case LITERAL_char:
6768        case LITERAL_short:
6769        case LITERAL_int:
6770        case LITERAL_float:
6771        case LITERAL_long:
6772        case LITERAL_double:
6773        case LITERAL_any:
6774        {
6775            simpleParameterDeclarationList();
6776            AST tmp166_AST = null;
6777            tmp166_AST = astFactory.create(LT(1));
6778            match(BOR);
6779            break;
6780        }
6781        default:
6782        {
6783            throw new NoViableAltException(LT(1), getFilename());
6784        }
6785        }
6786        returnAST = oldClosureParametersStart_AST;
6787    }
6788    
6789/** Provisional definition of old-style closure params based on BOR '|'.
6790 * Going away soon, perhaps... */

6791    public final void oldClosureParameters() throws RecognitionException, TokenStreamException {
6792        
6793        returnAST = null;
6794        ASTPair currentAST = new ASTPair();
6795        AST oldClosureParameters_AST = null;
6796        Token first = LT(1);
6797        
6798        if ((LA(1)==LOR)) {
6799            match(LOR);
6800            nls();
6801            if ( inputState.guessing==0 ) {
6802                oldClosureParameters_AST = (AST)currentAST.root;
6803                oldClosureParameters_AST = (AST)astFactory.make( (new ASTArray(1)).add(create(PARAMETERS,"PARAMETERS",first,LT(1))));
6804                currentAST.root = oldClosureParameters_AST;
6805                currentAST.child = oldClosureParameters_AST!=null &&oldClosureParameters_AST.getFirstChild()!=null ?
6806                    oldClosureParameters_AST.getFirstChild() : oldClosureParameters_AST;
6807                currentAST.advanceChildToEnd();
6808            }
6809            oldClosureParameters_AST = (AST)currentAST.root;
6810        }
6811        else {
6812            boolean synPredMatched231 = false;
6813            if (((LA(1)==BOR) && (LA(2)==NLS||LA(2)==BOR) && (_tokenSet_82.member(LA(3))))) {
6814                int _m231 = mark();
6815                synPredMatched231 = true;
6816                inputState.guessing++;
6817                try {
6818                    {
6819                    match(BOR);
6820                    nls();
6821                    match(BOR);
6822                    }
6823                }
6824                catch (RecognitionException pe) {
6825                    synPredMatched231 = false;
6826                }
6827                rewind(_m231);
6828                inputState.guessing--;
6829            }
6830            if ( synPredMatched231 ) {
6831                match(BOR);
6832                nls();
6833                match(BOR);
6834                nls();
6835                if ( inputState.guessing==0 ) {
6836                    oldClosureParameters_AST = (AST)currentAST.root;
6837                    oldClosureParameters_AST = (AST)astFactory.make( (new ASTArray(1)).add(create(PARAMETERS,"PARAMETERS",first,LT(1))));
6838                    currentAST.root = oldClosureParameters_AST;
6839                    currentAST.child = oldClosureParameters_AST!=null &&oldClosureParameters_AST.getFirstChild()!=null ?
6840                        oldClosureParameters_AST.getFirstChild() : oldClosureParameters_AST;
6841                    currentAST.advanceChildToEnd();
6842                }
6843                oldClosureParameters_AST = (AST)currentAST.root;
6844            }
6845            else {
6846                boolean synPredMatched234 = false;
6847                if (((LA(1)==LPAREN||LA(1)==BOR) && (_tokenSet_83.member(LA(2))) && (_tokenSet_84.member(LA(3))))) {
6848                    int _m234 = mark();
6849                    synPredMatched234 = true;
6850                    inputState.guessing++;
6851                    try {
6852                        {
6853                        {
6854                        switch ( LA(1)) {
6855                        case BOR:
6856                        {
6857                            match(BOR);
6858                            nls();
6859                            break;
6860                        }
6861                        case LPAREN:
6862                        {
6863                            break;
6864                        }
6865                        default:
6866                        {
6867                            throw new NoViableAltException(LT(1), getFilename());
6868                        }
6869                        }
6870                        }
6871                        match(LPAREN);
6872                        parameterDeclarationList();
6873                        match(RPAREN);
6874                        nls();
6875                        match(BOR);
6876                        }
6877                    }
6878                    catch (RecognitionException pe) {
6879                        synPredMatched234 = false;
6880                    }
6881                    rewind(_m234);
6882                    inputState.guessing--;
6883                }
6884                if ( synPredMatched234 ) {
6885                    {
6886                    switch ( LA(1)) {
6887                    case BOR:
6888                    {
6889                        match(BOR);
6890                        nls();
6891                        break;
6892                    }
6893                    case LPAREN:
6894                    {
6895                        break;
6896                    }
6897                    default:
6898                    {
6899                        throw new NoViableAltException(LT(1), getFilename());
6900                    }
6901                    }
6902                    }
6903                    match(LPAREN);
6904                    parameterDeclarationList();
6905                    astFactory.addASTChild(currentAST, returnAST);
6906                    match(RPAREN);
6907                    nls();
6908                    match(BOR);
6909                    nls();
6910                    oldClosureParameters_AST = (AST)currentAST.root;
6911                }
6912                else {
6913                    boolean synPredMatched238 = false;
6914                    if (((_tokenSet_85.member(LA(1))) && (_tokenSet_86.member(LA(2))) && (_tokenSet_87.member(LA(3))))) {
6915                        int _m238 = mark();
6916                        synPredMatched238 = true;
6917                        inputState.guessing++;
6918                        try {
6919                            {
6920                            {
6921                            switch ( LA(1)) {
6922                            case BOR:
6923                            {
6924                                match(BOR);
6925                                nls();
6926                                break;
6927                            }
6928                            case IDENT:
6929                            case LITERAL_void:
6930                            case LITERAL_boolean:
6931                            case LITERAL_byte:
6932                            case LITERAL_char:
6933                            case LITERAL_short:
6934                            case LITERAL_int:
6935                            case LITERAL_float:
6936                            case LITERAL_long:
6937                            case LITERAL_double:
6938                            case LITERAL_any:
6939                            {
6940                                break;
6941                            }
6942                            default:
6943                            {
6944                                throw new NoViableAltException(LT(1), getFilename());
6945                            }
6946                            }
6947                            }
6948                            simpleParameterDeclarationList();
6949                            nls();
6950                            match(BOR);
6951                            }
6952                        }
6953                        catch (RecognitionException pe) {
6954                            synPredMatched238 = false;
6955                        }
6956                        rewind(_m238);
6957                        inputState.guessing--;
6958                    }
6959                    if ( synPredMatched238 ) {
6960                        {
6961                        switch ( LA(1)) {
6962                        case BOR:
6963                        {
6964                            match(BOR);
6965                            nls();
6966                            break;
6967                        }
6968                        case IDENT:
6969                        case LITERAL_void:
6970                        case LITERAL_boolean:
6971                        case LITERAL_byte:
6972                        case LITERAL_char:
6973                        case LITERAL_short:
6974                        case LITERAL_int:
6975                        case LITERAL_float:
6976                        case LITERAL_long:
6977                        case LITERAL_double:
6978                        case LITERAL_any:
6979                        {
6980                            break;
6981                        }
6982                        default:
6983                        {
6984                            throw new NoViableAltException(LT(1), getFilename());
6985                        }
6986                        }
6987                        }
6988                        simpleParameterDeclarationList();
6989                        astFactory.addASTChild(currentAST, returnAST);
6990                        nls();
6991                        match(BOR);
6992                        nls();
6993                        oldClosureParameters_AST = (AST)currentAST.root;
6994                    }
6995                    else {
6996                        throw new NoViableAltException(LT(1), getFilename());
6997                    }
6998                    }}}
6999                    returnAST = oldClosureParameters_AST;
7000                }
7001                
7002/** A block known to be a closure, but which omits its arguments, is given this placeholder.
7003 * A subsequent pass is responsible for deciding if there is an implicit 'it' parameter,
7004 * or if the parameter list should be empty.
7005 */

7006    public final void implicitParameters() throws RecognitionException, TokenStreamException {
7007        
7008        returnAST = null;
7009        ASTPair currentAST = new ASTPair();
7010        AST implicitParameters_AST = null;
7011        Token first = LT(1);
7012        
7013        if ( inputState.guessing==0 ) {
7014            implicitParameters_AST = (AST)currentAST.root;
7015            implicitParameters_AST = (AST)astFactory.make( (new ASTArray(1)).add(create(IMPLICIT_PARAMETERS,"IMPLICIT_PARAMETERS",first,LT(1))));
7016            currentAST.root = implicitParameters_AST;
7017            currentAST.child = implicitParameters_AST!=null &&implicitParameters_AST.getFirstChild()!=null ?
7018                implicitParameters_AST.getFirstChild() : implicitParameters_AST;
7019            currentAST.advanceChildToEnd();
7020        }
7021        implicitParameters_AST = (AST)currentAST.root;
7022        returnAST = implicitParameters_AST;
7023    }
7024    
7025/** Lookahead to check whether a block begins with explicit closure arguments. */
7026    public final void closureParametersStart() throws RecognitionException, TokenStreamException {
7027        
7028        returnAST = null;
7029        ASTPair currentAST = new ASTPair();
7030        AST closureParametersStart_AST = null;
7031        
7032        boolean synPredMatched228 = false;
7033        if ((((_tokenSet_80.member(LA(1))) && (_tokenSet_88.member(LA(2))) && (_tokenSet_89.member(LA(3))))&&(compatibilityMode))) {
7034            int _m228 = mark();
7035            synPredMatched228 = true;
7036            inputState.guessing++;
7037            try {
7038                {
7039                oldClosureParametersStart();
7040                }
7041            }
7042            catch (RecognitionException pe) {
7043                synPredMatched228 = false;
7044            }
7045            rewind(_m228);
7046            inputState.guessing--;
7047        }
7048        if ( synPredMatched228 ) {
7049            oldClosureParametersStart();
7050        }
7051        else if ((_tokenSet_78.member(LA(1))) && (_tokenSet_90.member(LA(2))) && (_tokenSet_91.member(LA(3)))) {
7052            parameterDeclarationList();
7053            nls();
7054            AST tmp176_AST = null;
7055            tmp176_AST = astFactory.create(LT(1));
7056            match(CLOSURE_OP);
7057        }
7058        else {
7059            throw new NoViableAltException(LT(1), getFilename());
7060        }
7061        
7062        returnAST = closureParametersStart_AST;
7063    }
7064    
7065/** Simple names, as in {x|...}, are completely equivalent to {(def x)|...}. Build the right AST. */
7066    public final void closureParameter() throws RecognitionException, TokenStreamException {
7067        
7068        returnAST = null;
7069        ASTPair currentAST = new ASTPair();
7070        AST closureParameter_AST = null;
7071        Token id = null;
7072        AST id_AST = null;
7073        Token first = LT(1);
7074        
7075        id = LT(1);
7076        id_AST = astFactory.create(id);
7077        match(IDENT);
7078        if ( inputState.guessing==0 ) {
7079            closureParameter_AST = (AST)currentAST.root;
7080            closureParameter_AST = (AST)astFactory.make( (new ASTArray(4)).add(create(PARAMETER_DEF,"PARAMETER_DEF",first,LT(1))).add((AST)astFactory.make( (new ASTArray(1)).add(create(MODIFIERS,"MODIFIERS",first,LT(1))))).add((AST)astFactory.make( (new ASTArray(1)).add(create(TYPE,"TYPE",first,LT(1))))).add(id_AST));
7081            currentAST.root = closureParameter_AST;
7082            currentAST.child = closureParameter_AST!=null &&closureParameter_AST.getFirstChild()!=null ?
7083                closureParameter_AST.getFirstChild() : closureParameter_AST;
7084            currentAST.advanceChildToEnd();
7085        }
7086        returnAST = closureParameter_AST;
7087    }
7088    
7089/** A block which is known to be a closure, even if it has no apparent arguments.
7090 * A block inside an expression or after a method call is always assumed to be a closure.
7091 * Only labeled, unparameterized blocks which occur directly as substatements are kept open.
7092 */

7093    public final void closedBlock() throws RecognitionException, TokenStreamException {
7094        
7095        returnAST = null;
7096        ASTPair currentAST = new ASTPair();
7097        AST closedBlock_AST = null;
7098        Token lc = null;
7099        AST lc_AST = null;
7100        
7101        lc = LT(1);
7102        lc_AST = astFactory.create(lc);
7103        astFactory.makeASTRoot(currentAST, lc_AST);
7104        match(LCURLY);
7105        nls();
7106        if ( inputState.guessing==0 ) {
7107            lc_AST.setType(CLOSED_BLOCK);
7108        }
7109        closureParametersOpt(true);
7110        astFactory.addASTChild(currentAST, returnAST);
7111        blockBody(EOF);
7112        astFactory.addASTChild(currentAST, returnAST);
7113        match(RCURLY);
7114        closedBlock_AST = (AST)currentAST.root;
7115        returnAST = closedBlock_AST;
7116    }
7117    
7118/** A sub-block of a block can be either open or closed.
7119 * It is closed if and only if there are explicit closure arguments.
7120 * Compare this to a block which is appended to a method call,
7121 * which is given closure arguments, even if they are not explicit in the code.
7122 */

7123    public final void openOrClosedBlock() throws RecognitionException, TokenStreamException {
7124        
7125        returnAST = null;
7126        ASTPair currentAST = new ASTPair();
7127        AST openOrClosedBlock_AST = null;
7128        Token lc = null;
7129        AST lc_AST = null;
7130        AST cp_AST = null;
7131        
7132        lc = LT(1);
7133        lc_AST = astFactory.create(lc);
7134        astFactory.makeASTRoot(currentAST, lc_AST);
7135        match(LCURLY);
7136        nls();
7137        closureParametersOpt(false);
7138        cp_AST = (AST)returnAST;
7139        astFactory.addASTChild(currentAST, returnAST);
7140        if ( inputState.guessing==0 ) {
7141            if (cp_AST == null) lc_AST.setType(SLIST);
7142            else lc_AST.setType(CLOSED_BLOCK);
7143            
7144        }
7145        blockBody(EOF);
7146        astFactory.addASTChild(currentAST, returnAST);
7147        match(RCURLY);
7148        openOrClosedBlock_AST = (AST)currentAST.root;
7149        returnAST = openOrClosedBlock_AST;
7150    }
7151    
7152/** A labeled statement, consisting of a vanilla identifier followed by a colon. */
7153    public final void statementLabelPrefix() throws RecognitionException, TokenStreamException {
7154        
7155        returnAST = null;
7156        ASTPair currentAST = new ASTPair();
7157        AST statementLabelPrefix_AST = null;
7158        Token c = null;
7159        AST c_AST = null;
7160        
7161        AST tmp179_AST = null;
7162        tmp179_AST = astFactory.create(LT(1));
7163        astFactory.addASTChild(currentAST, tmp179_AST);
7164        match(IDENT);
7165        c = LT(1);
7166        c_AST = astFactory.create(c);
7167        astFactory.makeASTRoot(currentAST, c_AST);
7168        match(COLON);
7169        if ( inputState.guessing==0 ) {
7170            c_AST.setType(LABELED_STAT);
7171        }
7172        statementLabelPrefix_AST = (AST)currentAST.root;
7173        returnAST = statementLabelPrefix_AST;
7174    }
7175    
7176/** An expression statement can be any general expression.
7177 * <p>
7178 * An expression statement can also be a <em>command</em>,
7179 * which is a simple method call in which the outermost parentheses are omitted.
7180 * <p>
7181 * Certain "suspicious" looking forms are flagged for the user to disambiguate.
7182 */

7183    public final void expressionStatement(
7184        int prevToken
7185    ) throws RecognitionException, TokenStreamException {
7186        
7187        returnAST = null;
7188        ASTPair currentAST = new ASTPair();
7189        AST expressionStatement_AST = null;
7190        AST head_AST = null;
7191        AST cmd_AST = null;
7192        Token first = LT(1);boolean isPathExpr = false;
7193        
7194        {
7195        boolean synPredMatched293 = false;
7196        if (((_tokenSet_19.member(LA(1))) && (_tokenSet_8.member(LA(2))) && (_tokenSet_20.member(LA(3))))) {
7197            int _m293 = mark();
7198            synPredMatched293 = true;
7199            inputState.guessing++;
7200            try {
7201                {
7202                suspiciousExpressionStatementStart();
7203                }
7204            }
7205            catch (RecognitionException pe) {
7206                synPredMatched293 = false;
7207            }
7208            rewind(_m293);
7209            inputState.guessing--;
7210        }
7211        if ( synPredMatched293 ) {
7212            checkSuspiciousExpressionStatement(prevToken);
7213            astFactory.addASTChild(currentAST, returnAST);
7214        }
7215        else if ((_tokenSet_19.member(LA(1))) && (_tokenSet_8.member(LA(2))) && (_tokenSet_20.member(LA(3)))) {
7216        }
7217        else {
7218            throw new NoViableAltException(LT(1), getFilename());
7219        }
7220        
7221        }
7222        expression(LC_STMT);
7223        head_AST = (AST)returnAST;
7224        astFactory.addASTChild(currentAST, returnAST);
7225        if ( inputState.guessing==0 ) {
7226            isPathExpr = (head_AST == lastPathExpression);
7227        }
7228        {
7229        if (((_tokenSet_19.member(LA(1))))&&(isPathExpr)) {
7230            commandArguments(head_AST);
7231            cmd_AST = (AST)returnAST;
7232            if ( inputState.guessing==0 ) {
7233                expressionStatement_AST = (AST)currentAST.root;
7234                expressionStatement_AST = cmd_AST;
7235                currentAST.root = expressionStatement_AST;
7236                currentAST.child = expressionStatement_AST!=null &&expressionStatement_AST.getFirstChild()!=null ?
7237                    expressionStatement_AST.getFirstChild() : expressionStatement_AST;
7238                currentAST.advanceChildToEnd();
7239            }
7240        }
7241        else if ((_tokenSet_9.member(LA(1)))) {
7242        }
7243        else {
7244            throw new NoViableAltException(LT(1), getFilename());
7245        }
7246        
7247        }
7248        if ( inputState.guessing==0 ) {
7249            expressionStatement_AST = (AST)currentAST.root;
7250            expressionStatement_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(EXPR,"EXPR",first,LT(1))).add(expressionStatement_AST));
7251            currentAST.root = expressionStatement_AST;
7252            currentAST.child = expressionStatement_AST!=null &&expressionStatement_AST.getFirstChild()!=null ?
7253                expressionStatement_AST.getFirstChild() : expressionStatement_AST;
7254            currentAST.advanceChildToEnd();
7255        }
7256        expressionStatement_AST = (AST)currentAST.root;
7257        returnAST = expressionStatement_AST;
7258    }
7259    
7260/** Things that can show up as expressions, but only in strict
7261 * contexts like inside parentheses, argument lists, and list constructors.
7262 */

7263    public final void strictContextExpression() throws RecognitionException, TokenStreamException {
7264        
7265        returnAST = null;
7266        ASTPair currentAST = new ASTPair();
7267        AST strictContextExpression_AST = null;
7268        Token first = LT(1);
7269        
7270        {
7271        boolean synPredMatched435 = false;
7272        if (((_tokenSet_12.member(LA(1))) && (_tokenSet_92.member(LA(2))) && (_tokenSet_93.member(LA(3))))) {
7273            int _m435 = mark();
7274            synPredMatched435 = true;
7275            inputState.guessing++;
7276            try {
7277                {
7278                declarationStart();
7279                }
7280            }
7281            catch (RecognitionException pe) {
7282                synPredMatched435 = false;
7283            }
7284            rewind(_m435);
7285            inputState.guessing--;
7286        }
7287        if ( synPredMatched435 ) {
7288            singleDeclaration();
7289            astFactory.addASTChild(currentAST, returnAST);
7290        }
7291        else if ((_tokenSet_19.member(LA(1))) && (_tokenSet_64.member(LA(2))) && (_tokenSet_20.member(LA(3)))) {
7292            expression(0);
7293            astFactory.addASTChild(currentAST, returnAST);
7294        }
7295        else if (((LA(1) >= LITERAL_return && LA(1) <= LITERAL_assert))) {
7296            branchStatement();
7297            astFactory.addASTChild(currentAST, returnAST);
7298        }
7299        else if ((LA(1)==AT) && (LA(2)==IDENT) && (_tokenSet_94.member(LA(3)))) {
7300            annotation();
7301            astFactory.addASTChild(currentAST, returnAST);
7302        }
7303        else {
7304            throw new NoViableAltException(LT(1), getFilename());
7305        }
7306        
7307        }
7308        if ( inputState.guessing==0 ) {
7309            strictContextExpression_AST = (AST)currentAST.root;
7310            strictContextExpression_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(EXPR,"EXPR",first,LT(1))).add(strictContextExpression_AST));
7311            currentAST.root = strictContextExpression_AST;
7312            currentAST.child = strictContextExpression_AST!=null &&strictContextExpression_AST.getFirstChild()!=null ?
7313                strictContextExpression_AST.getFirstChild() : strictContextExpression_AST;
7314            currentAST.advanceChildToEnd();
7315        }
7316        strictContextExpression_AST = (AST)currentAST.root;
7317        returnAST = strictContextExpression_AST;
7318    }
7319    
7320/** In Java, "if", "while", and "for" statements can take random, non-braced statements as their bodies.
7321 * Support this practice, even though it isn't very Groovy.
7322 */

7323    public final void compatibleBodyStatement() throws RecognitionException, TokenStreamException {
7324        
7325        returnAST = null;
7326        ASTPair currentAST = new ASTPair();
7327        AST compatibleBodyStatement_AST = null;
7328        
7329        boolean synPredMatched279 = false;
7330        if (((LA(1)==LCURLY) && (_tokenSet_70.member(LA(2))) && (_tokenSet_8.member(LA(3))))) {
7331            int _m279 = mark();
7332            synPredMatched279 = true;
7333            inputState.guessing++;
7334            try {
7335                {
7336                match(LCURLY);
7337                }
7338            }
7339            catch (RecognitionException pe) {
7340                synPredMatched279 = false;
7341            }
7342            rewind(_m279);
7343            inputState.guessing--;
7344        }
7345        if ( synPredMatched279 ) {
7346            compoundStatement();
7347            astFactory.addASTChild(currentAST, returnAST);
7348            compatibleBodyStatement_AST = (AST)currentAST.root;
7349        }
7350        else if ((_tokenSet_15.member(LA(1))) && (_tokenSet_8.member(LA(2))) && (_tokenSet_18.member(LA(3)))) {
7351            statement(EOF);
7352            astFactory.addASTChild(currentAST, returnAST);
7353            compatibleBodyStatement_AST = (AST)currentAST.root;
7354        }
7355        else {
7356            throw new NoViableAltException(LT(1), getFilename());
7357        }
7358        
7359        returnAST = compatibleBodyStatement_AST;
7360    }
7361    
7362    public final void forStatement() throws RecognitionException, TokenStreamException {
7363        
7364        returnAST = null;
7365        ASTPair currentAST = new ASTPair();
7366        AST forStatement_AST = null;
7367        Token f = null;
7368        AST f_AST = null;
7369        
7370        f = LT(1);
7371        f_AST = astFactory.create(f);
7372        astFactory.makeASTRoot(currentAST, f_AST);
7373        match(LITERAL_for);
7374        match(LPAREN);
7375        {
7376        boolean synPredMatched270 = false;
7377        if (((_tokenSet_95.member(LA(1))) && (_tokenSet_71.member(LA(2))) && (_tokenSet_96.member(LA(3))))) {
7378            int _m270 = mark();
7379            synPredMatched270 = true;
7380            inputState.guessing++;
7381            try {
7382                {
7383                forInit();
7384                match(SEMI);
7385                }
7386            }
7387            catch (RecognitionException pe) {
7388                synPredMatched270 = false;
7389            }
7390            rewind(_m270);
7391            inputState.guessing--;
7392        }
7393        if ( synPredMatched270 ) {
7394            traditionalForClause();
7395            astFactory.addASTChild(currentAST, returnAST);
7396        }
7397        else if ((_tokenSet_12.member(LA(1))) && (_tokenSet_97.member(LA(2))) && (_tokenSet_98.member(LA(3)))) {
7398            forInClause();
7399            astFactory.addASTChild(currentAST, returnAST);
7400        }
7401        else {
7402            throw new NoViableAltException(LT(1), getFilename());
7403        }
7404        
7405        }
7406        match(RPAREN);
7407        nlsWarn();
7408        compatibleBodyStatement();
7409        astFactory.addASTChild(currentAST, returnAST);
7410        forStatement_AST = (AST)currentAST.root;
7411        returnAST = forStatement_AST;
7412    }
7413    
7414    public final void casesGroup() throws RecognitionException, TokenStreamException {
7415        
7416        returnAST = null;
7417        ASTPair currentAST = new ASTPair();
7418        AST casesGroup_AST = null;
7419        Token first = LT(1);
7420        
7421        {
7422        int _cnt305=0;
7423        _loop305:
7424        do {
7425            if ((LA(1)==LITERAL_default||LA(1)==LITERAL_case)) {
7426                aCase();
7427                astFactory.addASTChild(currentAST, returnAST);
7428            }
7429            else {
7430                if ( _cnt305>=1 ) { break _loop305; } else {throw new NoViableAltException(LT(1), getFilename());}
7431            }
7432            
7433            _cnt305++;
7434        } while (true);
7435        }
7436        caseSList();
7437        astFactory.addASTChild(currentAST, returnAST);
7438        if ( inputState.guessing==0 ) {
7439            casesGroup_AST = (AST)currentAST.root;
7440            casesGroup_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(CASE_GROUP,"CASE_GROUP",first,LT(1))).add(casesGroup_AST));
7441            currentAST.root = casesGroup_AST;
7442            currentAST.child = casesGroup_AST!=null &&casesGroup_AST.getFirstChild()!=null ?
7443                casesGroup_AST.getFirstChild() : casesGroup_AST;
7444            currentAST.advanceChildToEnd();
7445        }
7446        casesGroup_AST = (AST)currentAST.root;
7447        returnAST = casesGroup_AST;
7448    }
7449    
7450    public final void tryBlock() throws RecognitionException, TokenStreamException {
7451        
7452        returnAST = null;
7453        ASTPair currentAST = new ASTPair();
7454        AST tryBlock_AST = null;
7455        
7456        AST tmp182_AST = null;
7457        tmp182_AST = astFactory.create(LT(1));
7458        astFactory.makeASTRoot(currentAST, tmp182_AST);
7459        match(LITERAL_try);
7460        nlsWarn();
7461        compoundStatement();
7462        astFactory.addASTChild(currentAST, returnAST);
7463        {
7464        _loop322:
7465        do {
7466            if ((LA(1)==NLS||LA(1)==LITERAL_catch) && (LA(2)==LPAREN||LA(2)==LITERAL_catch) && (_tokenSet_99.member(LA(3)))) {
7467                nls();
7468                handler();
7469                astFactory.addASTChild(currentAST, returnAST);
7470            }
7471            else {
7472                break _loop322;
7473            }
7474            
7475        } while (true);
7476        }
7477        {
7478        if ((LA(1)==NLS||LA(1)==LITERAL_finally) && (_tokenSet_100.member(LA(2))) && (_tokenSet_70.member(LA(3)))) {
7479            nls();
7480            finallyClause();
7481            astFactory.addASTChild(currentAST, returnAST);
7482        }
7483        else if ((_tokenSet_9.member(LA(1))) && (_tokenSet_10.member(LA(2))) && (_tokenSet_11.member(LA(3)))) {
7484        }
7485        else {
7486            throw new NoViableAltException(LT(1), getFilename());
7487        }
7488        
7489        }
7490        tryBlock_AST = (AST)currentAST.root;
7491        returnAST = tryBlock_AST;
7492    }
7493    
7494/** In Groovy, return, break, continue, throw, and assert can be used in a parenthesized expression context.
7495 * Example: println (x || (return)); println assert x, "won't print a false value!"
7496 * If an optional expression is missing, its value is void (this coerces to null when a value is required).
7497 */

7498    public final void branchStatement() throws RecognitionException, TokenStreamException {
7499        
7500        returnAST = null;
7501        ASTPair currentAST = new ASTPair();
7502        AST branchStatement_AST = null;
7503        
7504        switch ( LA(1)) {
7505        case LITERAL_return:
7506        {
7507            AST tmp183_AST = null;
7508            tmp183_AST = astFactory.create(LT(1));
7509            astFactory.makeASTRoot(currentAST, tmp183_AST);
7510            match(LITERAL_return);
7511            {
7512            switch ( LA(1)) {
7513            case IDENT:
7514            case LBRACK:
7515            case LPAREN:
7516            case LITERAL_super:
7517            case LITERAL_void:
7518            case LITERAL_boolean:
7519            case LITERAL_byte:
7520            case LITERAL_char:
7521            case LITERAL_short:
7522            case LITERAL_int:
7523            case LITERAL_float:
7524            case LITERAL_long:
7525            case LITERAL_double:
7526            case LITERAL_any:
7527            case LCURLY:
7528            case LITERAL_this:
7529            case STRING_LITERAL:
7530            case PLUS:
7531            case MINUS:
7532            case INC:
7533            case DEC:
7534            case BNOT:
7535            case LNOT:
7536            case DOLLAR:
7537            case STRING_CTOR_START:
7538            case LITERAL_new:
7539            case LITERAL_true:
7540            case LITERAL_false:
7541            case LITERAL_null:
7542            case NUM_INT:
7543            case NUM_FLOAT:
7544            case NUM_LONG:
7545            case NUM_DOUBLE:
7546            case NUM_BIG_INT:
7547            case NUM_BIG_DECIMAL:
7548            {
7549                expression(0);
7550                astFactory.addASTChild(currentAST, returnAST);
7551                break;
7552            }
7553            case EOF:
7554            case RBRACK:
7555            case COMMA:
7556            case RPAREN:
7557            case RCURLY:
7558            case SEMI:
7559            case NLS:
7560            case LITERAL_default:
7561            case LITERAL_else:
7562            case LITERAL_case:
7563            {
7564                break;
7565            }
7566            default:
7567            {
7568                throw new NoViableAltException(LT(1), getFilename());
7569            }
7570            }
7571            }
7572            branchStatement_AST = (AST)currentAST.root;
7573            break;
7574        }
7575        case LITERAL_break:
7576        case LITERAL_continue:
7577        {
7578            {
7579            switch ( LA(1)) {
7580            case LITERAL_break:
7581            {
7582                AST tmp184_AST = null;
7583                tmp184_AST = astFactory.create(LT(1));
7584                astFactory.makeASTRoot(currentAST, tmp184_AST);
7585                match(LITERAL_break);
7586                break;
7587            }
7588            case LITERAL_continue:
7589            {
7590                AST tmp185_AST = null;
7591                tmp185_AST = astFactory.create(LT(1));
7592                astFactory.makeASTRoot(currentAST, tmp185_AST);
7593                match(LITERAL_continue);
7594                break;
7595            }
7596            default:
7597            {
7598                throw new NoViableAltException(LT(1), getFilename());
7599            }
7600            }
7601            }
7602            {
7603            boolean synPredMatched285 = false;
7604            if (((LA(1)==IDENT) && (LA(2)==COLON) && (_tokenSet_101.member(LA(3))))) {
7605                int _m285 = mark();
7606                synPredMatched285 = true;
7607                inputState.guessing++;
7608                try {
7609                    {
7610                    match(IDENT);
7611                    match(COLON);
7612                    }
7613                }
7614                catch (RecognitionException pe) {
7615                    synPredMatched285 = false;
7616                }
7617                rewind(_m285);
7618                inputState.guessing--;
7619            }
7620            if ( synPredMatched285 ) {
7621                statementLabelPrefix();
7622                astFactory.addASTChild(currentAST, returnAST);
7623            }
7624            else if ((_tokenSet_101.member(LA(1))) && (_tokenSet_20.member(LA(2))) && (_tokenSet_11.member(LA(3)))) {
7625            }
7626            else {
7627                throw new NoViableAltException(LT(1), getFilename());
7628            }
7629            
7630            }
7631            {
7632            switch ( LA(1)) {
7633            case IDENT:
7634            case LBRACK:
7635            case LPAREN:
7636            case LITERAL_super:
7637            case LITERAL_void:
7638            case LITERAL_boolean:
7639            case LITERAL_byte:
7640            case LITERAL_char:
7641            case LITERAL_short:
7642            case LITERAL_int:
7643            case LITERAL_float:
7644            case LITERAL_long:
7645            case LITERAL_double:
7646            case LITERAL_any:
7647            case LCURLY:
7648            case LITERAL_this:
7649            case STRING_LITERAL:
7650            case PLUS:
7651            case MINUS:
7652            case INC:
7653            case DEC:
7654            case BNOT:
7655            case LNOT:
7656            case DOLLAR:
7657            case STRING_CTOR_START:
7658            case LITERAL_new:
7659            case LITERAL_true:
7660            case LITERAL_false:
7661            case LITERAL_null:
7662            case NUM_INT:
7663            case NUM_FLOAT:
7664            case NUM_LONG:
7665            case NUM_DOUBLE:
7666            case NUM_BIG_INT:
7667            case NUM_BIG_DECIMAL:
7668            {
7669                expression(0);
7670                astFactory.addASTChild(currentAST, returnAST);
7671                break;
7672            }
7673            case EOF:
7674            case RBRACK:
7675            case COMMA:
7676            case RPAREN:
7677            case RCURLY:
7678            case SEMI:
7679            case NLS:
7680            case LITERAL_default:
7681            case LITERAL_else:
7682            case LITERAL_case:
7683            {
7684                break;
7685            }
7686            default:
7687            {
7688                throw new NoViableAltException(LT(1), getFilename());
7689            }
7690            }
7691            }
7692            branchStatement_AST = (AST)currentAST.root;
7693            break;
7694        }
7695        case LITERAL_throw:
7696        {
7697            AST tmp186_AST = null;
7698            tmp186_AST = astFactory.create(LT(1));
7699            astFactory.makeASTRoot(currentAST, tmp186_AST);
7700            match(LITERAL_throw);
7701            expression(0);
7702            astFactory.addASTChild(currentAST, returnAST);
7703            branchStatement_AST = (AST)currentAST.root;
7704            break;
7705        }
7706        case LITERAL_assert:
7707        {
7708            AST tmp187_AST = null;
7709            tmp187_AST = astFactory.create(LT(1));
7710            astFactory.makeASTRoot(currentAST, tmp187_AST);
7711            match(LITERAL_assert);
7712            expression(0);
7713            astFactory.addASTChild(currentAST, returnAST);
7714            {
7715            if ((LA(1)==COMMA||LA(1)==COLON) && (_tokenSet_19.member(LA(2))) && (_tokenSet_17.member(LA(3)))) {
7716                {
7717                switch ( LA(1)) {
7718                case COMMA:
7719                {
7720                    match(COMMA);
7721                    break;
7722                }
7723                case COLON:
7724                {
7725                    match(COLON);
7726                    break;
7727                }
7728                default:
7729                {
7730                    throw new NoViableAltException(LT(1), getFilename());
7731                }
7732                }
7733                }
7734                expression(0);
7735                astFactory.addASTChild(currentAST, returnAST);
7736            }
7737            else if ((_tokenSet_102.member(LA(1))) && (_tokenSet_20.member(LA(2))) && (_tokenSet_11.member(LA(3)))) {
7738            }
7739            else {
7740                throw new NoViableAltException(LT(1), getFilename());
7741            }
7742            
7743            }
7744            branchStatement_AST = (AST)currentAST.root;
7745            break;
7746        }
7747        default:
7748        {
7749            throw new NoViableAltException(LT(1), getFilename());
7750        }
7751        }
7752        returnAST = branchStatement_AST;
7753    }
7754    
7755    public final void forInit() throws RecognitionException, TokenStreamException {
7756        
7757        returnAST = null;
7758        ASTPair currentAST = new ASTPair();
7759        AST forInit_AST = null;
7760        Token first = LT(1);
7761        
7762        boolean synPredMatched314 = false;
7763        if (((_tokenSet_12.member(LA(1))) && (_tokenSet_13.member(LA(2))) && (_tokenSet_103.member(LA(3))))) {
7764            int _m314 = mark();
7765            synPredMatched314 = true;
7766            inputState.guessing++;
7767            try {
7768                {
7769                declarationStart();
7770                }
7771            }
7772            catch (RecognitionException pe) {
7773                synPredMatched314 = false;
7774            }
7775            rewind(_m314);
7776            inputState.guessing--;
7777        }
7778        if ( synPredMatched314 ) {
7779            declaration();
7780            astFactory.addASTChild(currentAST, returnAST);
7781            forInit_AST = (AST)currentAST.root;
7782        }
7783        else if ((_tokenSet_95.member(LA(1))) && (_tokenSet_71.member(LA(2))) && (_tokenSet_96.member(LA(3)))) {
7784            {
7785            switch ( LA(1)) {
7786            case FINAL:
7787            case ABSTRACT:
7788            case STRICTFP:
7789            case LITERAL_static:
7790            case LITERAL_def:
7791            case AT:
7792            case IDENT:
7793            case LBRACK:
7794            case LPAREN:
7795            case LITERAL_super:
7796            case LITERAL_void:
7797            case LITERAL_boolean:
7798            case LITERAL_byte:
7799            case LITERAL_char:
7800            case LITERAL_short:
7801            case LITERAL_int:
7802            case LITERAL_float:
7803            case LITERAL_long:
7804            case LITERAL_double:
7805            case LITERAL_any:
7806            case LITERAL_private:
7807            case LITERAL_public:
7808            case LITERAL_protected:
7809            case LITERAL_transient:
7810            case LITERAL_native:
7811            case LITERAL_threadsafe:
7812            case LITERAL_synchronized:
7813            case LITERAL_volatile:
7814            case LCURLY:
7815            case LITERAL_this:
7816            case STRING_LITERAL:
7817            case LITERAL_return:
7818            case LITERAL_break:
7819            case LITERAL_continue:
7820            case LITERAL_throw:
7821            case LITERAL_assert:
7822            case PLUS:
7823            case MINUS:
7824            case INC:
7825            case DEC:
7826            case BNOT:
7827            case LNOT:
7828            case DOLLAR:
7829            case STRING_CTOR_START:
7830            case LITERAL_new:
7831            case LITERAL_true:
7832            case LITERAL_false:
7833            case LITERAL_null:
7834            case NUM_INT:
7835            case NUM_FLOAT:
7836            case NUM_LONG:
7837            case NUM_DOUBLE:
7838            case NUM_BIG_INT:
7839            case NUM_BIG_DECIMAL:
7840            {
7841                controlExpressionList();
7842                astFactory.addASTChild(currentAST, returnAST);
7843                break;
7844            }
7845            case SEMI:
7846            {
7847                break;
7848            }
7849            default:
7850            {
7851                throw new NoViableAltException(LT(1), getFilename());
7852            }
7853            }
7854            }
7855            if ( inputState.guessing==0 ) {
7856                forInit_AST = (AST)currentAST.root;
7857                forInit_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(FOR_INIT,"FOR_INIT",first,LT(1))).add(forInit_AST));
7858                currentAST.root = forInit_AST;
7859                currentAST.child = forInit_AST!=null &&forInit_AST.getFirstChild()!=null ?
7860                    forInit_AST.getFirstChild() : forInit_AST;
7861                currentAST.advanceChildToEnd();
7862            }
7863            forInit_AST = (AST)currentAST.root;
7864        }
7865        else {
7866            throw new NoViableAltException(LT(1), getFilename());
7867        }
7868        
7869        returnAST = forInit_AST;
7870    }
7871    
7872    public final void traditionalForClause() throws RecognitionException, TokenStreamException {
7873        
7874        returnAST = null;
7875        ASTPair currentAST = new ASTPair();
7876        AST traditionalForClause_AST = null;
7877        
7878        forInit();
7879        astFactory.addASTChild(currentAST, returnAST);
7880        match(SEMI);
7881        forCond();
7882        astFactory.addASTChild(currentAST, returnAST);
7883        match(SEMI);
7884        forIter();
7885        astFactory.addASTChild(currentAST, returnAST);
7886        traditionalForClause_AST = (AST)currentAST.root;
7887        returnAST = traditionalForClause_AST;
7888    }
7889    
7890    public final void forInClause() throws RecognitionException, TokenStreamException {
7891        
7892        returnAST = null;
7893        ASTPair currentAST = new ASTPair();
7894        AST forInClause_AST = null;
7895        AST decl_AST = null;
7896        Token i = null;
7897        AST i_AST = null;
7898        Token c = null;
7899        AST c_AST = null;
7900        
7901        {
7902        boolean synPredMatched275 = false;
7903        if (((_tokenSet_12.member(LA(1))) && (_tokenSet_92.member(LA(2))))) {
7904            int _m275 = mark();
7905            synPredMatched275 = true;
7906            inputState.guessing++;
7907            try {
7908                {
7909                declarationStart();
7910                }
7911            }
7912            catch (RecognitionException pe) {
7913                synPredMatched275 = false;
7914            }
7915            rewind(_m275);
7916            inputState.guessing--;
7917        }
7918        if ( synPredMatched275 ) {
7919            singleDeclarationNoInit();
7920            decl_AST = (AST)returnAST;
7921            astFactory.addASTChild(currentAST, returnAST);
7922        }
7923        else if ((LA(1)==IDENT) && (LA(2)==COLON||LA(2)==LITERAL_in)) {
7924            AST tmp192_AST = null;
7925            tmp192_AST = astFactory.create(LT(1));
7926            astFactory.addASTChild(currentAST, tmp192_AST);
7927            match(IDENT);
7928        }
7929        else {
7930            throw new NoViableAltException(LT(1), getFilename());
7931        }
7932        
7933        }
7934        {
7935        switch ( LA(1)) {
7936        case LITERAL_in:
7937        {
7938            i = LT(1);
7939            i_AST = astFactory.create(i);
7940            astFactory.makeASTRoot(currentAST, i_AST);
7941            match(LITERAL_in);
7942            if ( inputState.guessing==0 ) {
7943                i_AST.setType(FOR_IN_ITERABLE);
7944            }
7945            shiftExpression(0);
7946            astFactory.addASTChild(currentAST, returnAST);
7947            break;
7948        }
7949        case COLON:
7950        {
7951            if ( inputState.guessing==0 ) {
7952                addWarning(
7953                "A colon at this point is legal Java but not recommended in Groovy.",
7954                "Use the 'in' keyword."
7955                );
7956                require(decl_AST != null,
7957                "Java-style for-each statement requires a type declaration."
7958                ,
7959                "Use the 'in' keyword, as for (x in y) {...}"
7960                );
7961                
7962            }
7963            c = LT(1);
7964            c_AST = astFactory.create(c);
7965            astFactory.makeASTRoot(currentAST, c_AST);
7966            match(COLON);
7967            if ( inputState.guessing==0 ) {
7968                c_AST.setType(FOR_IN_ITERABLE);
7969            }
7970            expression(0);
7971            astFactory.addASTChild(currentAST, returnAST);
7972            break;
7973        }
7974        default:
7975        {
7976            throw new NoViableAltException(LT(1), getFilename());
7977        }
7978        }
7979        }
7980        forInClause_AST = (AST)currentAST.root;
7981        returnAST = forInClause_AST;
7982    }
7983    
7984    public final void forCond() throws RecognitionException, TokenStreamException {
7985        
7986        returnAST = null;
7987        ASTPair currentAST = new ASTPair();
7988        AST forCond_AST = null;
7989        Token first = LT(1);
7990        
7991        {
7992        switch ( LA(1)) {
7993        case FINAL:
7994        case ABSTRACT:
7995        case STRICTFP:
7996        case LITERAL_static:
7997        case LITERAL_def:
7998        case AT:
7999        case IDENT:
8000        case LBRACK:
8001        case LPAREN:
8002        case LITERAL_super:
8003        case LITERAL_void:
8004        case LITERAL_boolean:
8005        case LITERAL_byte:
8006        case LITERAL_char:
8007        case LITERAL_short:
8008        case LITERAL_int:
8009        case LITERAL_float:
8010        case LITERAL_long:
8011        case LITERAL_double:
8012        case LITERAL_any:
8013        case LITERAL_private:
8014        case LITERAL_public:
8015        case LITERAL_protected:
8016        case LITERAL_transient:
8017        case LITERAL_native:
8018        case LITERAL_threadsafe:
8019        case LITERAL_synchronized:
8020        case LITERAL_volatile:
8021        case LCURLY:
8022        case LITERAL_this:
8023        case STRING_LITERAL:
8024        case LITERAL_return:
8025        case LITERAL_break:
8026        case LITERAL_continue:
8027        case LITERAL_throw:
8028        case LITERAL_assert:
8029        case PLUS:
8030        case MINUS:
8031        case INC:
8032        case DEC:
8033        case BNOT:
8034        case LNOT:
8035        case DOLLAR:
8036        case STRING_CTOR_START:
8037        case LITERAL_new:
8038        case LITERAL_true:
8039        case LITERAL_false:
8040        case LITERAL_null:
8041        case NUM_INT:
8042        case NUM_FLOAT:
8043        case NUM_LONG:
8044        case NUM_DOUBLE:
8045        case NUM_BIG_INT:
8046        case NUM_BIG_DECIMAL:
8047        {
8048            strictContextExpression();
8049            astFactory.addASTChild(currentAST, returnAST);
8050            break;
8051        }
8052        case SEMI:
8053        {
8054            break;
8055        }
8056        default:
8057        {
8058            throw new NoViableAltException(LT(1), getFilename());
8059        }
8060        }
8061        }
8062        if ( inputState.guessing==0 ) {
8063            forCond_AST = (AST)currentAST.root;
8064            forCond_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(FOR_CONDITION,"FOR_CONDITION",first,LT(1))).add(forCond_AST));
8065            currentAST.root = forCond_AST;
8066            currentAST.child = forCond_AST!=null &&forCond_AST.getFirstChild()!=null ?
8067                forCond_AST.getFirstChild() : forCond_AST;
8068            currentAST.advanceChildToEnd();
8069        }
8070        forCond_AST = (AST)currentAST.root;
8071        returnAST = forCond_AST;
8072    }
8073    
8074    public final void forIter() throws RecognitionException, TokenStreamException {
8075        
8076        returnAST = null;
8077        ASTPair currentAST = new ASTPair();
8078        AST forIter_AST = null;
8079        Token first = LT(1);
8080        
8081        {
8082        switch ( LA(1)) {
8083        case FINAL:
8084        case ABSTRACT:
8085        case STRICTFP:
8086        case LITERAL_static:
8087        case LITERAL_def:
8088        case AT:
8089        case IDENT:
8090        case LBRACK:
8091        case LPAREN:
8092        case LITERAL_super:
8093        case LITERAL_void:
8094        case LITERAL_boolean:
8095        case LITERAL_byte:
8096        case LITERAL_char:
8097        case LITERAL_short:
8098        case LITERAL_int:
8099        case LITERAL_float:
8100        case LITERAL_long:
8101        case LITERAL_double:
8102        case LITERAL_any:
8103        case LITERAL_private:
8104        case LITERAL_public:
8105        case LITERAL_protected:
8106        case LITERAL_transient:
8107        case LITERAL_native:
8108        case LITERAL_threadsafe:
8109        case LITERAL_synchronized:
8110        case LITERAL_volatile:
8111        case LCURLY:
8112        case LITERAL_this:
8113        case STRING_LITERAL:
8114        case LITERAL_return:
8115        case LITERAL_break:
8116        case LITERAL_continue:
8117        case LITERAL_throw:
8118        case LITERAL_assert:
8119        case PLUS:
8120        case MINUS:
8121        case INC:
8122        case DEC:
8123        case BNOT:
8124        case LNOT:
8125        case DOLLAR:
8126        case STRING_CTOR_START:
8127        case LITERAL_new:
8128        case LITERAL_true:
8129        case LITERAL_false:
8130        case LITERAL_null:
8131        case NUM_INT:
8132        case NUM_FLOAT:
8133        case NUM_LONG:
8134        case NUM_DOUBLE:
8135        case NUM_BIG_INT:
8136        case NUM_BIG_DECIMAL:
8137        {
8138            controlExpressionList();
8139            astFactory.addASTChild(currentAST, returnAST);
8140            break;
8141        }
8142        case RPAREN:
8143        {
8144            break;
8145        }
8146        default:
8147        {
8148            throw new NoViableAltException(LT(1), getFilename());
8149        }
8150        }
8151        }
8152        if ( inputState.guessing==0 ) {
8153            forIter_AST = (AST)currentAST.root;
8154            forIter_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(FOR_ITERATOR,"FOR_ITERATOR",first,LT(1))).add(forIter_AST));
8155            currentAST.root = forIter_AST;
8156            currentAST.child = forIter_AST!=null &&forIter_AST.getFirstChild()!=null ?
8157                forIter_AST.getFirstChild() : forIter_AST;
8158            currentAST.advanceChildToEnd();
8159        }
8160        forIter_AST = (AST)currentAST.root;
8161        returnAST = forIter_AST;
8162    }
8163    
8164    public final void shiftExpression(
8165        int lc_stmt
8166    ) throws RecognitionException, TokenStreamException {
8167        
8168        returnAST = null;
8169        ASTPair currentAST = new ASTPair();
8170        AST shiftExpression_AST = null;
8171        Token td = null;
8172        AST td_AST = null;
8173        
8174        additiveExpression(lc_stmt);
8175        astFactory.addASTChild(currentAST, returnAST);
8176        {
8177        _loop390:
8178        do {
8179            if ((_tokenSet_104.member(LA(1)))) {
8180                {
8181                switch ( LA(1)) {
8182                case SR:
8183                case BSR:
8184                case SL:
8185                {
8186                    {
8187                    switch ( LA(1)) {
8188                    case SL:
8189                    {
8190                        AST tmp193_AST = null;
8191                        tmp193_AST = astFactory.create(LT(1));
8192                        astFactory.makeASTRoot(currentAST, tmp193_AST);
8193                        match(SL);
8194                        break;
8195                    }
8196                    case SR:
8197                    {
8198                        AST tmp194_AST = null;
8199                        tmp194_AST = astFactory.create(LT(1));
8200                        astFactory.makeASTRoot(currentAST, tmp194_AST);
8201                        match(SR);
8202                        break;
8203                    }
8204                    case BSR:
8205                    {
8206                        AST tmp195_AST = null;
8207                        tmp195_AST = astFactory.create(LT(1));
8208                        astFactory.makeASTRoot(currentAST, tmp195_AST);
8209                        match(BSR);
8210                        break;
8211                    }
8212                    default:
8213                    {
8214                        throw new NoViableAltException(LT(1), getFilename());
8215                    }
8216                    }
8217                    }
8218                    break;
8219                }
8220                case RANGE_INCLUSIVE:
8221                {
8222                    AST tmp196_AST = null;
8223                    tmp196_AST = astFactory.create(LT(1));
8224                    astFactory.makeASTRoot(currentAST, tmp196_AST);
8225                    match(RANGE_INCLUSIVE);
8226                    break;
8227                }
8228                case RANGE_EXCLUSIVE:
8229                {
8230                    AST tmp197_AST = null;
8231                    tmp197_AST = astFactory.create(LT(1));
8232                    astFactory.makeASTRoot(currentAST, tmp197_AST);
8233                    match(RANGE_EXCLUSIVE);
8234                    break;
8235                }
8236                case TRIPLE_DOT:
8237                {
8238                    td = LT(1);
8239                    td_AST = astFactory.create(td);
8240                    astFactory.makeASTRoot(currentAST, td_AST);
8241                    match(TRIPLE_DOT);
8242                    if ( inputState.guessing==0 ) {
8243                        td_AST.setType(RANGE_EXCLUSIVE);
8244                    }
8245                    break;
8246                }
8247                default:
8248                {
8249                    throw new NoViableAltException(LT(1), getFilename());
8250                }
8251                }
8252                }
8253                nls();
8254                additiveExpression(0);
8255                astFactory.addASTChild(currentAST, returnAST);
8256            }
8257            else {
8258                break _loop390;
8259            }
8260            
8261        } while (true);
8262        }
8263        shiftExpression_AST = (AST)currentAST.root;
8264        returnAST = shiftExpression_AST;
8265    }
8266    
8267/** Lookahead for suspicious statement warnings and errors. */
8268    public final void suspiciousExpressionStatementStart() throws RecognitionException, TokenStreamException {
8269        
8270        returnAST = null;
8271        ASTPair currentAST = new ASTPair();
8272        AST suspiciousExpressionStatementStart_AST = null;
8273        
8274        {
8275        switch ( LA(1)) {
8276        case PLUS:
8277        case MINUS:
8278        {
8279            {
8280            switch ( LA(1)) {
8281            case PLUS:
8282            {
8283                AST tmp198_AST = null;
8284                tmp198_AST = astFactory.create(LT(1));
8285                astFactory.addASTChild(currentAST, tmp198_AST);
8286                match(PLUS);
8287                break;
8288            }
8289            case MINUS:
8290            {
8291                AST tmp199_AST = null;
8292                tmp199_AST = astFactory.create(LT(1));
8293                astFactory.addASTChild(currentAST, tmp199_AST);
8294                match(MINUS);
8295                break;
8296            }
8297            default:
8298            {
8299                throw new NoViableAltException(LT(1), getFilename());
8300            }
8301            }
8302            }
8303            break;
8304        }
8305        case LBRACK:
8306        case LPAREN:
8307        case LCURLY:
8308        {
8309            {
8310            switch ( LA(1)) {
8311            case LBRACK:
8312            {
8313                AST tmp200_AST = null;
8314                tmp200_AST = astFactory.create(LT(1));
8315                astFactory.addASTChild(currentAST, tmp200_AST);
8316                match(LBRACK);
8317                break;
8318            }
8319            case LPAREN:
8320            {
8321                AST tmp201_AST = null;
8322                tmp201_AST = astFactory.create(LT(1));
8323                astFactory.addASTChild(currentAST, tmp201_AST);
8324                match(LPAREN);
8325                break;
8326            }
8327            case LCURLY:
8328            {
8329                AST tmp202_AST = null;
8330                tmp202_AST = astFactory.create(LT(1));
8331                astFactory.addASTChild(currentAST, tmp202_AST);
8332                match(LCURLY);
8333                break;
8334            }
8335            default:
8336            {
8337                throw new NoViableAltException(LT(1), getFilename());
8338            }
8339            }
8340            }
8341            break;
8342        }
8343        default:
8344        {
8345            throw new NoViableAltException(LT(1), getFilename());
8346        }
8347        }
8348        }
8349        suspiciousExpressionStatementStart_AST = (AST)currentAST.root;
8350        returnAST = suspiciousExpressionStatementStart_AST;
8351    }
8352    
8353/**
8354 * If two statements are separated by newline (not SEMI), the second had
8355 * better not look like the latter half of an expression. If it does, issue a warning.
8356 * <p>
8357 * Also, if the expression starts with a closure, it needs to
8358 * have an explicit parameter list, in order to avoid the appearance of a
8359 * compound statement. This is a hard error.
8360 * <p>
8361 * These rules are different from Java's "dumb expression" restriction.
8362 * Unlike Java, Groovy blocks can end with arbitrary (even dumb) expressions,
8363 * as a consequence of optional 'return' and 'continue' tokens.
8364 * <p>
8365 * To make the programmer's intention clear, a leading closure must have an
8366 * explicit parameter list, and must not follow a previous statement separated
8367 * only by newlines.
8368 */

8369    public final void checkSuspiciousExpressionStatement(
8370        int prevToken
8371    ) throws RecognitionException, TokenStreamException {
8372        
8373        returnAST = null;
8374        ASTPair currentAST = new ASTPair();
8375        AST checkSuspiciousExpressionStatement_AST = null;
8376        
8377        boolean synPredMatched297 = false;
8378        if (((_tokenSet_19.member(LA(1))) && (_tokenSet_8.member(LA(2))) && (_tokenSet_20.member(LA(3))))) {
8379            int _m297 = mark();
8380            synPredMatched297 = true;
8381            inputState.guessing++;
8382            try {
8383                {
8384                if ((_tokenSet_105.member(LA(1)))) {
8385                    matchNot(LCURLY);
8386                }
8387                else if ((LA(1)==LCURLY)) {
8388                    match(LCURLY);
8389                    closureParametersStart();
8390                }
8391                else {
8392                    throw new NoViableAltException(LT(1), getFilename());
8393                }
8394                
8395                }
8396            }
8397            catch (RecognitionException pe) {
8398                synPredMatched297 = false;
8399            }
8400            rewind(_m297);
8401            inputState.guessing--;
8402        }
8403        if ( synPredMatched297 ) {
8404            {
8405            if (((_tokenSet_19.member(LA(1))) && (_tokenSet_8.member(LA(2))) && (_tokenSet_20.member(LA(3))))&&(prevToken == NLS)) {
8406                if ( inputState.guessing==0 ) {
8407                    addWarning(
8408                    "Expression statement looks like it may continue a previous statement.",
8409                    "Either remove previous newline, or add an explicit semicolon ';'.");
8410                    
8411                }
8412            }
8413            else if ((_tokenSet_19.member(LA(1))) && (_tokenSet_8.member(LA(2))) && (_tokenSet_20.member(LA(3)))) {
8414            }
8415            else {
8416                throw new NoViableAltException(LT(1), getFilename());
8417            }
8418            
8419            }
8420            checkSuspiciousExpressionStatement_AST = (AST)currentAST.root;
8421        }
8422        else if (((_tokenSet_19.member(LA(1))) && (_tokenSet_8.member(LA(2))) && (_tokenSet_20.member(LA(3))))&&(prevToken == NLS)) {
8423            if ( inputState.guessing==0 ) {
8424                require(false,
8425                "Closure expression looks like it may be an isolated open block, "+
8426                "or it may continue a previous statement."
8427                ,
8428                "Add an explicit parameter list, as in {it -> ...}, or label it as L:{...}, "+
8429                "and also either remove previous newline, or add an explicit semicolon ';'."
8430                );
8431                
8432            }
8433            checkSuspiciousExpressionStatement_AST = (AST)currentAST.root;
8434        }
8435        else if (((_tokenSet_19.member(LA(1))) && (_tokenSet_8.member(LA(2))) && (_tokenSet_20.member(LA(3))))&&(prevToken != NLS)) {
8436            if ( inputState.guessing==0 ) {
8437                require(false,
8438                "Closure expression looks like it may be an isolated open block.",
8439                "Add an explicit parameter list, as in {it -> ...}, or label it as L:{...}.");
8440                
8441            }
8442            checkSuspiciousExpressionStatement_AST = (AST)currentAST.root;
8443        }
8444        else {
8445            throw new NoViableAltException(LT(1), getFilename());
8446        }
8447        
8448        returnAST = checkSuspiciousExpressionStatement_AST;
8449    }
8450    
8451/** A member name (x.y) or element name (x[y]) can serve as a command name,
8452 * which may be followed by a list of arguments.
8453 * Unlike parenthesized arguments, these must be plain expressions,
8454 * without labels or spread operators.
8455 */

8456    public final void commandArguments(
8457        AST head
8458    ) throws RecognitionException, TokenStreamException {
8459        
8460        returnAST = null;
8461        ASTPair currentAST = new ASTPair();
8462        AST commandArguments_AST = null;
8463        Token first = LT(1);
8464        
8465        expression(0);
8466        astFactory.addASTChild(currentAST, returnAST);
8467        {
8468        _loop328:
8469        do {
8470            if ((LA(1)==COMMA)) {
8471                match(COMMA);
8472                nls();
8473                expression(0);
8474                astFactory.addASTChild(currentAST, returnAST);
8475            }
8476            else {
8477                break _loop328;
8478            }
8479            
8480        } while (true);
8481        }
8482        if ( inputState.guessing==0 ) {
8483            commandArguments_AST = (AST)currentAST.root;
8484            
8485            AST elist = (AST)astFactory.make( (new ASTArray(2)).add(create(ELIST,"ELIST",first,LT(1))).add(commandArguments_AST));
8486            AST headid = getASTFactory().dup(head);
8487            headid.setType(METHOD_CALL);
8488            headid.setText("<command>");
8489            commandArguments_AST = (AST)astFactory.make( (new ASTArray(3)).add(headid).add(head).add(elist));
8490            
8491            currentAST.root = commandArguments_AST;
8492            currentAST.child = commandArguments_AST!=null &&commandArguments_AST.getFirstChild()!=null ?
8493                commandArguments_AST.getFirstChild() : commandArguments_AST;
8494            currentAST.advanceChildToEnd();
8495        }
8496        commandArguments_AST = (AST)currentAST.root;
8497        returnAST = commandArguments_AST;
8498    }
8499    
8500    public final void aCase() throws RecognitionException, TokenStreamException {
8501        
8502        returnAST = null;
8503        ASTPair currentAST = new ASTPair();
8504        AST aCase_AST = null;
8505        
8506        {
8507        switch ( LA(1)) {
8508        case LITERAL_case:
8509        {
8510            AST tmp204_AST = null;
8511            tmp204_AST = astFactory.create(LT(1));
8512            astFactory.makeASTRoot(currentAST, tmp204_AST);
8513            match(LITERAL_case);
8514            expression(0);
8515            astFactory.addASTChild(currentAST, returnAST);
8516            break;
8517        }
8518        case LITERAL_default:
8519        {
8520            AST tmp205_AST = null;
8521            tmp205_AST = astFactory.create(LT(1));
8522            astFactory.addASTChild(currentAST, tmp205_AST);
8523            match(LITERAL_default);
8524            break;
8525        }
8526        default:
8527        {
8528            throw new NoViableAltException(LT(1), getFilename());
8529        }
8530        }
8531        }
8532        match(COLON);
8533        nls();
8534        aCase_AST = (AST)currentAST.root;
8535        returnAST = aCase_AST;
8536    }
8537    
8538    public final void caseSList() throws RecognitionException, TokenStreamException {
8539        
8540        returnAST = null;
8541        ASTPair currentAST = new ASTPair();
8542        AST caseSList_AST = null;
8543        Token first = LT(1);
8544        
8545        statement(COLON);
8546        astFactory.addASTChild(currentAST, returnAST);
8547        {
8548        _loop311:
8549        do {
8550            if ((LA(1)==SEMI||LA(1)==NLS)) {
8551                sep();
8552                {
8553                switch ( LA(1)) {
8554                case FINAL:
8555                case ABSTRACT:
8556                case STRICTFP:
8557                case LITERAL_import:
8558                case LITERAL_static:
8559                case LITERAL_def:
8560                case AT:
8561                case IDENT:
8562                case LBRACK:
8563                case LPAREN:
8564                case LITERAL_class:
8565                case LITERAL_interface:
8566                case LITERAL_enum:
8567                case LITERAL_super:
8568                case LITERAL_void:
8569                case LITERAL_boolean:
8570                case LITERAL_byte:
8571                case LITERAL_char:
8572                case LITERAL_short:
8573                case LITERAL_int:
8574                case LITERAL_float:
8575                case LITERAL_long:
8576                case LITERAL_double:
8577                case LITERAL_any:
8578                case STAR:
8579                case LITERAL_private:
8580                case LITERAL_public:
8581                case LITERAL_protected:
8582                case LITERAL_transient:
8583                case LITERAL_native:
8584                case LITERAL_threadsafe:
8585                case LITERAL_synchronized:
8586                case LITERAL_volatile:
8587                case LCURLY:
8588                case LITERAL_this:
8589                case STRING_LITERAL:
8590                case LITERAL_if:
8591                case LITERAL_while:
8592                case LITERAL_with:
8593                case LITERAL_switch:
8594                case LITERAL_for:
8595                case LITERAL_return:
8596                case LITERAL_break:
8597                case LITERAL_continue:
8598                case LITERAL_throw:
8599                case LITERAL_assert:
8600                case PLUS:
8601                case MINUS:
8602                case LITERAL_try:
8603                case INC:
8604                case DEC:
8605                case BNOT:
8606                case LNOT:
8607                case DOLLAR:
8608                case STRING_CTOR_START:
8609                case LITERAL_new:
8610                case LITERAL_true:
8611                case LITERAL_false:
8612                case LITERAL_null:
8613                case NUM_INT:
8614                case NUM_FLOAT:
8615                case NUM_LONG:
8616                case NUM_DOUBLE:
8617                case NUM_BIG_INT:
8618                case NUM_BIG_DECIMAL:
8619                {
8620                    statement(sepToken);
8621                    astFactory.addASTChild(currentAST, returnAST);
8622                    break;
8623                }
8624                case RCURLY:
8625                case SEMI:
8626                case NLS:
8627                case LITERAL_default:
8628                case LITERAL_case:
8629                {
8630                    break;
8631                }
8632                default:
8633                {
8634                    throw new NoViableAltException(LT(1), getFilename());
8635                }
8636                }
8637                }
8638            }
8639            else {
8640                break _loop311;
8641            }
8642            
8643        } while (true);
8644        }
8645        if ( inputState.guessing==0 ) {
8646            caseSList_AST = (AST)currentAST.root;
8647            caseSList_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(SLIST,"SLIST",first,LT(1))).add(caseSList_AST));
8648            currentAST.root = caseSList_AST;
8649            currentAST.child = caseSList_AST!=null &&caseSList_AST.getFirstChild()!=null ?
8650                caseSList_AST.getFirstChild() : caseSList_AST;
8651            currentAST.advanceChildToEnd();
8652        }
8653        caseSList_AST = (AST)currentAST.root;
8654        returnAST = caseSList_AST;
8655    }
8656    
8657    public final void controlExpressionList() throws RecognitionException, TokenStreamException {
8658        
8659        returnAST = null;
8660        ASTPair currentAST = new ASTPair();
8661        AST controlExpressionList_AST = null;
8662        Token first = LT(1);
8663        
8664        strictContextExpression();
8665        astFactory.addASTChild(currentAST, returnAST);
8666        {
8667        _loop332:
8668        do {
8669            if ((LA(1)==COMMA)) {
8670                match(COMMA);
8671                nls();
8672                strictContextExpression();
8673                astFactory.addASTChild(currentAST, returnAST);
8674            }
8675            else {
8676                break _loop332;
8677            }
8678            
8679        } while (true);
8680        }
8681        if ( inputState.guessing==0 ) {
8682            controlExpressionList_AST = (AST)currentAST.root;
8683            controlExpressionList_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(ELIST,"ELIST",first,LT(1))).add(controlExpressionList_AST));
8684            currentAST.root = controlExpressionList_AST;
8685            currentAST.child = controlExpressionList_AST!=null &&controlExpressionList_AST.getFirstChild()!=null ?
8686                controlExpressionList_AST.getFirstChild() : controlExpressionList_AST;
8687            currentAST.advanceChildToEnd();
8688        }
8689        controlExpressionList_AST = (AST)currentAST.root;
8690        returnAST = controlExpressionList_AST;
8691    }
8692    
8693    public final void handler() throws RecognitionException, TokenStreamException {
8694        
8695        returnAST = null;
8696        ASTPair currentAST = new ASTPair();
8697        AST handler_AST = null;
8698        
8699        AST tmp208_AST = null;
8700        tmp208_AST = astFactory.create(LT(1));
8701        astFactory.makeASTRoot(currentAST, tmp208_AST);
8702        match(LITERAL_catch);
8703        match(LPAREN);
8704        parameterDeclaration();
8705        astFactory.addASTChild(currentAST, returnAST);
8706        match(RPAREN);
8707        nlsWarn();
8708        compoundStatement();
8709        astFactory.addASTChild(currentAST, returnAST);
8710        handler_AST = (AST)currentAST.root;
8711        returnAST = handler_AST;
8712    }
8713    
8714    public final void finallyClause() throws RecognitionException, TokenStreamException {
8715        
8716        returnAST = null;
8717        ASTPair currentAST = new ASTPair();
8718        AST finallyClause_AST = null;
8719        
8720        AST tmp211_AST = null;
8721        tmp211_AST = astFactory.create(LT(1));
8722        astFactory.makeASTRoot(currentAST, tmp211_AST);
8723        match(LITERAL_finally);
8724        nlsWarn();
8725        compoundStatement();
8726        astFactory.addASTChild(currentAST, returnAST);
8727        finallyClause_AST = (AST)currentAST.root;
8728        returnAST = finallyClause_AST;
8729    }
8730    
8731    public final void assignmentExpression(
8732        int lc_stmt
8733    ) throws RecognitionException, TokenStreamException {
8734        
8735        returnAST = null;
8736        ASTPair currentAST = new ASTPair();
8737        AST assignmentExpression_AST = null;
8738        
8739        conditionalExpression(lc_stmt);
8740        astFactory.addASTChild(currentAST, returnAST);
8741        {
8742        switch ( LA(1)) {
8743        case ASSIGN:
8744        case PLUS_ASSIGN:
8745        case MINUS_ASSIGN:
8746        case STAR_ASSIGN:
8747        case DIV_ASSIGN:
8748        case MOD_ASSIGN:
8749        case SR_ASSIGN:
8750        case BSR_ASSIGN:
8751        case SL_ASSIGN:
8752        case BAND_ASSIGN:
8753        case BXOR_ASSIGN:
8754        case BOR_ASSIGN:
8755        case STAR_STAR_ASSIGN:
8756        {
8757            {
8758            switch ( LA(1)) {
8759            case ASSIGN:
8760            {
8761                AST tmp212_AST = null;
8762                tmp212_AST = astFactory.create(LT(1));
8763                astFactory.makeASTRoot(currentAST, tmp212_AST);
8764                match(ASSIGN);
8765                break;
8766            }
8767            case PLUS_ASSIGN:
8768            {
8769                AST tmp213_AST = null;
8770                tmp213_AST = astFactory.create(LT(1));
8771                astFactory.makeASTRoot(currentAST, tmp213_AST);
8772                match(PLUS_ASSIGN);
8773                break;
8774            }
8775            case MINUS_ASSIGN:
8776            {
8777                AST tmp214_AST = null;
8778                tmp214_AST = astFactory.create(LT(1));
8779                astFactory.makeASTRoot(currentAST, tmp214_AST);
8780                match(MINUS_ASSIGN);
8781                break;
8782            }
8783            case STAR_ASSIGN:
8784            {
8785                AST tmp215_AST = null;
8786                tmp215_AST = astFactory.create(LT(1));
8787                astFactory.makeASTRoot(currentAST, tmp215_AST);
8788                match(STAR_ASSIGN);
8789                break;
8790            }
8791            case DIV_ASSIGN:
8792            {
8793                AST tmp216_AST = null;
8794                tmp216_AST = astFactory.create(LT(1));
8795                astFactory.makeASTRoot(currentAST, tmp216_AST);
8796                match(DIV_ASSIGN);
8797                break;
8798            }
8799            case MOD_ASSIGN:
8800            {
8801                AST tmp217_AST = null;
8802                tmp217_AST = astFactory.create(LT(1));
8803                astFactory.makeASTRoot(currentAST, tmp217_AST);
8804                match(MOD_ASSIGN);
8805                break;
8806            }
8807            case SR_ASSIGN:
8808            {
8809                AST tmp218_AST = null;
8810                tmp218_AST = astFactory.create(LT(1));
8811                astFactory.makeASTRoot(currentAST, tmp218_AST);
8812                match(SR_ASSIGN);
8813                break;
8814            }
8815            case BSR_ASSIGN:
8816            {
8817                AST tmp219_AST = null;
8818                tmp219_AST = astFactory.create(LT(1));
8819                astFactory.makeASTRoot(currentAST, tmp219_AST);
8820                match(BSR_ASSIGN);
8821                break;
8822            }
8823            case SL_ASSIGN:
8824            {
8825                AST tmp220_AST = null;
8826                tmp220_AST = astFactory.create(LT(1));
8827                astFactory.makeASTRoot(currentAST, tmp220_AST);
8828                match(SL_ASSIGN);
8829                break;
8830            }
8831            case BAND_ASSIGN:
8832            {
8833                AST tmp221_AST = null;
8834                tmp221_AST = astFactory.create(LT(1));
8835                astFactory.makeASTRoot(currentAST, tmp221_AST);
8836                match(BAND_ASSIGN);
8837                break;
8838            }
8839            case BXOR_ASSIGN:
8840            {
8841                AST tmp222_AST = null;
8842                tmp222_AST = astFactory.create(LT(1));
8843                astFactory.makeASTRoot(currentAST, tmp222_AST);
8844                match(BXOR_ASSIGN);
8845                break;
8846            }
8847            case BOR_ASSIGN:
8848            {
8849                AST tmp223_AST = null;
8850                tmp223_AST = astFactory.create(LT(1));
8851                astFactory.makeASTRoot(currentAST, tmp223_AST);
8852                match(BOR_ASSIGN);
8853                break;
8854            }
8855            case STAR_STAR_ASSIGN:
8856            {
8857                AST tmp224_AST = null;
8858                tmp224_AST = astFactory.create(LT(1));
8859                astFactory.makeASTRoot(currentAST, tmp224_AST);
8860                match(STAR_STAR_ASSIGN);
8861                break;
8862            }
8863            default:
8864            {
8865                throw new NoViableAltException(LT(1), getFilename());
8866            }
8867            }
8868            }
8869            nls();
8870            assignmentExpression(lc_stmt == LC_STMT? LC_INIT: 0);
8871            astFactory.addASTChild(currentAST, returnAST);
8872            break;
8873        }
8874        case EOF:
8875        case IDENT:
8876        case LBRACK:
8877        case RBRACK:
8878        case LPAREN:
8879        case LITERAL_super:
8880        case COMMA:
8881        case LITERAL_void:
8882        case LITERAL_boolean:
8883        case LITERAL_byte:
8884        case LITERAL_char:
8885        case LITERAL_short:
8886        case LITERAL_int:
8887        case LITERAL_float:
8888        case LITERAL_long:
8889        case LITERAL_double:
8890        case LITERAL_any:
8891        case RPAREN:
8892        case LCURLY:
8893        case RCURLY:
8894        case SEMI:
8895        case NLS:
8896        case LITERAL_default:
8897        case LITERAL_this:
8898        case STRING_LITERAL:
8899        case CLOSURE_OP:
8900        case COLON:
8901        case LITERAL_else:
8902        case PLUS:
8903        case MINUS:
8904        case LITERAL_case:
8905        case INC:
8906        case DEC:
8907        case BNOT:
8908        case LNOT:
8909        case DOLLAR:
8910        case STRING_CTOR_START:
8911        case LITERAL_new:
8912        case LITERAL_true:
8913        case LITERAL_false:
8914        case LITERAL_null:
8915        case NUM_INT:
8916        case NUM_FLOAT:
8917        case NUM_LONG:
8918        case NUM_DOUBLE:
8919        case NUM_BIG_INT:
8920        case NUM_BIG_DECIMAL:
8921        {
8922            break;
8923        }
8924        default:
8925        {
8926            throw new NoViableAltException(LT(1), getFilename());
8927        }
8928        }
8929        }
8930        assignmentExpression_AST = (AST)currentAST.root;
8931        returnAST = assignmentExpression_AST;
8932    }
8933    
8934/** A "path expression" is a name or other primary, possibly qualified by various
8935 * forms of dot, and/or followed by various kinds of brackets.
8936 * It can be used for value or assigned to, or else further qualified, indexed, or called.
8937 * It is called a "path" because it looks like a linear path through a data structure.
8938 * Examples: x.y, x?.y, x*.y, x.@y; x[], x[y], x[y,z]; x(), x(y), x(y,z); x{s}; a.b[n].c(x).d{s}
8939 * (Compare to a C lvalue, or LeftHandSide in the JLS section 15.26.)
8940 * General expressions are built up from path expressions, using operators like '+' and '='.
8941 */

8942    public final void pathExpression(
8943        int lc_stmt
8944    ) throws RecognitionException, TokenStreamException {
8945        
8946        returnAST = null;
8947        ASTPair currentAST = new ASTPair();
8948        AST pathExpression_AST = null;
8949        AST pre_AST = null;
8950        AST pe_AST = null;
8951        AST apb_AST = null;
8952        AST prefix = null;
8953        
8954        primaryExpression();
8955        pre_AST = (AST)returnAST;
8956        if ( inputState.guessing==0 ) {
8957            prefix = pre_AST;
8958        }
8959        {
8960        _loop339:
8961        do {
8962            boolean synPredMatched336 = false;
8963            if (((_tokenSet_106.member(LA(1))) && (_tokenSet_107.member(LA(2))) && (_tokenSet_17.member(LA(3))))) {
8964                int _m336 = mark();
8965                synPredMatched336 = true;
8966                inputState.guessing++;
8967                try {
8968                    {
8969                    pathElementStart();
8970                    }
8971                }
8972                catch (RecognitionException pe) {
8973                    synPredMatched336 = false;
8974                }
8975                rewind(_m336);
8976                inputState.guessing--;
8977            }
8978            if ( synPredMatched336 ) {
8979                pathElement(prefix);
8980                pe_AST = (AST)returnAST;
8981                if ( inputState.guessing==0 ) {
8982                    prefix = pe_AST;
8983                }
8984            }
8985            else {
8986                boolean synPredMatched338 = false;
8987                if ((((LA(1)==LCURLY||LA(1)==NLS) && (_tokenSet_16.member(LA(2))) && (_tokenSet_17.member(LA(3))))&&(lc_stmt == LC_STMT || lc_stmt == LC_INIT))) {
8988                    int _m338 = mark();
8989                    synPredMatched338 = true;
8990                    inputState.guessing++;
8991                    try {
8992                        {
8993                        nls();
8994                        match(LCURLY);
8995                        }
8996                    }
8997                    catch (RecognitionException pe) {
8998                        synPredMatched338 = false;
8999                    }
9000                    rewind(_m338);
9001                    inputState.guessing--;
9002                }
9003                if ( synPredMatched338 ) {
9004                    nlsWarn();
9005                    appendedBlock(prefix);
9006                    apb_AST = (AST)returnAST;
9007                    if ( inputState.guessing==0 ) {
9008                        prefix = apb_AST;
9009                    }
9010                }
9011                else {
9012                    break _loop339;
9013                }
9014                }
9015            } while (true);
9016            }
9017            if ( inputState.guessing==0 ) {
9018                pathExpression_AST = (AST)currentAST.root;
9019                
9020                pathExpression_AST = prefix;
9021                lastPathExpression = pathExpression_AST;
9022                
9023                currentAST.root = pathExpression_AST;
9024                currentAST.child = pathExpression_AST!=null &&pathExpression_AST.getFirstChild()!=null ?
9025                    pathExpression_AST.getFirstChild() : pathExpression_AST;
9026                currentAST.advanceChildToEnd();
9027            }
9028            pathExpression_AST = (AST)currentAST.root;
9029            returnAST = pathExpression_AST;
9030        }
9031        
9032    public final void primaryExpression() throws RecognitionException, TokenStreamException {
9033        
9034        returnAST = null;
9035        ASTPair currentAST = new ASTPair();
9036        AST primaryExpression_AST = null;
9037        
9038        switch ( LA(1)) {
9039        case IDENT:
9040        {
9041            AST tmp225_AST = null;
9042            tmp225_AST = astFactory.create(LT(1));
9043            astFactory.addASTChild(currentAST, tmp225_AST);
9044            match(IDENT);
9045            primaryExpression_AST = (AST)currentAST.root;
9046            break;
9047        }
9048        case STRING_LITERAL:
9049        case LITERAL_true:
9050        case LITERAL_false:
9051        case LITERAL_null:
9052        case NUM_INT:
9053        case NUM_FLOAT:
9054        case NUM_LONG:
9055        case NUM_DOUBLE:
9056        case NUM_BIG_INT:
9057        case NUM_BIG_DECIMAL:
9058        {
9059            constant();
9060            astFactory.addASTChild(currentAST, returnAST);
9061            primaryExpression_AST = (AST)currentAST.root;
9062            break;
9063        }
9064        case LITERAL_new:
9065        {
9066            newExpression();
9067            astFactory.addASTChild(currentAST, returnAST);
9068            primaryExpression_AST = (AST)currentAST.root;
9069            break;
9070        }
9071        case LITERAL_this:
9072        {
9073            AST tmp226_AST = null;
9074            tmp226_AST = astFactory.create(LT(1));
9075            astFactory.addASTChild(currentAST, tmp226_AST);
9076            match(LITERAL_this);
9077            primaryExpression_AST = (AST)currentAST.root;
9078            break;
9079        }
9080        case LITERAL_super:
9081        {
9082            AST tmp227_AST = null;
9083            tmp227_AST = astFactory.create(LT(1));
9084            astFactory.addASTChild(currentAST, tmp227_AST);
9085            match(LITERAL_super);
9086            primaryExpression_AST = (AST)currentAST.root;
9087            break;
9088        }
9089        case LPAREN:
9090        {
9091            parenthesizedExpression();
9092            astFactory.addASTChild(currentAST, returnAST);
9093            primaryExpression_AST = (AST)currentAST.root;
9094            break;
9095        }
9096        case LCURLY:
9097        {
9098            closureConstructorExpression();
9099            astFactory.addASTChild(currentAST, returnAST);
9100            primaryExpression_AST = (AST)currentAST.root;
9101            break;
9102        }
9103        case LBRACK:
9104        {
9105            listOrMapConstructorExpression();
9106            astFactory.addASTChild(currentAST, returnAST);
9107            primaryExpression_AST = (AST)currentAST.root;
9108            break;
9109        }
9110        case STRING_CTOR_START:
9111        {
9112            stringConstructorExpression();
9113            astFactory.addASTChild(currentAST, returnAST);
9114            primaryExpression_AST = (AST)currentAST.root;
9115            break;
9116        }
9117        case DOLLAR:
9118        {
9119            scopeEscapeExpression();
9120            astFactory.addASTChild(currentAST, returnAST);
9121            primaryExpression_AST = (AST)currentAST.root;
9122            break;
9123        }
9124        case LITERAL_void:
9125        case LITERAL_boolean:
9126        case LITERAL_byte:
9127        case LITERAL_char:
9128        case LITERAL_short:
9129        case LITERAL_int:
9130        case LITERAL_float:
9131        case LITERAL_long:
9132        case LITERAL_double:
9133        case LITERAL_any:
9134        {
9135            builtInType();
9136            astFactory.addASTChild(currentAST, returnAST);
9137            primaryExpression_AST = (AST)currentAST.root;
9138            break;
9139        }
9140        default:
9141        {
9142            throw new NoViableAltException(LT(1), getFilename());
9143        }
9144        }
9145        returnAST = primaryExpression_AST;
9146    }
9147    
9148    public final void pathElementStart() throws RecognitionException, TokenStreamException {
9149        
9150        returnAST = null;
9151        ASTPair currentAST = new ASTPair();
9152        AST pathElementStart_AST = null;
9153        
9154        switch ( LA(1)) {
9155        case DOT:
9156        {
9157            AST tmp228_AST = null;
9158            tmp228_AST = astFactory.create(LT(1));
9159            match(DOT);
9160            break;
9161        }
9162        case SPREAD_DOT:
9163        {
9164            AST tmp229_AST = null;
9165            tmp229_AST = astFactory.create(LT(1));
9166            match(SPREAD_DOT);
9167            break;
9168        }
9169        case OPTIONAL_DOT:
9170        {
9171            AST tmp230_AST = null;
9172            tmp230_AST = astFactory.create(LT(1));
9173            match(OPTIONAL_DOT);
9174            break;
9175        }
9176        case MEMBER_POINTER:
9177        {
9178            AST tmp231_AST = null;
9179            tmp231_AST = astFactory.create(LT(1));
9180            match(MEMBER_POINTER);
9181            break;
9182        }
9183        case LBRACK:
9184        {
9185            AST tmp232_AST = null;
9186            tmp232_AST = astFactory.create(LT(1));
9187            match(LBRACK);
9188            break;
9189        }
9190        case LPAREN:
9191        {
9192            AST tmp233_AST = null;
9193            tmp233_AST = astFactory.create(LT(1));
9194            match(LPAREN);
9195            break;
9196        }
9197        case LCURLY:
9198        {
9199            AST tmp234_AST = null;
9200            tmp234_AST = astFactory.create(LT(1));
9201            match(LCURLY);
9202            break;
9203        }
9204        default:
9205        {
9206            throw new NoViableAltException(LT(1), getFilename());
9207        }
9208        }
9209        returnAST = pathElementStart_AST;
9210    }
9211    
9212    public final void pathElement(
9213        AST prefix
9214    ) throws RecognitionException, TokenStreamException {
9215        
9216        returnAST = null;
9217        ASTPair currentAST = new ASTPair();
9218        AST pathElement_AST = null;
9219        AST mca_AST = null;
9220        AST apb_AST = null;
9221        AST ipa_AST = null;
9222        
9223        switch ( LA(1)) {
9224        case DOT:
9225        case SPREAD_DOT:
9226        case OPTIONAL_DOT:
9227        case MEMBER_POINTER:
9228        {
9229            if ( inputState.guessing==0 ) {
9230                pathElement_AST = (AST)currentAST.root;
9231                pathElement_AST = prefix;
9232                currentAST.root = pathElement_AST;
9233                currentAST.child = pathElement_AST!=null &&pathElement_AST.getFirstChild()!=null ?
9234                    pathElement_AST.getFirstChild() : pathElement_AST;
9235                currentAST.advanceChildToEnd();
9236            }
9237            {
9238            switch ( LA(1)) {
9239            case SPREAD_DOT:
9240            {
9241                AST tmp235_AST = null;
9242                tmp235_AST = astFactory.create(LT(1));
9243                astFactory.makeASTRoot(currentAST, tmp235_AST);
9244                match(SPREAD_DOT);
9245                break;
9246            }
9247            case OPTIONAL_DOT:
9248            {
9249                AST tmp236_AST = null;
9250                tmp236_AST = astFactory.create(LT(1));
9251                astFactory.makeASTRoot(currentAST, tmp236_AST);
9252                match(OPTIONAL_DOT);
9253                break;
9254            }
9255            case MEMBER_POINTER:
9256            {
9257                AST tmp237_AST = null;
9258                tmp237_AST = astFactory.create(LT(1));
9259                astFactory.makeASTRoot(currentAST, tmp237_AST);
9260                match(MEMBER_POINTER);
9261                break;
9262            }
9263            case DOT:
9264            {
9265                AST tmp238_AST = null;
9266                tmp238_AST = astFactory.create(LT(1));
9267                astFactory.makeASTRoot(currentAST, tmp238_AST);
9268                match(DOT);
9269                break;
9270            }
9271            default:
9272            {
9273                throw new NoViableAltException(LT(1), getFilename());
9274            }
9275            }
9276            }
9277            nls();
9278            {
9279            switch ( LA(1)) {
9280            case LT:
9281            {
9282                typeArguments();
9283                astFactory.addASTChild(currentAST, returnAST);
9284                break;
9285            }
9286            case UNUSED_DO:
9287            case LITERAL_def:
9288            case AT:
9289            case IDENT:
9290            case LPAREN:
9291            case LITERAL_class:
9292            case LITERAL_void:
9293            case LITERAL_boolean:
9294            case LITERAL_byte:
9295            case LITERAL_char:
9296            case LITERAL_short:
9297            case LITERAL_int:
9298            case LITERAL_float:
9299            case LITERAL_long:
9300            case LITERAL_double:
9301            case LITERAL_any:
9302            case LITERAL_as:
9303            case LCURLY:
9304            case STRING_LITERAL:
9305            case LITERAL_if:
9306            case LITERAL_else:
9307            case LITERAL_while:
9308            case LITERAL_switch:
9309            case LITERAL_for:
9310            case LITERAL_in:
9311            case LITERAL_try:
9312            case LITERAL_finally:
9313            case LITERAL_catch:
9314            case STRING_CTOR_START:
9315            {
9316                break;
9317            }
9318            default:
9319            {
9320                throw new NoViableAltException(LT(1), getFilename());
9321            }
9322            }
9323            }
9324            namePart();
9325            astFactory.addASTChild(currentAST, returnAST);
9326            pathElement_AST = (AST)currentAST.root;
9327            break;
9328        }
9329        case LPAREN:
9330        {
9331            methodCallArgs(prefix);
9332            mca_AST = (AST)returnAST;
9333            if ( inputState.guessing==0 ) {
9334                pathElement_AST = (AST)currentAST.root;
9335                pathElement_AST = mca_AST;
9336                currentAST.root = pathElement_AST;
9337                currentAST.child = pathElement_AST!=null &&pathElement_AST.getFirstChild()!=null ?
9338                    pathElement_AST.getFirstChild() : pathElement_AST;
9339                currentAST.advanceChildToEnd();
9340            }
9341            pathElement_AST = (AST)currentAST.root;
9342            break;
9343        }
9344        case LCURLY:
9345        {
9346            appendedBlock(prefix);
9347            apb_AST = (AST)returnAST;
9348            if ( inputState.guessing==0 ) {
9349                pathElement_AST = (AST)currentAST.root;
9350                pathElement_AST = apb_AST;
9351                currentAST.root = pathElement_AST;
9352                currentAST.child = pathElement_AST!=null &&pathElement_AST.getFirstChild()!=null ?
9353                    pathElement_AST.getFirstChild() : pathElement_AST;
9354                currentAST.advanceChildToEnd();
9355            }
9356            pathElement_AST = (AST)currentAST.root;
9357            break;
9358        }
9359        case LBRACK:
9360        {
9361            indexPropertyArgs(prefix);
9362            ipa_AST = (AST)returnAST;
9363            if ( inputState.guessing==0 ) {
9364                pathElement_AST = (AST)currentAST.root;
9365                pathElement_AST = ipa_AST;
9366                currentAST.root = pathElement_AST;
9367                currentAST.child = pathElement_AST!=null &&pathElement_AST.getFirstChild()!=null ?
9368                    pathElement_AST.getFirstChild() : pathElement_AST;
9369                currentAST.advanceChildToEnd();
9370            }
9371            pathElement_AST = (AST)currentAST.root;
9372            break;
9373        }
9374        default:
9375        {
9376            throw new NoViableAltException(LT(1), getFilename());
9377        }
9378        }
9379        returnAST = pathElement_AST;
9380    }
9381    
9382/** An appended block follows any expression.
9383 * If the expression is not a method call, it is given an empty argument list.
9384 */

9385    public final void appendedBlock(
9386        AST callee
9387    ) throws RecognitionException, TokenStreamException {
9388        
9389        returnAST = null;
9390        ASTPair currentAST = new ASTPair();
9391        AST appendedBlock_AST = null;
9392        
9393        if ( inputState.guessing==0 ) {
9394            appendedBlock_AST = (AST)currentAST.root;
9395            
9396            // If the callee is itself a call, flatten the AST.
9397
if (callee != null && callee.getType() == METHOD_CALL) {
9398            appendedBlock_AST = callee;
9399            } else {
9400            AST lbrace = getASTFactory().create(LT(1));
9401            lbrace.setType(METHOD_CALL);
9402            if (callee != null) lbrace.addChild(callee);
9403            appendedBlock_AST = lbrace;
9404            }
9405            
9406            currentAST.root = appendedBlock_AST;
9407            currentAST.child = appendedBlock_AST!=null &&appendedBlock_AST.getFirstChild()!=null ?
9408                appendedBlock_AST.getFirstChild() : appendedBlock_AST;
9409            currentAST.advanceChildToEnd();
9410        }
9411        closedBlock();
9412        astFactory.addASTChild(currentAST, returnAST);
9413        appendedBlock_AST = (AST)currentAST.root;
9414        returnAST = appendedBlock_AST;
9415    }
9416    
9417/** This is the grammar for what can follow a dot: x.a, x.@a, x.&a, x.'a', etc.
9418 * Note: <code>typeArguments</code> is handled by the caller of <code>namePart</code>.
9419 */

9420    public final void namePart() throws RecognitionException, TokenStreamException {
9421        
9422        returnAST = null;
9423        ASTPair currentAST = new ASTPair();
9424        AST namePart_AST = null;
9425        Token ats = null;
9426        AST ats_AST = null;
9427        Token sl = null;
9428        AST sl_AST = null;
9429        AST dn_AST = null;
9430        Token first = LT(1);
9431        
9432        {
9433        switch ( LA(1)) {
9434        case AT:
9435        {
9436            ats = LT(1);
9437            ats_AST = astFactory.create(ats);
9438            astFactory.makeASTRoot(currentAST, ats_AST);
9439            match(AT);
9440            if ( inputState.guessing==0 ) {
9441                ats_AST.setType(SELECT_SLOT);
9442            }
9443            break;
9444        }
9445        case UNUSED_DO:
9446        case LITERAL_def:
9447        case IDENT:
9448        case LPAREN:
9449        case LITERAL_class:
9450        case LITERAL_void:
9451        case LITERAL_boolean:
9452        case LITERAL_byte:
9453        case LITERAL_char:
9454        case LITERAL_short:
9455        case LITERAL_int:
9456        case LITERAL_float:
9457        case LITERAL_long:
9458        case LITERAL_double:
9459        case LITERAL_any:
9460        case LITERAL_as:
9461        case LCURLY:
9462        case STRING_LITERAL:
9463        case LITERAL_if:
9464        case LITERAL_else:
9465        case LITERAL_while:
9466        case LITERAL_switch:
9467        case LITERAL_for:
9468        case LITERAL_in:
9469        case LITERAL_try:
9470        case LITERAL_finally:
9471        case LITERAL_catch:
9472        case STRING_CTOR_START:
9473        {
9474            break;
9475        }
9476        default:
9477        {
9478            throw new NoViableAltException(LT(1), getFilename());
9479        }
9480        }
9481        }
9482        {
9483        switch ( LA(1)) {
9484        case IDENT:
9485        {
9486            AST tmp239_AST = null;
9487            tmp239_AST = astFactory.create(LT(1));
9488            astFactory.addASTChild(currentAST, tmp239_AST);
9489            match(IDENT);
9490            break;
9491        }
9492        case STRING_LITERAL:
9493        {
9494            sl = LT(1);
9495            sl_AST = astFactory.create(sl);
9496            astFactory.addASTChild(currentAST, sl_AST);
9497            match(STRING_LITERAL);
9498            if ( inputState.guessing==0 ) {
9499                sl_AST.setType(IDENT);
9500            }
9501            break;
9502        }
9503        case LPAREN:
9504        case STRING_CTOR_START:
9505        {
9506            dynamicMemberName();
9507            dn_AST = (AST)returnAST;
9508            if ( inputState.guessing==0 ) {
9509                namePart_AST = (AST)currentAST.root;
9510                namePart_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(DYNAMIC_MEMBER,"DYNAMIC_MEMBER",first,LT(1))).add(dn_AST));
9511                currentAST.root = namePart_AST;
9512                currentAST.child = namePart_AST!=null &&namePart_AST.getFirstChild()!=null ?
9513                    namePart_AST.getFirstChild() : namePart_AST;
9514                currentAST.advanceChildToEnd();
9515            }
9516            break;
9517        }
9518        case LCURLY:
9519        {
9520            openBlock();
9521            astFactory.addASTChild(currentAST, returnAST);
9522            break;
9523        }
9524        case UNUSED_DO:
9525        case LITERAL_def:
9526        case LITERAL_class:
9527        case LITERAL_void:
9528        case LITERAL_boolean:
9529        case LITERAL_byte:
9530        case LITERAL_char:
9531        case LITERAL_short:
9532        case LITERAL_int:
9533        case LITERAL_float:
9534        case LITERAL_long:
9535        case LITERAL_double:
9536        case LITERAL_any:
9537        case LITERAL_as:
9538        case LITERAL_if:
9539        case LITERAL_else:
9540        case LITERAL_while:
9541        case LITERAL_switch:
9542        case LITERAL_for:
9543        case LITERAL_in:
9544        case LITERAL_try:
9545        case LITERAL_finally:
9546        case LITERAL_catch:
9547        {
9548            keywordPropertyNames();
9549            astFactory.addASTChild(currentAST, returnAST);
9550            break;
9551        }
9552        default:
9553        {
9554            throw new NoViableAltException(LT(1), getFilename());
9555        }
9556        }
9557        }
9558        namePart_AST = (AST)currentAST.root;
9559        returnAST = namePart_AST;
9560    }
9561    
9562/** An expression may be followed by one or both of (...) and {...}.
9563 * Note: If either is (...) or {...} present, it is a method call.
9564 * The {...} is appended to the argument list, and matches a formal of type Closure.
9565 * If there is no method member, a property (or field) is used instead, and must itself be callable.
9566 * <p>
9567 * If the methodCallArgs are absent, it is a property reference.
9568 * If there is no property, it is treated as a field reference, but never a method reference.
9569 * <p>
9570 * Arguments in the (...) can be labeled, and the appended block can be labeled also.
9571 * If there is a mix of unlabeled and labeled arguments,
9572 * all the labeled arguments must follow the unlabeled arguments,
9573 * except that the closure (labeled or not) is always a separate final argument.
9574 * Labeled arguments are collected up and passed as a single argument to a formal of type Map.
9575 * <p>
9576 * Therefore, f(x,y, a:p, b:q) {s} is equivalent in all ways to f(x,y, [a:p,b:q], {s}).
9577 * Spread arguments of sequence type count as unlabeled arguments,
9578 * while spread arguments of map type count as labeled arguments.
9579 * (This distinction must sometimes be checked dynamically.)
9580 *
9581 * A plain unlabeled argument is allowed to match a trailing Map or Closure argument:
9582 * f(x, a:p) {s} === f(*[ x, [a:p], {s} ])
9583 */

9584    public final void methodCallArgs(
9585        AST callee
9586    ) throws RecognitionException, TokenStreamException {
9587        
9588        returnAST = null;
9589        ASTPair currentAST = new ASTPair();
9590        AST methodCallArgs_AST = null;
9591        Token lp = null;
9592        AST lp_AST = null;
9593        
9594        if ( inputState.guessing==0 ) {
9595            methodCallArgs_AST = (AST)currentAST.root;
9596            methodCallArgs_AST = callee;
9597            currentAST.root = methodCallArgs_AST;
9598            currentAST.child = methodCallArgs_AST!=null &&methodCallArgs_AST.getFirstChild()!=null ?
9599                methodCallArgs_AST.getFirstChild() : methodCallArgs_AST;
9600            currentAST.advanceChildToEnd();
9601        }
9602        lp = LT(1);
9603        lp_AST = astFactory.create(lp);
9604        astFactory.makeASTRoot(currentAST, lp_AST);
9605        match(LPAREN);
9606        if ( inputState.guessing==0 ) {
9607            lp_AST.setType(METHOD_CALL);
9608        }
9609        argList();
9610        astFactory.addASTChild(currentAST, returnAST);
9611        match(RPAREN);
9612        methodCallArgs_AST = (AST)currentAST.root;
9613        returnAST = methodCallArgs_AST;
9614    }
9615    
9616/** An expression may be followed by [...].
9617 * Unlike Java, these brackets may contain a general argument list,
9618 * which is passed to the array element operator, which can make of it what it wants.
9619 * The brackets may also be empty, as in T[]. This is how Groovy names array types.
9620 * <p>Returned AST is [INDEX_OP, indexee, ELIST].
9621 */

9622    public final void indexPropertyArgs(
9623        AST indexee
9624    ) throws RecognitionException, TokenStreamException {
9625        
9626        returnAST = null;
9627        ASTPair currentAST = new ASTPair();
9628        AST indexPropertyArgs_AST = null;
9629        Token lb = null;
9630        AST lb_AST = null;
9631        
9632        if ( inputState.guessing==0 ) {
9633            indexPropertyArgs_AST = (AST)currentAST.root;
9634            indexPropertyArgs_AST = indexee;
9635            currentAST.root = indexPropertyArgs_AST;
9636            currentAST.child = indexPropertyArgs_AST!=null &&indexPropertyArgs_AST.getFirstChild()!=null ?
9637                indexPropertyArgs_AST.getFirstChild() : indexPropertyArgs_AST;
9638            currentAST.advanceChildToEnd();
9639        }
9640        lb = LT(1);
9641        lb_AST = astFactory.create(lb);
9642        astFactory.makeASTRoot(currentAST, lb_AST);
9643        match(LBRACK);
9644        if ( inputState.guessing==0 ) {
9645            lb_AST.setType(INDEX_OP);
9646        }
9647        argList();
9648        astFactory.addASTChild(currentAST, returnAST);
9649        match(RBRACK);
9650        indexPropertyArgs_AST = (AST)currentAST.root;
9651        returnAST = indexPropertyArgs_AST;
9652    }
9653    
9654/** If a dot is followed by a parenthesized or quoted expression, the member is computed dynamically,
9655 * and the member selection is done only at runtime. This forces a statically unchecked member access.
9656 */

9657    public final void dynamicMemberName() throws RecognitionException, TokenStreamException {
9658        
9659        returnAST = null;
9660        ASTPair currentAST = new ASTPair();
9661        AST dynamicMemberName_AST = null;
9662        Token first = LT(1);
9663        
9664        {
9665        switch ( LA(1)) {
9666        case LPAREN:
9667        {
9668            parenthesizedExpression();
9669            astFactory.addASTChild(currentAST, returnAST);
9670            break;
9671        }
9672        case STRING_CTOR_START:
9673        {
9674            stringConstructorExpression();
9675            astFactory.addASTChild(currentAST, returnAST);
9676            break;
9677        }
9678        default:
9679        {
9680            throw new NoViableAltException(LT(1), getFilename());
9681        }
9682        }
9683        }
9684        if ( inputState.guessing==0 ) {
9685            dynamicMemberName_AST = (AST)currentAST.root;
9686            dynamicMemberName_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(DYNAMIC_MEMBER,"DYNAMIC_MEMBER",first,LT(1))).add(dynamicMemberName_AST));
9687            currentAST.root = dynamicMemberName_AST;
9688            currentAST.child = dynamicMemberName_AST!=null &&dynamicMemberName_AST.getFirstChild()!=null ?
9689                dynamicMemberName_AST.getFirstChild() : dynamicMemberName_AST;
9690            currentAST.advanceChildToEnd();
9691        }
9692        dynamicMemberName_AST = (AST)currentAST.root;
9693        returnAST = dynamicMemberName_AST;
9694    }
9695    
9696/** Allowed keywords after dot (as a member name) and before colon (as a label).
9697 * TODO: What's the rationale for these?
9698 */

9699    public final void keywordPropertyNames() throws RecognitionException, TokenStreamException {
9700        
9701        returnAST = null;
9702        ASTPair currentAST = new ASTPair();
9703        AST keywordPropertyNames_AST = null;
9704        
9705        {
9706        switch ( LA(1)) {
9707        case LITERAL_class:
9708        {
9709            AST tmp242_AST = null;
9710            tmp242_AST = astFactory.create(LT(1));
9711            astFactory.addASTChild(currentAST, tmp242_AST);
9712            match(LITERAL_class);
9713            break;
9714        }
9715        case LITERAL_in:
9716        {
9717            AST tmp243_AST = null;
9718            tmp243_AST = astFactory.create(LT(1));
9719            astFactory.addASTChild(currentAST, tmp243_AST);
9720            match(LITERAL_in);
9721            break;
9722        }
9723        case LITERAL_as:
9724        {
9725            AST tmp244_AST = null;
9726            tmp244_AST = astFactory.create(LT(1));
9727            astFactory.addASTChild(currentAST, tmp244_AST);
9728            match(LITERAL_as);
9729            break;
9730        }
9731        case LITERAL_def:
9732        {
9733            AST tmp245_AST = null;
9734            tmp245_AST = astFactory.create(LT(1));
9735            astFactory.addASTChild(currentAST, tmp245_AST);
9736            match(LITERAL_def);
9737            break;
9738        }
9739        case LITERAL_if:
9740        {
9741            AST tmp246_AST = null;
9742            tmp246_AST = astFactory.create(LT(1));
9743            astFactory.addASTChild(currentAST, tmp246_AST);
9744            match(LITERAL_if);
9745            break;
9746        }
9747        case LITERAL_else:
9748        {
9749            AST tmp247_AST = null;
9750            tmp247_AST = astFactory.create(LT(1));
9751            astFactory.addASTChild(currentAST, tmp247_AST);
9752            match(LITERAL_else);
9753            break;
9754        }
9755        case LITERAL_for:
9756        {
9757            AST tmp248_AST = null;
9758            tmp248_AST = astFactory.create(LT(1));
9759            astFactory.addASTChild(currentAST, tmp248_AST);
9760            match(LITERAL_for);
9761            break;
9762        }
9763        case LITERAL_while:
9764        {
9765            AST tmp249_AST = null;
9766            tmp249_AST = astFactory.create(LT(1));
9767            astFactory.addASTChild(currentAST, tmp249_AST);
9768            match(LITERAL_while);
9769            break;
9770        }
9771        case UNUSED_DO:
9772        {
9773            AST tmp250_AST = null;
9774            tmp250_AST = astFactory.create(LT(1));
9775            astFactory.addASTChild(currentAST, tmp250_AST);
9776            match(UNUSED_DO);
9777            break;
9778        }
9779        case LITERAL_switch:
9780        {
9781            AST tmp251_AST = null;
9782            tmp251_AST = astFactory.create(LT(1));
9783            astFactory.addASTChild(currentAST, tmp251_AST);
9784            match(LITERAL_switch);
9785            break;
9786        }
9787        case LITERAL_try:
9788        {
9789            AST tmp252_AST = null;
9790            tmp252_AST = astFactory.create(LT(1));
9791            astFactory.addASTChild(currentAST, tmp252_AST);
9792            match(LITERAL_try);
9793            break;
9794        }
9795        case LITERAL_catch:
9796        {
9797            AST tmp253_AST = null;
9798            tmp253_AST = astFactory.create(LT(1));
9799            astFactory.addASTChild(currentAST, tmp253_AST);
9800            match(LITERAL_catch);
9801            break;
9802        }
9803        case LITERAL_finally:
9804        {
9805            AST tmp254_AST = null;
9806            tmp254_AST = astFactory.create(LT(1));
9807            astFactory.addASTChild(currentAST, tmp254_AST);
9808            match(LITERAL_finally);
9809            break;
9810        }
9811        case LITERAL_void:
9812        case LITERAL_boolean:
9813        case LITERAL_byte:
9814        case LITERAL_char:
9815        case LITERAL_short:
9816        case LITERAL_int:
9817        case LITERAL_float:
9818        case LITERAL_long:
9819        case LITERAL_double:
9820        case LITERAL_any:
9821        {
9822            builtInType();
9823            astFactory.addASTChild(currentAST, returnAST);
9824            break;
9825        }
9826        default:
9827        {
9828            throw new NoViableAltException(LT(1), getFilename());
9829        }
9830        }
9831        }
9832        if ( inputState.guessing==0 ) {
9833            keywordPropertyNames_AST = (AST)currentAST.root;
9834            keywordPropertyNames_AST.setType(IDENT);
9835        }
9836        keywordPropertyNames_AST = (AST)currentAST.root;
9837        returnAST = keywordPropertyNames_AST;
9838    }
9839    
9840    public final void parenthesizedExpression() throws RecognitionException, TokenStreamException {
9841        
9842        returnAST = null;
9843        ASTPair currentAST = new ASTPair();
9844        AST parenthesizedExpression_AST = null;
9845        
9846        match(LPAREN);
9847        strictContextExpression();
9848        astFactory.addASTChild(currentAST, returnAST);
9849        match(RPAREN);
9850        parenthesizedExpression_AST = (AST)currentAST.root;
9851        returnAST = parenthesizedExpression_AST;
9852    }
9853    
9854    public final void stringConstructorExpression() throws RecognitionException, TokenStreamException {
9855        
9856        returnAST = null;
9857        ASTPair currentAST = new ASTPair();
9858        AST stringConstructorExpression_AST = null;
9859        Token cs = null;
9860        AST cs_AST = null;
9861        Token cm = null;
9862        AST cm_AST = null;
9863        Token ce = null;
9864        AST ce_AST = null;
9865        Token first = LT(1);
9866        
9867        cs = LT(1);
9868        cs_AST = astFactory.create(cs);
9869        astFactory.addASTChild(currentAST, cs_AST);
9870        match(STRING_CTOR_START);
9871        if ( inputState.guessing==0 ) {
9872            cs_AST.setType(STRING_LITERAL);
9873        }
9874        stringConstructorValuePart();
9875        astFactory.addASTChild(currentAST, returnAST);
9876        {
9877        _loop439:
9878        do {
9879            if ((LA(1)==STRING_CTOR_MIDDLE)) {
9880                cm = LT(1);
9881                cm_AST = astFactory.create(cm);
9882                astFactory.addASTChild(currentAST, cm_AST);
9883                match(STRING_CTOR_MIDDLE);
9884                if ( inputState.guessing==0 ) {
9885                    cm_AST.setType(STRING_LITERAL);
9886                }
9887                stringConstructorValuePart();
9888                astFactory.addASTChild(currentAST, returnAST);
9889            }
9890            else {
9891                break _loop439;
9892            }
9893            
9894        } while (true);
9895        }
9896        ce = LT(1);
9897        ce_AST = astFactory.create(ce);
9898        astFactory.addASTChild(currentAST, ce_AST);
9899        match(STRING_CTOR_END);
9900        if ( inputState.guessing==0 ) {
9901            stringConstructorExpression_AST = (AST)currentAST.root;
9902            ce_AST.setType(STRING_LITERAL);
9903            stringConstructorExpression_AST =
9904            (AST)astFactory.make( (new ASTArray(2)).add(create(STRING_CONSTRUCTOR,"STRING_CONSTRUCTOR",first,LT(1))).add(stringConstructorExpression_AST));
9905            
9906            currentAST.root = stringConstructorExpression_AST;
9907            currentAST.child = stringConstructorExpression_AST!=null &&stringConstructorExpression_AST.getFirstChild()!=null ?
9908                stringConstructorExpression_AST.getFirstChild() : stringConstructorExpression_AST;
9909            currentAST.advanceChildToEnd();
9910        }
9911        stringConstructorExpression_AST = (AST)currentAST.root;
9912        returnAST = stringConstructorExpression_AST;
9913    }
9914    
9915    public final void logicalOrExpression(
9916        int lc_stmt
9917    ) throws RecognitionException, TokenStreamException {
9918        
9919        returnAST = null;
9920        ASTPair currentAST = new ASTPair();
9921        AST logicalOrExpression_AST = null;
9922        
9923        logicalAndExpression(lc_stmt);
9924        astFactory.addASTChild(currentAST, returnAST);
9925        {
9926        _loop361:
9927        do {
9928            if ((LA(1)==LOR)) {
9929                AST tmp257_AST = null;
9930                tmp257_AST = astFactory.create(LT(1));
9931                astFactory.makeASTRoot(currentAST, tmp257_AST);
9932                match(LOR);
9933                nls();
9934                logicalAndExpression(0);
9935                astFactory.addASTChild(currentAST, returnAST);
9936            }
9937            else {
9938                break _loop361;
9939            }
9940            
9941        } while (true);
9942        }
9943        logicalOrExpression_AST = (AST)currentAST.root;
9944        returnAST = logicalOrExpression_AST;
9945    }
9946    
9947    public final void logicalAndExpression(
9948        int lc_stmt
9949    ) throws RecognitionException, TokenStreamException {
9950        
9951        returnAST = null;
9952        ASTPair currentAST = new ASTPair();
9953        AST logicalAndExpression_AST = null;
9954        
9955        inclusiveOrExpression(lc_stmt);
9956        astFactory.addASTChild(currentAST, returnAST);
9957        {
9958        _loop364:
9959        do {
9960            if ((LA(1)==LAND)) {
9961                AST tmp258_AST = null;
9962                tmp258_AST = astFactory.create(LT(1));
9963                astFactory.makeASTRoot(currentAST, tmp258_AST);
9964                match(LAND);
9965                nls();
9966                inclusiveOrExpression(0);
9967                astFactory.addASTChild(currentAST, returnAST);
9968            }
9969            else {
9970                break _loop364;
9971            }
9972            
9973        } while (true);
9974        }
9975        logicalAndExpression_AST = (AST)currentAST.root;
9976        returnAST = logicalAndExpression_AST;
9977    }
9978    
9979    public final void inclusiveOrExpression(
9980        int lc_stmt
9981    ) throws RecognitionException, TokenStreamException {
9982        
9983        returnAST = null;
9984        ASTPair currentAST = new ASTPair();
9985        AST inclusiveOrExpression_AST = null;
9986        
9987        exclusiveOrExpression(lc_stmt);
9988        astFactory.addASTChild(currentAST, returnAST);
9989        {
9990        _loop367:
9991        do {
9992            if ((LA(1)==BOR)) {
9993                AST tmp259_AST = null;
9994                tmp259_AST = astFactory.create(LT(1));
9995                astFactory.makeASTRoot(currentAST, tmp259_AST);
9996                match(BOR);
9997                nls();
9998                exclusiveOrExpression(0);
9999                astFactory.addASTChild(currentAST, returnAST);
0000            }
0001            else {
0002                break _loop367;
0003            }
0004            
0005        } while (true);
0006        }
0007        inclusiveOrExpression_AST = (AST)currentAST.root;
0008        returnAST = inclusiveOrExpression_AST;
0009    }
0010    
0011    public final void exclusiveOrExpression(
0012        int lc_stmt
0013    ) throws RecognitionException, TokenStreamException {
0014        
0015        returnAST = null;
0016        ASTPair currentAST = new ASTPair();
0017        AST exclusiveOrExpression_AST = null;
0018        
0019        andExpression(lc_stmt);
0020        astFactory.addASTChild(currentAST, returnAST);
0021        {
0022        _loop370:
0023        do {
0024            if ((LA(1)==BXOR)) {
0025                AST tmp260_AST = null;
0026                tmp260_AST = astFactory.create(LT(1));
0027                astFactory.makeASTRoot(currentAST, tmp260_AST);
0028                match(BXOR);
0029                nls();
0030                andExpression(0);
0031                astFactory.addASTChild(currentAST, returnAST);
0032            }
0033            else {
0034                break _loop370;
0035            }
0036            
0037        } while (true);
0038        }
0039        exclusiveOrExpression_AST = (AST)currentAST.root;
0040        returnAST = exclusiveOrExpression_AST;
0041    }
0042    
0043    public final void andExpression(
0044        int lc_stmt
0045    ) throws RecognitionException, TokenStreamException {
0046        
0047        returnAST = null;
0048        ASTPair currentAST = new ASTPair();
0049        AST andExpression_AST = null;
0050        
0051        regexExpression(lc_stmt);
0052        astFactory.addASTChild(currentAST, returnAST);
0053        {
0054        _loop373:
0055        do {
0056            if ((LA(1)==BAND)) {
0057                AST tmp261_AST = null;
0058                tmp261_AST = astFactory.create(LT(1));
0059                astFactory.makeASTRoot(currentAST, tmp261_AST);
0060                match(BAND);
0061                nls();
0062                regexExpression(0);
0063                astFactory.addASTChild(currentAST, returnAST);
0064            }
0065            else {
0066                break _loop373;
0067            }
0068            
0069        } while (true);
0070        }
0071        andExpression_AST = (AST)currentAST.root;
0072        returnAST = andExpression_AST;
0073    }
0074    
0075    public final void regexExpression(
0076        int lc_stmt
0077    ) throws RecognitionException, TokenStreamException {
0078        
0079        returnAST = null;
0080        ASTPair currentAST = new ASTPair();
0081        AST regexExpression_AST = null;
0082        
0083        equalityExpression(lc_stmt);
0084        astFactory.addASTChild(currentAST, returnAST);
0085        {
0086        _loop377:
0087        do {
0088            if ((LA(1)==REGEX_FIND||LA(1)==REGEX_MATCH)) {
0089                {
0090                switch ( LA(1)) {
0091                case REGEX_FIND:
0092                {
0093                    AST tmp262_AST = null;
0094                    tmp262_AST = astFactory.create(LT(1));
0095                    astFactory.makeASTRoot(currentAST, tmp262_AST);
0096                    match(REGEX_FIND);
0097                    break;
0098                }
0099                case REGEX_MATCH:
0100                {
0101                    AST tmp263_AST = null;
0102                    tmp263_AST = astFactory.create(LT(1));
0103                    astFactory.makeASTRoot(currentAST, tmp263_AST);
0104                    match(REGEX_MATCH);
0105                    break;
0106                }
0107                default:
0108                {
0109                    throw new NoViableAltException(LT(1), getFilename());
0110                }
0111                }
0112                }
0113                nls();
0114                equalityExpression(0);
0115                astFactory.addASTChild(currentAST, returnAST);
0116            }
0117            else {
0118                break _loop377;
0119            }
0120            
0121        } while (true);
0122        }
0123        regexExpression_AST = (AST)currentAST.root;
0124        returnAST = regexExpression_AST;
0125    }
0126    
0127    public final void equalityExpression(
0128        int lc_stmt
0129    ) throws RecognitionException, TokenStreamException {
0130        
0131        returnAST = null;
0132        ASTPair currentAST = new ASTPair();
0133        AST equalityExpression_AST = null;
0134        
0135        relationalExpression(lc_stmt);
0136        astFactory.addASTChild(currentAST, returnAST);
0137        {
0138        _loop381:
0139        do {
0140            if (((LA(1) >= NOT_EQUAL && LA(1) <= COMPARE_TO))) {
0141                {
0142                switch ( LA(1)) {
0143                case NOT_EQUAL:
0144                {
0145                    AST tmp264_AST = null;
0146                    tmp264_AST = astFactory.create(LT(1));
0147                    astFactory.makeASTRoot(currentAST, tmp264_AST);
0148                    match(NOT_EQUAL);
0149                    break;
0150                }
0151                case EQUAL:
0152                {
0153                    AST tmp265_AST = null;
0154                    tmp265_AST = astFactory.create(LT(1));
0155                    astFactory.makeASTRoot(currentAST, tmp265_AST);
0156                    match(EQUAL);
0157                    break;
0158                }
0159                case COMPARE_TO:
0160                {
0161                    AST tmp266_AST = null;
0162                    tmp266_AST = astFactory.create(LT(1));
0163                    astFactory.makeASTRoot(currentAST, tmp266_AST);
0164                    match(COMPARE_TO);
0165                    break;
0166                }
0167                default:
0168                {
0169                    throw new NoViableAltException(LT(1), getFilename());
0170                }
0171                }
0172                }
0173                nls();
0174                relationalExpression(0);
0175                astFactory.addASTChild(currentAST, returnAST);
0176            }
0177            else {
0178                break _loop381;
0179            }
0180            
0181        } while (true);
0182        }
0183        equalityExpression_AST = (AST)currentAST.root;
0184        returnAST = equalityExpression_AST;
0185    }
0186    
0187    public final void relationalExpression(
0188        int lc_stmt
0189    ) throws RecognitionException, TokenStreamException {
0190        
0191        returnAST = null;
0192        ASTPair currentAST = new ASTPair();
0193        AST relationalExpression_AST = null;
0194        
0195        shiftExpression(lc_stmt);
0196        astFactory.addASTChild(currentAST, returnAST);
0197        {
0198        switch ( LA(1)) {
0199        case EOF:
0200        case IDENT:
0201        case LBRACK:
0202        case RBRACK:
0203        case LPAREN:
0204        case QUESTION:
0205        case LITERAL_super:
0206        case LT:
0207        case COMMA:
0208        case GT:
0209        case LITERAL_void:
0210        case LITERAL_boolean:
0211        case LITERAL_byte:
0212        case LITERAL_char:
0213        case LITERAL_short:
0214        case LITERAL_int:
0215        case LITERAL_float:
0216        case LITERAL_long:
0217        case LITERAL_double:
0218        case LITERAL_any:
0219        case RPAREN:
0220        case ASSIGN:
0221        case BAND:
0222        case LCURLY:
0223        case RCURLY:
0224        case SEMI:
0225        case NLS:
0226        case LITERAL_default:
0227        case LITERAL_this:
0228        case STRING_LITERAL:
0229        case CLOSURE_OP:
0230        case LOR:
0231        case BOR:
0232        case COLON:
0233        case LITERAL_else:
0234        case LITERAL_in:
0235        case PLUS:
0236        case MINUS:
0237        case LITERAL_case:
0238        case PLUS_ASSIGN:
0239        case MINUS_ASSIGN:
0240        case STAR_ASSIGN:
0241        case DIV_ASSIGN:
0242        case MOD_ASSIGN:
0243        case SR_ASSIGN:
0244        case BSR_ASSIGN:
0245        case SL_ASSIGN:
0246        case BAND_ASSIGN:
0247        case BXOR_ASSIGN:
0248        case BOR_ASSIGN:
0249        case STAR_STAR_ASSIGN:
0250        case LAND:
0251        case BXOR:
0252        case REGEX_FIND:
0253        case REGEX_MATCH:
0254        case NOT_EQUAL:
0255        case EQUAL:
0256        case COMPARE_TO:
0257        case LE:
0258        case GE:
0259        case INC:
0260        case DEC:
0261        case BNOT:
0262        case LNOT:
0263        case DOLLAR:
0264        case STRING_CTOR_START:
0265        case LITERAL_new:
0266        case LITERAL_true:
0267        case LITERAL_false:
0268        case LITERAL_null:
0269        case NUM_INT:
0270        case NUM_FLOAT:
0271        case NUM_LONG:
0272        case NUM_DOUBLE:
0273        case NUM_BIG_INT:
0274        case NUM_BIG_DECIMAL:
0275        {
0276            {
0277            switch ( LA(1)) {
0278            case LT:
0279            case GT:
0280            case LITERAL_in:
0281            case LE:
0282            case GE:
0283            {
0284                {
0285                switch ( LA(1)) {
0286                case LT:
0287                {
0288                    AST tmp267_AST = null;
0289                    tmp267_AST = astFactory.create(LT(1));
0290                    astFactory.makeASTRoot(currentAST, tmp267_AST);
0291                    match(LT);
0292                    break;
0293                }
0294                case GT:
0295                {
0296                    AST tmp268_AST = null;
0297                    tmp268_AST = astFactory.create(LT(1));
0298                    astFactory.makeASTRoot(currentAST, tmp268_AST);
0299                    match(GT);
0300                    break;
0301                }
0302                case LE:
0303                {
0304                    AST tmp269_AST = null;
0305                    tmp269_AST = astFactory.create(LT(1));
0306                    astFactory.makeASTRoot(currentAST, tmp269_AST);
0307                    match(LE);
0308                    break;
0309                }
0310                case GE:
0311                {
0312                    AST tmp270_AST = null;
0313                    tmp270_AST = astFactory.create(LT(1));
0314                    astFactory.makeASTRoot(currentAST, tmp270_AST);
0315                    match(GE);
0316                    break;
0317                }
0318                case LITERAL_in:
0319                {
0320                    AST tmp271_AST = null;
0321                    tmp271_AST = astFactory.create(LT(1));
0322                    astFactory.makeASTRoot(currentAST, tmp271_AST);
0323                    match(LITERAL_in);
0324                    break;
0325                }
0326                default:
0327                {
0328                    throw new NoViableAltException(LT(1), getFilename());
0329                }
0330                }
0331                }
0332                nls();
0333                shiftExpression(0);
0334                astFactory.addASTChild(currentAST, returnAST);
0335                break;
0336            }
0337            case EOF:
0338            case IDENT:
0339            case LBRACK:
0340            case RBRACK:
0341            case LPAREN:
0342            case QUESTION:
0343            case LITERAL_super:
0344            case COMMA:
0345            case LITERAL_void:
0346            case LITERAL_boolean:
0347            case LITERAL_byte:
0348            case LITERAL_char:
0349            case LITERAL_short:
0350            case LITERAL_int:
0351            case LITERAL_float:
0352            case LITERAL_long:
0353            case LITERAL_double:
0354            case LITERAL_any:
0355            case RPAREN:
0356            case ASSIGN:
0357            case BAND:
0358            case LCURLY:
0359            case RCURLY:
0360            case SEMI:
0361            case NLS:
0362            case LITERAL_default:
0363            case LITERAL_this:
0364            case STRING_LITERAL:
0365            case CLOSURE_OP:
0366            case LOR:
0367            case BOR:
0368            case COLON:
0369            case LITERAL_else:
0370            case PLUS:
0371            case MINUS:
0372            case LITERAL_case:
0373            case PLUS_ASSIGN:
0374            case MINUS_ASSIGN:
0375            case STAR_ASSIGN:
0376            case DIV_ASSIGN:
0377            case MOD_ASSIGN:
0378            case SR_ASSIGN:
0379            case BSR_ASSIGN:
0380            case SL_ASSIGN:
0381            case BAND_ASSIGN:
0382            case BXOR_ASSIGN:
0383            case BOR_ASSIGN:
0384            case STAR_STAR_ASSIGN:
0385            case LAND:
0386            case BXOR:
0387            case REGEX_FIND:
0388            case REGEX_MATCH:
0389            case NOT_EQUAL:
0390            case EQUAL:
0391            case COMPARE_TO:
0392            case INC:
0393            case DEC:
0394            case BNOT:
0395            case LNOT:
0396            case DOLLAR:
0397            case STRING_CTOR_START:
0398            case LITERAL_new:
0399            case LITERAL_true:
0400            case LITERAL_false:
0401            case LITERAL_null:
0402            case NUM_INT:
0403            case NUM_FLOAT:
0404            case NUM_LONG:
0405            case NUM_DOUBLE:
0406            case NUM_BIG_INT:
0407            case NUM_BIG_DECIMAL:
0408            {
0409                break;
0410            }
0411            default:
0412            {
0413                throw new NoViableAltException(LT(1), getFilename());
0414            }
0415            }
0416            }
0417            break;
0418        }
0419        case LITERAL_instanceof:
0420        {
0421            AST tmp272_AST = null;
0422            tmp272_AST = astFactory.create(LT(1));
0423            astFactory.makeASTRoot(currentAST, tmp272_AST);
0424            match(LITERAL_instanceof);
0425            nls();
0426            typeSpec(true);
0427            astFactory.addASTChild(currentAST, returnAST);
0428            break;
0429        }
0430        case LITERAL_as:
0431        {
0432            AST tmp273_AST = null;
0433            tmp273_AST = astFactory.create(LT(1));
0434            astFactory.makeASTRoot(currentAST, tmp273_AST);
0435            match(LITERAL_as);
0436            nls();
0437            typeSpec(true);
0438            astFactory.addASTChild(currentAST, returnAST);
0439            break;
0440        }
0441        default:
0442        {
0443            throw new NoViableAltException(LT(1), getFilename());
0444        }
0445        }
0446        }
0447        relationalExpression_AST = (AST)currentAST.root;
0448        returnAST = relationalExpression_AST;
0449    }
0450    
0451    public final void additiveExpression(
0452        int lc_stmt
0453    ) throws RecognitionException, TokenStreamException {
0454        
0455        returnAST = null;
0456        ASTPair currentAST = new ASTPair();
0457        AST additiveExpression_AST = null;
0458        
0459        multiplicativeExpression(lc_stmt);
0460        astFactory.addASTChild(currentAST, returnAST);
0461        {
0462        _loop394:
0463        do {
0464            if ((LA(1)==PLUS||LA(1)==MINUS) && (_tokenSet_108.member(LA(2))) && (_tokenSet_17.member(LA(3)))) {
0465                {
0466                switch ( LA(1)) {
0467                case PLUS:
0468                {
0469                    AST tmp274_AST = null;
0470                    tmp274_AST = astFactory.create(LT(1));
0471                    astFactory.makeASTRoot(currentAST, tmp274_AST);
0472                    match(PLUS);
0473                    break;
0474                }
0475                case MINUS:
0476                {
0477                    AST tmp275_AST = null;
0478                    tmp275_AST = astFactory.create(LT(1));
0479                    astFactory.makeASTRoot(currentAST, tmp275_AST);
0480                    match(MINUS);
0481                    break;
0482                }
0483                default:
0484                {
0485                    throw new NoViableAltException(LT(1), getFilename());
0486                }
0487                }
0488                }
0489                nls();
0490                multiplicativeExpression(0);
0491                astFactory.addASTChild(currentAST, returnAST);
0492            }
0493            else {
0494                break _loop394;
0495            }
0496            
0497        } while (true);
0498        }
0499        additiveExpression_AST = (AST)currentAST.root;
0500        returnAST = additiveExpression_AST;
0501    }
0502    
0503    public final void multiplicativeExpression(
0504        int lc_stmt
0505    ) throws RecognitionException, TokenStreamException {
0506        
0507        returnAST = null;
0508        ASTPair currentAST = new ASTPair();
0509        AST multiplicativeExpression_AST = null;
0510        
0511        switch ( LA(1)) {
0512        case INC:
0513        {
0514            {
0515            AST tmp276_AST = null;
0516            tmp276_AST = astFactory.create(LT(1));
0517            astFactory.makeASTRoot(currentAST, tmp276_AST);
0518            match(INC);
0519            nls();
0520            powerExpression(0);
0521            astFactory.addASTChild(currentAST, returnAST);
0522            {
0523            _loop399:
0524            do {
0525                if ((_tokenSet_109.member(LA(1)))) {
0526                    {
0527                    switch ( LA(1)) {
0528                    case STAR:
0529                    {
0530                        AST tmp277_AST = null;
0531                        tmp277_AST = astFactory.create(LT(1));
0532                        astFactory.makeASTRoot(currentAST, tmp277_AST);
0533                        match(STAR);
0534                        break;
0535                    }
0536                    case DIV:
0537                    {
0538                        AST tmp278_AST = null;
0539                        tmp278_AST = astFactory.create(LT(1));
0540                        astFactory.makeASTRoot(currentAST, tmp278_AST);
0541                        match(DIV);
0542                        break;
0543                    }
0544                    case MOD:
0545                    {
0546                        AST tmp279_AST = null;
0547                        tmp279_AST = astFactory.create(LT(1));
0548                        astFactory.makeASTRoot(currentAST, tmp279_AST);
0549                        match(MOD);
0550                        break;
0551                    }
0552                    default:
0553                    {
0554                        throw new NoViableAltException(LT(1), getFilename());
0555                    }
0556                    }
0557                    }
0558                    nls();
0559                    powerExpression(0);
0560                    astFactory.addASTChild(currentAST, returnAST);
0561                }
0562                else {
0563                    break _loop399;
0564                }
0565                
0566            } while (true);
0567            }
0568            }
0569            multiplicativeExpression_AST = (AST)currentAST.root;
0570            break;
0571        }
0572        case DEC:
0573        {
0574            {
0575            AST tmp280_AST = null;
0576            tmp280_AST = astFactory.create(LT(1));
0577            astFactory.makeASTRoot(currentAST, tmp280_AST);
0578            match(DEC);
0579            nls();
0580            powerExpression(0);
0581            astFactory.addASTChild(currentAST, returnAST);
0582            {
0583            _loop403:
0584            do {
0585                if ((_tokenSet_109.member(LA(1)))) {
0586                    {
0587                    switch ( LA(1)) {
0588                    case STAR:
0589                    {
0590                        AST tmp281_AST = null;
0591                        tmp281_AST = astFactory.create(LT(1));
0592                        astFactory.makeASTRoot(currentAST, tmp281_AST);
0593                        match(STAR);
0594                        break;
0595                    }
0596                    case DIV:
0597                    {
0598                        AST tmp282_AST = null;
0599                        tmp282_AST = astFactory.create(LT(1));
0600                        astFactory.makeASTRoot(currentAST, tmp282_AST);
0601                        match(DIV);
0602                        break;
0603                    }
0604                    case MOD:
0605                    {
0606                        AST tmp283_AST = null;
0607                        tmp283_AST = astFactory.create(LT(1));
0608                        astFactory.makeASTRoot(currentAST, tmp283_AST);
0609                        match(MOD);
0610                        break;
0611                    }
0612                    default:
0613                    {
0614                        throw new NoViableAltException(LT(1), getFilename());
0615                    }
0616                    }
0617                    }
0618                    nls();
0619                    powerExpression(0);
0620                    astFactory.addASTChild(currentAST, returnAST);
0621                }
0622                else {
0623                    break _loop403;
0624                }
0625                
0626            } while (true);
0627            }
0628            }
0629            multiplicativeExpression_AST = (AST)currentAST.root;
0630            break;
0631        }
0632        case MINUS:
0633        {
0634            {
0635            AST tmp284_AST = null;
0636            tmp284_AST = astFactory.create(LT(1));
0637            astFactory.makeASTRoot(currentAST, tmp284_AST);
0638            match(MINUS);
0639            if ( inputState.guessing==0 ) {
0640                tmp284_AST.setType(UNARY_MINUS);
0641            }
0642            nls();
0643            powerExpression(0);
0644            astFactory.addASTChild(currentAST, returnAST);
0645            {
0646            _loop407:
0647            do {
0648                if ((_tokenSet_109.member(LA(1)))) {
0649                    {
0650                    switch ( LA(1)) {
0651                    case STAR:
0652                    {
0653                        AST tmp285_AST = null;
0654                        tmp285_AST = astFactory.create(LT(1));
0655                        astFactory.makeASTRoot(currentAST, tmp285_AST);
0656                        match(STAR);
0657                        break;
0658                    }
0659                    case DIV:
0660                    {
0661                        AST tmp286_AST = null;
0662                        tmp286_AST = astFactory.create(LT(1));
0663                        astFactory.makeASTRoot(currentAST, tmp286_AST);
0664                        match(DIV);
0665                        break;
0666                    }
0667                    case MOD:
0668                    {
0669                        AST tmp287_AST = null;
0670                        tmp287_AST = astFactory.create(LT(1));
0671                        astFactory.makeASTRoot(currentAST, tmp287_AST);
0672                        match(MOD);
0673                        break;
0674                    }
0675                    default:
0676                    {
0677                        throw new NoViableAltException(LT(1), getFilename());
0678                    }
0679                    }
0680                    }
0681                    nls();
0682                    powerExpression(0);
0683                    astFactory.addASTChild(currentAST, returnAST);
0684                }
0685                else {
0686                    break _loop407;
0687                }
0688                
0689            } while (true);
0690            }
0691            }
0692            multiplicativeExpression_AST = (AST)currentAST.root;
0693            break;
0694        }
0695        case PLUS:
0696        {
0697            {
0698            AST tmp288_AST = null;
0699            tmp288_AST = astFactory.create(LT(1));
0700            astFactory.makeASTRoot(currentAST, tmp288_AST);
0701            match(PLUS);
0702            if ( inputState.guessing==0 ) {
0703                tmp288_AST.setType(UNARY_PLUS);
0704            }
0705            nls();
0706            powerExpression(0);
0707            astFactory.addASTChild(currentAST, returnAST);
0708            {
0709            _loop411:
0710            do {
0711                if ((_tokenSet_109.member(LA(1)))) {
0712                    {
0713                    switch ( LA(1)) {
0714                    case STAR:
0715                    {
0716                        AST tmp289_AST = null;
0717                        tmp289_AST = astFactory.create(LT(1));
0718                        astFactory.makeASTRoot(currentAST, tmp289_AST);
0719                        match(STAR);
0720                        break;
0721                    }
0722                    case DIV:
0723                    {
0724                        AST tmp290_AST = null;
0725                        tmp290_AST = astFactory.create(LT(1));
0726                        astFactory.makeASTRoot(currentAST, tmp290_AST);
0727                        match(DIV);
0728                        break;
0729                    }
0730                    case MOD:
0731                    {
0732                        AST tmp291_AST = null;
0733                        tmp291_AST = astFactory.create(LT(1));
0734                        astFactory.makeASTRoot(currentAST, tmp291_AST);
0735                        match(MOD);
0736                        break;
0737                    }
0738                    default:
0739                    {
0740                        throw new NoViableAltException(LT(1), getFilename());
0741                    }
0742                    }
0743                    }
0744                    nls();
0745                    powerExpression(0);
0746                    astFactory.addASTChild(currentAST, returnAST);
0747                }
0748                else {
0749                    break _loop411;
0750                }
0751                
0752            } while (true);
0753            }
0754            }
0755            multiplicativeExpression_AST = (AST)currentAST.root;
0756            break;
0757        }
0758        case IDENT:
0759        case LBRACK:
0760        case LPAREN:
0761        case LITERAL_super:
0762        case LITERAL_void:
0763        case LITERAL_boolean:
0764        case LITERAL_byte:
0765        case LITERAL_char:
0766        case LITERAL_short:
0767        case LITERAL_int:
0768        case LITERAL_float:
0769        case LITERAL_long:
0770        case LITERAL_double:
0771        case LITERAL_any:
0772        case LCURLY:
0773        case LITERAL_this:
0774        case STRING_LITERAL:
0775        case BNOT:
0776        case LNOT:
0777        case DOLLAR:
0778        case STRING_CTOR_START:
0779        case LITERAL_new:
0780        case LITERAL_true:
0781        case LITERAL_false:
0782        case LITERAL_null:
0783        case NUM_INT:
0784        case NUM_FLOAT:
0785        case NUM_LONG:
0786        case NUM_DOUBLE:
0787        case NUM_BIG_INT:
0788        case NUM_BIG_DECIMAL:
0789        {
0790            {
0791            powerExpression(lc_stmt);
0792            astFactory.addASTChild(currentAST, returnAST);
0793            {
0794            _loop415:
0795            do {
0796                if ((_tokenSet_109.member(LA(1)))) {
0797                    {
0798                    switch ( LA(1)) {
0799                    case STAR:
0800                    {
0801                        AST tmp292_AST = null;
0802                        tmp292_AST = astFactory.create(LT(1));
0803                        astFactory.makeASTRoot(currentAST, tmp292_AST);
0804                        match(STAR);
0805                        break;
0806                    }
0807                    case DIV:
0808                    {
0809                        AST tmp293_AST = null;
0810                        tmp293_AST = astFactory.create(LT(1));
0811                        astFactory.makeASTRoot(currentAST, tmp293_AST);
0812                        match(DIV);
0813                        break;
0814                    }
0815                    case MOD:
0816                    {
0817                        AST tmp294_AST = null;
0818                        tmp294_AST = astFactory.create(LT(1));
0819                        astFactory.makeASTRoot(currentAST, tmp294_AST);
0820                        match(MOD);
0821                        break;
0822                    }
0823                    default:
0824                    {
0825                        throw new NoViableAltException(LT(1), getFilename());
0826                    }
0827                    }
0828                    }
0829                    nls();
0830                    powerExpression(0);
0831                    astFactory.addASTChild(currentAST, returnAST);
0832                }
0833                else {
0834                    break _loop415;
0835                }
0836                
0837            } while (true);
0838            }
0839            }
0840            multiplicativeExpression_AST = (AST)currentAST.root;
0841            break;
0842        }
0843        default:
0844        {
0845            throw new NoViableAltException(LT(1), getFilename());
0846        }
0847        }
0848        returnAST = multiplicativeExpression_AST;
0849    }
0850    
0851    public final void powerExpression(
0852        int lc_stmt
0853    ) throws RecognitionException, TokenStreamException {
0854        
0855        returnAST = null;
0856        ASTPair currentAST = new ASTPair();
0857        AST powerExpression_AST = null;
0858        
0859        unaryExpressionNotPlusMinus(lc_stmt);
0860        astFactory.addASTChild(currentAST, returnAST);
0861        {
0862        _loop418:
0863        do {
0864            if ((LA(1)==STAR_STAR)) {
0865                AST tmp295_AST = null;
0866                tmp295_AST = astFactory.create(LT(1));
0867                astFactory.makeASTRoot(currentAST, tmp295_AST);
0868                match(STAR_STAR);
0869                nls();
0870                unaryExpression(0);
0871                astFactory.addASTChild(currentAST, returnAST);
0872            }
0873            else {
0874                break _loop418;
0875            }
0876            
0877        } while (true);
0878        }
0879        powerExpression_AST = (AST)currentAST.root;
0880        returnAST = powerExpression_AST;
0881    }
0882    
0883    public final void unaryExpressionNotPlusMinus(
0884        int lc_stmt
0885    ) throws RecognitionException, TokenStreamException {
0886        
0887        returnAST = null;
0888        ASTPair currentAST = new ASTPair();
0889        AST unaryExpressionNotPlusMinus_AST = null;
0890        Token lpb = null;
0891        AST lpb_AST = null;
0892        Token lp = null;
0893        AST lp_AST = null;
0894        
0895        switch ( LA(1)) {
0896        case BNOT:
0897        {
0898            AST tmp296_AST = null;
0899            tmp296_AST = astFactory.create(LT(1));
0900            astFactory.makeASTRoot(currentAST, tmp296_AST);
0901            match(BNOT);
0902            nls();
0903            unaryExpression(0);
0904            astFactory.addASTChild(currentAST, returnAST);
0905            unaryExpressionNotPlusMinus_AST = (AST)currentAST.root;
0906            break;
0907        }
0908        case LNOT:
0909        {
0910            AST tmp297_AST = null;
0911            tmp297_AST = astFactory.create(LT(1));
0912            astFactory.makeASTRoot(currentAST, tmp297_AST);
0913            match(LNOT);
0914            nls();
0915            unaryExpression(0);
0916            astFactory.addASTChild(currentAST, returnAST);
0917            unaryExpressionNotPlusMinus_AST = (AST)currentAST.root;
0918            break;
0919        }
0920        case IDENT:
0921        case LBRACK:
0922        case LPAREN:
0923        case LITERAL_super:
0924        case LITERAL_void:
0925        case LITERAL_boolean:
0926        case LITERAL_byte:
0927        case LITERAL_char:
0928        case LITERAL_short:
0929        case LITERAL_int:
0930        case LITERAL_float:
0931        case LITERAL_long:
0932        case LITERAL_double:
0933        case LITERAL_any:
0934        case LCURLY:
0935        case LITERAL_this:
0936        case STRING_LITERAL:
0937        case DOLLAR:
0938        case STRING_CTOR_START:
0939        case LITERAL_new:
0940        case LITERAL_true:
0941        case LITERAL_false:
0942        case LITERAL_null:
0943        case NUM_INT:
0944        case NUM_FLOAT:
0945        case NUM_LONG:
0946        case NUM_DOUBLE:
0947        case NUM_BIG_INT:
0948        case NUM_BIG_DECIMAL:
0949        {
0950            {
0951            boolean synPredMatched423 = false;
0952            if (((LA(1)==LPAREN) && ((LA(2) >= LITERAL_void && LA(2) <= LITERAL_any)) && (LA(3)==LBRACK||LA(3)==RPAREN))) {
0953                int _m423 = mark();
0954                synPredMatched423 = true;
0955                inputState.guessing++;
0956                try {
0957                    {
0958                    match(LPAREN);
0959                    builtInTypeSpec(true);
0960                    match(RPAREN);
0961                    unaryExpression(0);
0962                    }
0963                }
0964                catch (RecognitionException pe) {
0965                    synPredMatched423 = false;
0966                }
0967                rewind(_m423);
0968                inputState.guessing--;
0969            }
0970            if ( synPredMatched423 ) {
0971                lpb = LT(1);
0972                lpb_AST = astFactory.create(lpb);
0973                astFactory.makeASTRoot(currentAST, lpb_AST);
0974                match(LPAREN);
0975                if ( inputState.guessing==0 ) {
0976                    lpb_AST.setType(TYPECAST);
0977                }
0978                builtInTypeSpec(true);
0979                astFactory.addASTChild(currentAST, returnAST);
0980                match(RPAREN);
0981                unaryExpression(0);
0982                astFactory.addASTChild(currentAST, returnAST);
0983            }
0984            else {
0985                boolean synPredMatched425 = false;
0986                if (((LA(1)==LPAREN) && (LA(2)==IDENT) && (_tokenSet_110.member(LA(3))))) {
0987                    int _m425 = mark();
0988                    synPredMatched425 = true;
0989                    inputState.guessing++;
0990                    try {
0991                        {
0992                        match(LPAREN);
0993                        classTypeSpec(true);
0994                        match(RPAREN);
0995                        unaryExpressionNotPlusMinus(0);
0996                        }
0997                    }
0998                    catch (RecognitionException pe) {
0999                        synPredMatched425 = false;
1000                    }
1001                    rewind(_m425);
1002                    inputState.guessing--;
1003                }
1004                if ( synPredMatched425 ) {
1005                    lp = LT(1);
1006                    lp_AST = astFactory.create(lp);
1007                    astFactory.makeASTRoot(currentAST, lp_AST);
1008                    match(LPAREN);
1009                    if ( inputState.guessing==0 ) {
1010                        lp_AST.setType(TYPECAST);
1011                    }
1012                    classTypeSpec(true);
1013                    astFactory.addASTChild(currentAST, returnAST);
1014                    match(RPAREN);
1015                    unaryExpressionNotPlusMinus(0);
1016                    astFactory.addASTChild(currentAST, returnAST);
1017                }
1018                else if ((_tokenSet_111.member(LA(1))) && (_tokenSet_17.member(LA(2))) && (_tokenSet_11.member(LA(3)))) {
1019                    postfixExpression(lc_stmt);
1020                    astFactory.addASTChild(currentAST, returnAST);
1021                }
1022                else {
1023                    throw new NoViableAltException(LT(1), getFilename());
1024                }
1025                }
1026                }
1027                unaryExpressionNotPlusMinus_AST = (AST)currentAST.root;
1028                break;
1029            }
1030            default:
1031            {
1032                throw new NoViableAltException(LT(1), getFilename());
1033            }
1034            }
1035            returnAST = unaryExpressionNotPlusMinus_AST;
1036        }
1037        
1038    public final void unaryExpression(
1039        int lc_stmt
1040    ) throws RecognitionException, TokenStreamException {
1041        
1042        returnAST = null;
1043        ASTPair currentAST = new ASTPair();
1044        AST unaryExpression_AST = null;
1045        
1046        switch ( LA(1)) {
1047        case INC:
1048        {
1049            AST tmp300_AST = null;
1050            tmp300_AST = astFactory.create(LT(1));
1051            astFactory.makeASTRoot(currentAST, tmp300_AST);
1052            match(INC);
1053            nls();
1054            unaryExpression(0);
1055            astFactory.addASTChild(currentAST, returnAST);
1056            unaryExpression_AST = (AST)currentAST.root;
1057            break;
1058        }
1059        case DEC:
1060        {
1061            AST tmp301_AST = null;
1062            tmp301_AST = astFactory.create(LT(1));
1063            astFactory.makeASTRoot(currentAST, tmp301_AST);
1064            match(DEC);
1065            nls();
1066            unaryExpression(0);
1067            astFactory.addASTChild(currentAST, returnAST);
1068            unaryExpression_AST = (AST)currentAST.root;
1069            break;
1070        }
1071        case MINUS:
1072        {
1073            AST tmp302_AST = null;
1074            tmp302_AST = astFactory.create(LT(1));
1075            astFactory.makeASTRoot(currentAST, tmp302_AST);
1076            match(MINUS);
1077            if ( inputState.guessing==0 ) {
1078                tmp302_AST.setType(UNARY_MINUS);
1079            }
1080            nls();
1081            unaryExpression(0);
1082            astFactory.addASTChild(currentAST, returnAST);
1083            unaryExpression_AST = (AST)currentAST.root;
1084            break;
1085        }
1086        case PLUS:
1087        {
1088            AST tmp303_AST = null;
1089            tmp303_AST = astFactory.create(LT(1));
1090            astFactory.makeASTRoot(currentAST, tmp303_AST);
1091            match(PLUS);
1092            if ( inputState.guessing==0 ) {
1093                tmp303_AST.setType(UNARY_PLUS);
1094            }
1095            nls();
1096            unaryExpression(0);
1097            astFactory.addASTChild(currentAST, returnAST);
1098            unaryExpression_AST = (AST)currentAST.root;
1099            break;
1100        }
1101        case IDENT:
1102        case LBRACK:
1103        case LPAREN:
1104        case LITERAL_super:
1105        case LITERAL_void:
1106        case LITERAL_boolean:
1107        case LITERAL_byte:
1108        case LITERAL_char:
1109        case LITERAL_short:
1110        case LITERAL_int:
1111        case LITERAL_float:
1112        case LITERAL_long:
1113        case LITERAL_double:
1114        case LITERAL_any:
1115        case LCURLY:
1116        case LITERAL_this:
1117        case STRING_LITERAL:
1118        case BNOT:
1119        case LNOT:
1120        case DOLLAR:
1121        case STRING_CTOR_START:
1122        case LITERAL_new:
1123        case LITERAL_true:
1124        case LITERAL_false:
1125        case LITERAL_null:
1126        case NUM_INT:
1127        case NUM_FLOAT:
1128        case NUM_LONG:
1129        case NUM_DOUBLE:
1130        case NUM_BIG_INT:
1131        case NUM_BIG_DECIMAL:
1132        {
1133            unaryExpressionNotPlusMinus(lc_stmt);
1134            astFactory.addASTChild(currentAST, returnAST);
1135            unaryExpression_AST = (AST)currentAST.root;
1136            break;
1137        }
1138        default:
1139        {
1140            throw new NoViableAltException(LT(1), getFilename());
1141        }
1142        }
1143        returnAST = unaryExpression_AST;
1144    }
1145    
1146    public final void postfixExpression(
1147        int lc_stmt
1148    ) throws RecognitionException, TokenStreamException {
1149        
1150        returnAST = null;
1151        ASTPair currentAST = new ASTPair();
1152        AST postfixExpression_AST = null;
1153        Token in = null;
1154        AST in_AST = null;
1155        Token de = null;
1156        AST de_AST = null;
1157        
1158        pathExpression(lc_stmt);
1159        astFactory.addASTChild(currentAST, returnAST);
1160        {
1161        if ((LA(1)==INC) && (_tokenSet_112.member(LA(2))) && (_tokenSet_11.member(LA(3)))) {
1162            in = LT(1);
1163            in_AST = astFactory.create(in);
1164            astFactory.makeASTRoot(currentAST, in_AST);
1165            match(INC);
1166            if ( inputState.guessing==0 ) {
1167                in_AST.setType(POST_INC);
1168            }
1169        }
1170        else if ((LA(1)==DEC) && (_tokenSet_112.member(LA(2))) && (_tokenSet_11.member(LA(3)))) {
1171            de = LT(1);
1172            de_AST = astFactory.create(de);
1173            astFactory.makeASTRoot(currentAST, de_AST);
1174            match(DEC);
1175            if ( inputState.guessing==0 ) {
1176                de_AST.setType(POST_DEC);
1177            }
1178        }
1179        else if ((_tokenSet_112.member(LA(1))) && (_tokenSet_11.member(LA(2))) && (_tokenSet_11.member(LA(3)))) {
1180        }
1181        else {
1182            throw new NoViableAltException(LT(1), getFilename());
1183        }
1184        
1185        }
1186        postfixExpression_AST = (AST)currentAST.root;
1187        returnAST = postfixExpression_AST;
1188    }
1189    
1190/** Numeric, string, regexp, boolean, or null constant. */
1191    public final void constant() throws RecognitionException, TokenStreamException {
1192        
1193        returnAST = null;
1194        ASTPair currentAST = new ASTPair();
1195        AST constant_AST = null;
1196        
1197        switch ( LA(1)) {
1198        case NUM_INT:
1199        case NUM_FLOAT:
1200        case NUM_LONG:
1201        case NUM_DOUBLE:
1202        case NUM_BIG_INT:
1203        case NUM_BIG_DECIMAL:
1204        {
1205            constantNumber();
1206            astFactory.addASTChild(currentAST, returnAST);
1207            constant_AST = (AST)currentAST.root;
1208            break;
1209        }
1210        case STRING_LITERAL:
1211        {
1212            AST tmp304_AST = null;
1213            tmp304_AST = astFactory.create(LT(1));
1214            astFactory.addASTChild(currentAST, tmp304_AST);
1215            match(STRING_LITERAL);
1216            constant_AST = (AST)currentAST.root;
1217            break;
1218        }
1219        case LITERAL_true:
1220        {
1221            AST tmp305_AST = null;
1222            tmp305_AST = astFactory.create(LT(1));
1223            astFactory.addASTChild(currentAST, tmp305_AST);
1224            match(LITERAL_true);
1225            constant_AST = (AST)currentAST.root;
1226            break;
1227        }
1228        case LITERAL_false:
1229        {
1230            AST tmp306_AST = null;
1231            tmp306_AST = astFactory.create(LT(1));
1232            astFactory.addASTChild(currentAST, tmp306_AST);
1233            match(LITERAL_false);
1234            constant_AST = (AST)currentAST.root;
1235            break;
1236        }
1237        case LITERAL_null:
1238        {
1239            AST tmp307_AST = null;
1240            tmp307_AST = astFactory.create(LT(1));
1241            astFactory.addASTChild(currentAST, tmp307_AST);
1242            match(LITERAL_null);
1243            constant_AST = (AST)currentAST.root;
1244            break;
1245        }
1246        default:
1247        {
1248            throw new NoViableAltException(LT(1), getFilename());
1249        }
1250        }
1251        returnAST = constant_AST;
1252    }
1253    
1254/** object instantiation.
1255 * Trees are built as illustrated by the following input/tree pairs:
1256 *
1257 * new T()
1258 *
1259 * new
1260 * |
1261 * T -- ELIST
1262 * |
1263 * arg1 -- arg2 -- .. -- argn
1264 *
1265 * new int[]
1266 *
1267 * new
1268 * |
1269 * int -- ARRAY_DECLARATOR
1270 *
1271 * new int[] {1,2}
1272 *
1273 * new
1274 * |
1275 * int -- ARRAY_DECLARATOR -- ARRAY_INIT
1276 * |
1277 * EXPR -- EXPR
1278 * | |
1279 * 1 2
1280 *
1281 * new int[3]
1282 * new
1283 * |
1284 * int -- ARRAY_DECLARATOR
1285 * |
1286 * EXPR
1287 * |
1288 * 3
1289 *
1290 * new int[1][2]
1291 *
1292 * new
1293 * |
1294 * int -- ARRAY_DECLARATOR
1295 * |
1296 * ARRAY_DECLARATOR -- EXPR
1297 * | |
1298 * EXPR 1
1299 * |
1300 * 2
1301 *
1302 */

1303    public final void newExpression() throws RecognitionException, TokenStreamException {
1304        
1305        returnAST = null;
1306        ASTPair currentAST = new ASTPair();
1307        AST newExpression_AST = null;
1308        AST mca_AST = null;
1309        AST apb1_AST = null;
1310        AST apb_AST = null;
1311        
1312        AST tmp308_AST = null;
1313        tmp308_AST = astFactory.create(LT(1));
1314        astFactory.makeASTRoot(currentAST, tmp308_AST);
1315        match(LITERAL_new);
1316        {
1317        switch ( LA(1)) {
1318        case LT:
1319        {
1320            typeArguments();
1321            astFactory.addASTChild(currentAST, returnAST);
1322            break;
1323        }
1324        case IDENT:
1325        case LITERAL_void:
1326        case LITERAL_boolean:
1327        case LITERAL_byte:
1328        case LITERAL_char:
1329        case LITERAL_short:
1330        case LITERAL_int:
1331        case LITERAL_float:
1332        case LITERAL_long:
1333        case LITERAL_double:
1334        case LITERAL_any:
1335        {
1336            break;
1337        }
1338        default:
1339        {
1340            throw new NoViableAltException(LT(1), getFilename());
1341        }
1342        }
1343        }
1344        type();
1345        astFactory.addASTChild(currentAST, returnAST);
1346        {
1347        switch ( LA(1)) {
1348        case LPAREN:
1349        {
1350            methodCallArgs(null);
1351            mca_AST = (AST)returnAST;
1352            {
1353            if ((LA(1)==LCURLY) && (_tokenSet_16.member(LA(2))) && (_tokenSet_17.member(LA(3)))) {
1354                appendedBlock(mca_AST);
1355                apb1_AST = (AST)returnAST;
1356                if ( inputState.guessing==0 ) {
1357                    mca_AST = apb1_AST;
1358                }
1359            }
1360            else if ((_tokenSet_113.member(LA(1))) && (_tokenSet_11.member(LA(2))) && (_tokenSet_11.member(LA(3)))) {
1361            }
1362            else {
1363                throw new NoViableAltException(LT(1), getFilename());
1364            }
1365            
1366            }
1367            if ( inputState.guessing==0 ) {
1368                newExpression_AST = (AST)currentAST.root;
1369                newExpression_AST.addChild(mca_AST.getFirstChild());
1370            }
1371            break;
1372        }
1373        case LCURLY:
1374        {
1375            appendedBlock(null);
1376            apb_AST = (AST)returnAST;
1377            if ( inputState.guessing==0 ) {
1378                newExpression_AST = (AST)currentAST.root;
1379                newExpression_AST.addChild(apb_AST.getFirstChild());
1380            }
1381            break;
1382        }
1383        case LBRACK:
1384        {
1385            newArrayDeclarator();
1386            astFactory.addASTChild(currentAST, returnAST);
1387            break;
1388        }
1389        default:
1390        {
1391            throw new NoViableAltException(LT(1), getFilename());
1392        }
1393        }
1394        }
1395        newExpression_AST = (AST)currentAST.root;
1396        returnAST = newExpression_AST;
1397    }
1398    
1399    public final void closureConstructorExpression() throws RecognitionException, TokenStreamException {
1400        
1401        returnAST = null;
1402        ASTPair currentAST = new ASTPair();
1403        AST closureConstructorExpression_AST = null;
1404        
1405        closedBlock();
1406        astFactory.addASTChild(currentAST, returnAST);
1407        closureConstructorExpression_AST = (AST)currentAST.root;
1408        returnAST = closureConstructorExpression_AST;
1409    }
1410    
1411/**
1412 * A list constructor is a argument list enclosed in square brackets, without labels.
1413 * Any argument can be decorated with a spread operator (*x), but not a label (a:x).
1414 * Examples: [], [1], [1,2], [1,*l1,2], [*l1,*l2].
1415 * (The l1, l2 must be a sequence or null.)
1416 * <p>
1417 * A map constructor is an argument list enclosed in square brackets, with labels everywhere,
1418 * except on spread arguments, which stand for whole maps spliced in.
1419 * A colon alone between the brackets also forces the expression to be an empty map constructor.
1420 * Examples: [:], [a:1], [a:1,b:2], [a:1,*:m1,b:2], [*:m1,*:m2]
1421 * (The m1, m2 must be a map or null.)
1422 * Values associated with identical keys overwrite from left to right:
1423 * [a:1,a:2] === [a:2]
1424 * <p>
1425 * Some malformed constructor expressions are not detected in the parser, but in a post-pass.
1426 * Bad examples: [1,b:2], [a:1,2], [:1].
1427 * (Note that method call arguments, by contrast, can be a mix of keyworded and non-keyworded arguments.)
1428 */

1429    public final void listOrMapConstructorExpression() throws RecognitionException, TokenStreamException {
1430        
1431        returnAST = null;
1432        ASTPair currentAST = new ASTPair();
1433        AST listOrMapConstructorExpression_AST = null;
1434        Token lcon = null;
1435        AST lcon_AST = null;
1436        Token emcon = null;
1437        AST emcon_AST = null;
1438        boolean hasLabels = false;
1439        
1440        if ((LA(1)==LBRACK) && (_tokenSet_114.member(LA(2)))) {
1441            lcon = LT(1);
1442            lcon_AST = astFactory.create(lcon);
1443            astFactory.makeASTRoot(currentAST, lcon_AST);
1444            match(LBRACK);
1445            argList();
1446            astFactory.addASTChild(currentAST, returnAST);
1447            if ( inputState.guessing==0 ) {
1448                hasLabels |= argListHasLabels;
1449            }
1450            match(RBRACK);
1451            if ( inputState.guessing==0 ) {
1452                lcon_AST.setType(hasLabels ? MAP_CONSTRUCTOR : LIST_CONSTRUCTOR);
1453            }
1454            listOrMapConstructorExpression_AST = (AST)currentAST.root;
1455        }
1456        else if ((LA(1)==LBRACK) && (LA(2)==COLON)) {
1457            emcon = LT(1);
1458            emcon_AST = astFactory.create(emcon);
1459            astFactory.makeASTRoot(currentAST, emcon_AST);
1460            match(LBRACK);
1461            match(COLON);
1462            match(RBRACK);
1463            if ( inputState.guessing==0 ) {
1464                emcon_AST.setType(MAP_CONSTRUCTOR);
1465            }
1466            listOrMapConstructorExpression_AST = (AST)currentAST.root;
1467        }
1468        else {
1469            throw new NoViableAltException(LT(1), getFilename());
1470        }
1471        
1472        returnAST = listOrMapConstructorExpression_AST;
1473    }
1474    
1475    public final void scopeEscapeExpression() throws RecognitionException, TokenStreamException {
1476        
1477        returnAST = null;
1478        ASTPair currentAST = new ASTPair();
1479        AST scopeEscapeExpression_AST = null;
1480        
1481        AST tmp312_AST = null;
1482        tmp312_AST = astFactory.create(LT(1));
1483        astFactory.makeASTRoot(currentAST, tmp312_AST);
1484        match(DOLLAR);
1485        if ( inputState.guessing==0 ) {
1486            tmp312_AST.setType(SCOPE_ESCAPE);
1487        }
1488        {
1489        switch ( LA(1)) {
1490        case IDENT:
1491        {
1492            AST tmp313_AST = null;
1493            tmp313_AST = astFactory.create(LT(1));
1494            astFactory.addASTChild(currentAST, tmp313_AST);
1495            match(IDENT);
1496            break;
1497        }
1498        case DOLLAR:
1499        {
1500            scopeEscapeExpression();
1501            astFactory.addASTChild(currentAST, returnAST);
1502            break;
1503        }
1504        default:
1505        {
1506            throw new NoViableAltException(LT(1), getFilename());
1507        }
1508        }
1509        }
1510        scopeEscapeExpression_AST = (AST)currentAST.root;
1511        returnAST = scopeEscapeExpression_AST;
1512    }
1513    
1514    public final void stringConstructorValuePart() throws RecognitionException, TokenStreamException {
1515        
1516        returnAST = null;
1517        ASTPair currentAST = new ASTPair();
1518        AST stringConstructorValuePart_AST = null;
1519        Token sp = null;
1520        AST sp_AST = null;
1521        
1522        {
1523        switch ( LA(1)) {
1524        case STAR:
1525        {
1526            sp = LT(1);
1527            sp_AST = astFactory.create(sp);
1528            astFactory.makeASTRoot(currentAST, sp_AST);
1529            match(STAR);
1530            if ( inputState.guessing==0 ) {
1531                sp_AST.setType(SPREAD_ARG);
1532            }
1533            break;
1534        }
1535        case IDENT:
1536        case LCURLY:
1537        {
1538            break;
1539        }
1540        default:
1541        {
1542            throw new NoViableAltException(LT(1), getFilename());
1543        }
1544        }
1545        }
1546        {
1547        switch ( LA(1)) {
1548        case IDENT:
1549        {
1550            identifier();
1551            astFactory.addASTChild(currentAST, returnAST);
1552            break;
1553        }
1554        case LCURLY:
1555        {
1556            openOrClosedBlock();
1557            astFactory.addASTChild(currentAST, returnAST);
1558            break;
1559        }
1560        default:
1561        {
1562            throw new NoViableAltException(LT(1), getFilename());
1563        }
1564        }
1565        }
1566        stringConstructorValuePart_AST = (AST)currentAST.root;
1567        returnAST = stringConstructorValuePart_AST;
1568    }
1569    
1570    public final void newArrayDeclarator() throws RecognitionException, TokenStreamException {
1571        
1572        returnAST = null;
1573        ASTPair currentAST = new ASTPair();
1574        AST newArrayDeclarator_AST = null;
1575        Token lb = null;
1576        AST lb_AST = null;
1577        
1578        {
1579        int _cnt470=0;
1580        _loop470:
1581        do {
1582            if ((LA(1)==LBRACK) && (_tokenSet_115.member(LA(2))) && (_tokenSet_17.member(LA(3)))) {
1583                lb = LT(1);
1584                lb_AST = astFactory.create(lb);
1585                astFactory.makeASTRoot(currentAST, lb_AST);
1586                match(LBRACK);
1587                if ( inputState.guessing==0 ) {
1588                    lb_AST.setType(ARRAY_DECLARATOR);
1589                }
1590                {
1591                switch ( LA(1)) {
1592                case IDENT:
1593                case LBRACK:
1594                case LPAREN:
1595                case LITERAL_super:
1596                case LITERAL_void:
1597                case LITERAL_boolean:
1598                case LITERAL_byte:
1599                case LITERAL_char:
1600                case LITERAL_short:
1601                case LITERAL_int:
1602                case LITERAL_float:
1603                case LITERAL_long:
1604                case LITERAL_double:
1605                case LITERAL_any:
1606                case LCURLY:
1607                case LITERAL_this:
1608                case STRING_LITERAL:
1609                case PLUS:
1610                case MINUS:
1611                case INC:
1612                case DEC:
1613                case BNOT:
1614                case LNOT:
1615                case DOLLAR:
1616                case STRING_CTOR_START:
1617                case LITERAL_new:
1618                case LITERAL_true:
1619                case LITERAL_false:
1620                case LITERAL_null:
1621                case NUM_INT:
1622                case NUM_FLOAT:
1623                case NUM_LONG:
1624                case NUM_DOUBLE:
1625                case NUM_BIG_INT:
1626                case NUM_BIG_DECIMAL:
1627                {
1628                    expression(0);
1629                    astFactory.addASTChild(currentAST, returnAST);
1630                    break;
1631                }
1632                case RBRACK:
1633                {
1634                    break;
1635                }
1636                default:
1637                {
1638                    throw new NoViableAltException(LT(1), getFilename());
1639                }
1640                }
1641                }
1642                match(RBRACK);
1643            }
1644            else {
1645                if ( _cnt470>=1 ) { break _loop470; } else {throw new NoViableAltException(LT(1), getFilename());}
1646            }
1647            
1648            _cnt470++;
1649        } while (true);
1650        }
1651        newArrayDeclarator_AST = (AST)currentAST.root;
1652        returnAST = newArrayDeclarator_AST;
1653    }
1654    
1655/** A single argument in (...) or [...]. Corresponds to to a method or closure parameter.
1656 * May be labeled. May be modified by the spread operator '*' ('*:' for keywords).
1657 */

1658    public final boolean argument() throws RecognitionException, TokenStreamException {
1659        boolean hasLabel = false;
1660        
1661        returnAST = null;
1662        ASTPair currentAST = new ASTPair();
1663        AST argument_AST = null;
1664        Token c = null;
1665        AST c_AST = null;
1666        Token sp = null;
1667        AST sp_AST = null;
1668        
1669        {
1670        boolean synPredMatched456 = false;
1671        if (((_tokenSet_116.member(LA(1))) && (_tokenSet_117.member(LA(2))) && (_tokenSet_96.member(LA(3))))) {
1672            int _m456 = mark();
1673            synPredMatched456 = true;
1674            inputState.guessing++;
1675            try {
1676                {
1677                argumentLabelStart();
1678                }
1679            }
1680            catch (RecognitionException pe) {
1681                synPredMatched456 = false;
1682            }
1683            rewind(_m456);
1684            inputState.guessing--;
1685        }
1686        if ( synPredMatched456 ) {
1687            argumentLabel();
1688            astFactory.addASTChild(currentAST, returnAST);
1689            c = LT(1);
1690            c_AST = astFactory.create(c);
1691            astFactory.makeASTRoot(currentAST, c_AST);
1692            match(COLON);
1693            if ( inputState.guessing==0 ) {
1694                c_AST.setType(LABELED_ARG);
1695            }
1696            if ( inputState.guessing==0 ) {
1697                hasLabel = true;
1698            }
1699        }
1700        else if ((LA(1)==STAR)) {
1701            sp = LT(1);
1702            sp_AST = astFactory.create(sp);
1703            astFactory.makeASTRoot(currentAST, sp_AST);
1704            match(STAR);
1705            if ( inputState.guessing==0 ) {
1706                sp_AST.setType(SPREAD_ARG);
1707            }
1708            {
1709            switch ( LA(1)) {
1710            case COLON:
1711            {
1712                match(COLON);
1713                if ( inputState.guessing==0 ) {
1714                    sp_AST.setType(SPREAD_MAP_ARG);
1715                }
1716                if ( inputState.guessing==0 ) {
1717                    hasLabel = true;
1718                }
1719                break;
1720            }
1721            case FINAL:
1722            case ABSTRACT:
1723            case STRICTFP:
1724            case LITERAL_static:
1725            case LITERAL_def:
1726            case AT:
1727            case IDENT:
1728            case LBRACK:
1729            case LPAREN:
1730            case LITERAL_super:
1731            case LITERAL_void:
1732            case LITERAL_boolean:
1733            case LITERAL_byte:
1734            case LITERAL_char:
1735            case LITERAL_short:
1736            case LITERAL_int:
1737            case LITERAL_float:
1738            case LITERAL_long:
1739            case LITERAL_double:
1740            case LITERAL_any:
1741            case LITERAL_private:
1742            case LITERAL_public:
1743            case LITERAL_protected:
1744            case LITERAL_transient:
1745            case LITERAL_native:
1746            case LITERAL_threadsafe:
1747            case LITERAL_synchronized:
1748            case LITERAL_volatile:
1749            case LCURLY:
1750            case LITERAL_this:
1751            case STRING_LITERAL:
1752            case LITERAL_return:
1753            case LITERAL_break:
1754            case LITERAL_continue:
1755            case LITERAL_throw:
1756            case LITERAL_assert:
1757            case PLUS:
1758            case MINUS:
1759            case INC:
1760            case DEC:
1761            case BNOT:
1762            case LNOT:
1763            case DOLLAR:
1764            case STRING_CTOR_START:
1765            case LITERAL_new:
1766            case LITERAL_true:
1767            case LITERAL_false:
1768            case LITERAL_null:
1769            case NUM_INT:
1770            case NUM_FLOAT:
1771            case NUM_LONG:
1772            case NUM_DOUBLE:
1773            case NUM_BIG_INT:
1774            case NUM_BIG_DECIMAL:
1775            {
1776                break;
1777            }
1778            default:
1779            {
1780                throw new NoViableAltException(LT(1), getFilename());
1781            }
1782            }
1783            }
1784        }
1785        else if ((_tokenSet_118.member(LA(1))) && (_tokenSet_64.member(LA(2))) && (_tokenSet_20.member(LA(3)))) {
1786        }
1787        else {
1788            throw new NoViableAltException(LT(1), getFilename());
1789        }
1790        
1791        }
1792        strictContextExpression();
1793        astFactory.addASTChild(currentAST, returnAST);
1794        argument_AST = (AST)currentAST.root;
1795        returnAST = argument_AST;
1796        return hasLabel;
1797    }
1798    
1799/** For lookahead only. Fast approximate parse of an argumentLabel followed by a colon. */
1800    public final void argumentLabelStart() throws RecognitionException, TokenStreamException {
1801        
1802        returnAST = null;
1803        ASTPair currentAST = new ASTPair();
1804        AST argumentLabelStart_AST = null;
1805        
1806        {
1807        switch ( LA(1)) {
1808        case IDENT:
1809        {
1810            AST tmp316_AST = null;
1811            tmp316_AST = astFactory.create(LT(1));
1812            match(IDENT);
1813            break;
1814        }
1815        case UNUSED_DO:
1816        case LITERAL_def:
1817        case LITERAL_class:
1818        case LITERAL_void:
1819        case LITERAL_boolean:
1820        case LITERAL_byte:
1821        case LITERAL_char:
1822        case LITERAL_short:
1823        case LITERAL_int:
1824        case LITERAL_float:
1825        case LITERAL_long:
1826        case LITERAL_double:
1827        case LITERAL_any:
1828        case LITERAL_as:
1829        case LITERAL_if:
1830        case LITERAL_else:
1831        case LITERAL_while:
1832        case LITERAL_switch:
1833        case LITERAL_for:
1834        case LITERAL_in:
1835        case LITERAL_try:
1836        case LITERAL_finally:
1837        case LITERAL_catch:
1838        {
1839            keywordPropertyNames();
1840            break;
1841        }
1842        case NUM_INT:
1843        case NUM_FLOAT:
1844        case NUM_LONG:
1845        case NUM_DOUBLE:
1846        case NUM_BIG_INT:
1847        case NUM_BIG_DECIMAL:
1848        {
1849            constantNumber();
1850            break;
1851        }
1852        case STRING_LITERAL:
1853        {
1854            AST tmp317_AST = null;
1855            tmp317_AST = astFactory.create(LT(1));
1856            match(STRING_LITERAL);
1857            break;
1858        }
1859        case LBRACK:
1860        case LPAREN:
1861        case LCURLY:
1862        case STRING_CTOR_START:
1863        {
1864            balancedBrackets();
1865            break;
1866        }
1867        default:
1868        {
1869            throw new NoViableAltException(LT(1), getFilename());
1870        }
1871        }
1872        }
1873        AST tmp318_AST = null;
1874        tmp318_AST = astFactory.create(LT(1));
1875        match(COLON);
1876        returnAST = argumentLabelStart_AST;
1877    }
1878    
1879/** A label for an argument is of the form a:b, 'a':b, "a":b, (a):b, etc..
1880 * The labels in (a:b), ('a':b), and ("a":b) are in all ways equivalent,
1881 * except that the quotes allow more spellings.
1882 * Equivalent dynamically computed labels are (('a'):b) and ("${'a'}":b)
1883 * but not ((a):b) or "$a":b, since the latter cases evaluate (a) as a normal identifier.
1884 * Bottom line: If you want a truly variable label, use parens and say ((a):b).
1885 */

1886    public final void argumentLabel() throws RecognitionException, TokenStreamException {
1887        
1888        returnAST = null;
1889        ASTPair currentAST = new ASTPair();
1890        AST argumentLabel_AST = null;
1891        Token id = null;
1892        AST id_AST = null;
1893        AST kw_AST = null;
1894        
1895        boolean synPredMatched460 = false;
1896        if (((LA(1)==IDENT) && (LA(2)==COLON) && (_tokenSet_118.member(LA(3))))) {
1897            int _m460 = mark();
1898            synPredMatched460 = true;
1899            inputState.guessing++;
1900            try {
1901                {
1902                match(IDENT);
1903                }
1904            }
1905            catch (RecognitionException pe) {
1906                synPredMatched460 = false;
1907            }
1908            rewind(_m460);
1909            inputState.guessing--;
1910        }
1911        if ( synPredMatched460 ) {
1912            id = LT(1);
1913            id_AST = astFactory.create(id);
1914            astFactory.addASTChild(currentAST, id_AST);
1915            match(IDENT);
1916            if ( inputState.guessing==0 ) {
1917                id_AST.setType(STRING_LITERAL);
1918            }
1919            argumentLabel_AST = (AST)currentAST.root;
1920        }
1921        else {
1922            boolean synPredMatched462 = false;
1923            if (((_tokenSet_119.member(LA(1))) && (LA(2)==COLON) && (_tokenSet_118.member(LA(3))))) {
1924                int _m462 = mark();
1925                synPredMatched462 = true;
1926                inputState.guessing++;
1927                try {
1928                    {
1929                    keywordPropertyNames();
1930                    }
1931                }
1932                catch (RecognitionException pe) {
1933                    synPredMatched462 = false;
1934                }
1935                rewind(_m462);
1936                inputState.guessing--;
1937            }
1938            if ( synPredMatched462 ) {
1939                keywordPropertyNames();
1940                kw_AST = (AST)returnAST;
1941                astFactory.addASTChild(currentAST, returnAST);
1942                if ( inputState.guessing==0 ) {
1943                    kw_AST.setType(STRING_LITERAL);
1944                }
1945                argumentLabel_AST = (AST)currentAST.root;
1946            }
1947            else if ((_tokenSet_111.member(LA(1))) && (_tokenSet_117.member(LA(2))) && (_tokenSet_96.member(LA(3)))) {
1948                primaryExpression();
1949                astFactory.addASTChild(currentAST, returnAST);
1950                argumentLabel_AST = (AST)currentAST.root;
1951            }
1952            else {
1953                throw new NoViableAltException(LT(1), getFilename());
1954            }
1955            }
1956            returnAST = argumentLabel_AST;
1957        }
1958        
1959/** Numeric constant. */
1960    public final void constantNumber() throws RecognitionException, TokenStreamException {
1961        
1962        returnAST = null;
1963        ASTPair currentAST = new ASTPair();
1964        AST constantNumber_AST = null;
1965        
1966        switch ( LA(1)) {
1967        case NUM_INT:
1968        {
1969            AST tmp319_AST = null;
1970            tmp319_AST = astFactory.create(LT(1));
1971            astFactory.addASTChild(currentAST, tmp319_AST);
1972            match(NUM_INT);
1973            constantNumber_AST = (AST)currentAST.root;
1974            break;
1975        }
1976        case NUM_FLOAT:
1977        {
1978            AST tmp320_AST = null;
1979            tmp320_AST = astFactory.create(LT(1));
1980            astFactory.addASTChild(currentAST, tmp320_AST);
1981            match(NUM_FLOAT);
1982            constantNumber_AST = (AST)currentAST.root;
1983            break;
1984        }
1985        case NUM_LONG:
1986        {
1987            AST tmp321_AST = null;
1988            tmp321_AST = astFactory.create(LT(1));
1989            astFactory.addASTChild(currentAST, tmp321_AST);
1990            match(NUM_LONG);
1991            constantNumber_AST = (AST)currentAST.root;
1992            break;
1993        }
1994        case NUM_DOUBLE:
1995        {
1996            AST tmp322_AST = null;
1997            tmp322_AST = astFactory.create(LT(1));
1998            astFactory.addASTChild(currentAST, tmp322_AST);
1999            match(NUM_DOUBLE);
2000            constantNumber_AST = (AST)currentAST.root;
2001            break;
2002        }
2003        case NUM_BIG_INT:
2004        {
2005            AST tmp323_AST = null;
2006            tmp323_AST = astFactory.create(LT(1));
2007            astFactory.addASTChild(currentAST, tmp323_AST);
2008            match(NUM_BIG_INT);
2009            constantNumber_AST = (AST)currentAST.root;
2010            break;
2011        }
2012        case NUM_BIG_DECIMAL:
2013        {
2014            AST tmp324_AST = null;
2015            tmp324_AST = astFactory.create(LT(1));
2016            astFactory.addASTChild(currentAST, tmp324_AST);
2017            match(NUM_BIG_DECIMAL);
2018            constantNumber_AST = (AST)currentAST.root;
2019            break;
2020        }
2021        default:
2022        {
2023            throw new NoViableAltException(LT(1), getFilename());
2024        }
2025        }
2026        returnAST = constantNumber_AST;
2027    }
2028    
2029/** Fast lookahead across balanced brackets of all sorts. */
2030    public final void balancedBrackets() throws RecognitionException, TokenStreamException {
2031        
2032        returnAST = null;
2033        ASTPair currentAST = new ASTPair();
2034        AST balancedBrackets_AST = null;
2035        
2036        switch ( LA(1)) {
2037        case LPAREN:
2038        {
2039            AST tmp325_AST = null;
2040            tmp325_AST = astFactory.create(LT(1));
2041            match(LPAREN);
2042            balancedTokens();
2043            AST tmp326_AST = null;
2044            tmp326_AST = astFactory.create(LT(1));
2045            match(RPAREN);
2046            break;
2047        }
2048        case LBRACK:
2049        {
2050            AST tmp327_AST = null;
2051            tmp327_AST = astFactory.create(LT(1));
2052            match(LBRACK);
2053            balancedTokens();
2054            AST tmp328_AST = null;
2055            tmp328_AST = astFactory.create(LT(1));
2056            match(RBRACK);
2057            break;
2058        }
2059        case LCURLY:
2060        {
2061            AST tmp329_AST = null;
2062            tmp329_AST = astFactory.create(LT(1));
2063            match(LCURLY);
2064            balancedTokens();
2065            AST tmp330_AST = null;
2066            tmp330_AST = astFactory.create(LT(1));
2067            match(RCURLY);
2068            break;
2069        }
2070        case STRING_CTOR_START:
2071        {
2072            AST tmp331_AST = null;
2073            tmp331_AST = astFactory.create(LT(1));
2074            match(STRING_CTOR_START);
2075            balancedTokens();
2076            AST tmp332_AST = null;
2077            tmp332_AST = astFactory.create(LT(1));
2078            match(STRING_CTOR_END);
2079            break;
2080        }
2081        default:
2082        {
2083            throw new NoViableAltException(LT(1), getFilename());
2084        }
2085        }
2086        returnAST = balancedBrackets_AST;
2087    }
2088    
2089    
2090    public static final String JavaDoc[] _tokenNames = {
2091        "<0>",
2092        "EOF",
2093        "<2>",
2094        "NULL_TREE_LOOKAHEAD",
2095        "BLOCK",
2096        "MODIFIERS",
2097        "OBJBLOCK",
2098        "SLIST",
2099        "METHOD_DEF",
2100        "VARIABLE_DEF",
2101        "INSTANCE_INIT",
2102        "STATIC_INIT",
2103        "TYPE",
2104        "CLASS_DEF",
2105        "INTERFACE_DEF",
2106        "PACKAGE_DEF",
2107        "ARRAY_DECLARATOR",
2108        "EXTENDS_CLAUSE",
2109        "IMPLEMENTS_CLAUSE",
2110        "PARAMETERS",
2111        "PARAMETER_DEF",
2112        "LABELED_STAT",
2113        "TYPECAST",
2114        "INDEX_OP",
2115        "POST_INC",
2116        "POST_DEC",
2117        "METHOD_CALL",
2118        "EXPR",
2119        "IMPORT",
2120        "UNARY_MINUS",
2121        "UNARY_PLUS",
2122        "CASE_GROUP",
2123        "ELIST",
2124        "FOR_INIT",
2125        "FOR_CONDITION",
2126        "FOR_ITERATOR",
2127        "EMPTY_STAT",
2128        "\"final\"",
2129        "\"abstract\"",
2130        "\"goto\"",
2131        "\"const\"",
2132        "\"do\"",
2133        "\"strictfp\"",
2134        "SUPER_CTOR_CALL",
2135        "CTOR_CALL",
2136        "CTOR_IDENT",
2137        "VARIABLE_PARAMETER_DEF",
2138        "STRING_CONSTRUCTOR",
2139        "STRING_CTOR_MIDDLE",
2140        "CLOSED_BLOCK",
2141        "IMPLICIT_PARAMETERS",
2142        "SELECT_SLOT",
2143        "DYNAMIC_MEMBER",
2144        "LABELED_ARG",
2145        "SPREAD_ARG",
2146        "SPREAD_MAP_ARG",
2147        "SCOPE_ESCAPE",
2148        "LIST_CONSTRUCTOR",
2149        "MAP_CONSTRUCTOR",
2150        "FOR_IN_ITERABLE",
2151        "STATIC_IMPORT",
2152        "ENUM_DEF",
2153        "ENUM_CONSTANT_DEF",
2154        "FOR_EACH_CLAUSE",
2155        "ANNOTATION_DEF",
2156        "ANNOTATIONS",
2157        "ANNOTATION",
2158        "ANNOTATION_MEMBER_VALUE_PAIR",
2159        "ANNOTATION_FIELD_DEF",
2160        "ANNOTATION_ARRAY_INIT",
2161        "TYPE_ARGUMENTS",
2162        "TYPE_ARGUMENT",
2163        "TYPE_PARAMETERS",
2164        "TYPE_PARAMETER",
2165        "WILDCARD_TYPE",
2166        "TYPE_UPPER_BOUNDS",
2167        "TYPE_LOWER_BOUNDS",
2168        "a script header",
2169        "\"package\"",
2170        "\"import\"",
2171        "\"static\"",
2172        "\"def\"",
2173        "'@'",
2174        "an identifier",
2175        "'['",
2176        "']'",
2177        "'.'",
2178        "'('",
2179        "\"class\"",
2180        "\"interface\"",
2181        "\"enum\"",
2182        "'?'",
2183        "\"extends\"",
2184        "\"super\"",
2185        "'<'",
2186        "','",
2187        "'>'",
2188        "'>>'",
2189        "'>>>'",
2190        "\"void\"",
2191        "\"boolean\"",
2192        "\"byte\"",
2193        "\"char\"",
2194        "\"short\"",
2195        "\"int\"",
2196        "\"float\"",
2197        "\"long\"",
2198        "\"double\"",
2199        "\"any\"",
2200        "'*'",
2201        "\"as\"",
2202        "\"private\"",
2203        "\"public\"",
2204        "\"protected\"",
2205        "\"transient\"",
2206        "\"native\"",
2207        "\"threadsafe\"",
2208        "\"synchronized\"",
2209        "\"volatile\"",
2210        "')'",
2211        "'='",
2212        "'&'",
2213        "'{'",
2214        "'}'",
2215        "';'",
2216        "some newlines, whitespace or comments",
2217        "\"default\"",
2218        "\"implements\"",
2219        "\"this\"",
2220        "a string literal",
2221        "\"throws\"",
2222        "'...'",
2223        "'->'",
2224        "'||'",
2225        "'|'",
2226        "':'",
2227        "\"if\"",
2228        "\"else\"",
2229        "\"while\"",
2230        "\"with\"",
2231        "\"switch\"",
2232        "\"for\"",
2233        "\"in\"",
2234        "\"return\"",
2235        "\"break\"",
2236        "\"continue\"",
2237        "\"throw\"",
2238        "\"assert\"",
2239        "'+'",
2240        "'-'",
2241        "\"case\"",
2242        "\"try\"",
2243        "\"finally\"",
2244        "\"catch\"",
2245        "'*.'",
2246        "'?.'",
2247        "'.&'",
2248        "'+='",
2249        "'-='",
2250        "'*='",
2251        "'/='",
2252        "'%='",
2253        "'>>='",
2254        "'>>>='",
2255        "'<<='",
2256        "'&='",
2257        "'^='",
2258        "'|='",
2259        "'**='",
2260        "'&&'",
2261        "'^'",
2262        "'=~'",
2263        "'==~'",
2264        "'!='",
2265        "'=='",
2266        "'<=>'",
2267        "'<='",
2268        "'>='",
2269        "\"instanceof\"",
2270        "'<<'",
2271        "'..'",
2272        "'..<'",
2273        "'++'",
2274        "'/'",
2275        "'%'",
2276        "'--'",
2277        "'**'",
2278        "'~'",
2279        "'!'",
2280        "'$'",
2281        "STRING_CTOR_START",
2282        "a string literal end",
2283        "\"new\"",
2284        "\"true\"",
2285        "\"false\"",
2286        "\"null\"",
2287        "a numeric literal",
2288        "NUM_FLOAT",
2289        "NUM_LONG",
2290        "NUM_DOUBLE",
2291        "NUM_BIG_INT",
2292        "NUM_BIG_DECIMAL",
2293        "whitespace",
2294        "a newline",
2295        "a single line comment",
2296        "a comment",
2297        "a string character",
2298        "a regular expression literal",
2299        "a regular expression literal end",
2300        "a regular expression character",
2301        "an escape sequence",
2302        "a newline inside a string",
2303        "a hexadecimal digit",
2304        "a character",
2305        "a letter",
2306        "a digit",
2307        "an exponent",
2308        "a float or double suffix",
2309        "a big decimal suffix"
2310    };
2311    
2312    protected void buildTokenTypeASTClassMap() {
2313        tokenTypeToASTClassMap=null;
2314    };
2315    
2316    private static final long[] mk_tokenSet_0() {
2317        long[] data = { 2L, 3458764513833402368L, 0L, 0L};
2318        return data;
2319    }
2320    public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
2321    private static final long[] mk_tokenSet_1() {
2322        long[] data = new long[8];
2323        data[0]=4810363371522L;
2324        data[1]=3782953284552065024L;
2325        data[2]=8809040871149255939L;
2326        data[3]=1023L;
2327        return data;
2328    }
2329    public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
2330    private static final long[] mk_tokenSet_2() {
2331        long[] data = new long[8];
2332        data[0]=7009386627074L;
2333        data[1]=4575657221139955712L;
2334        data[2]=9223372036850581499L;
2335        data[3]=1023L;
2336        return data;
2337    }
2338    public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
2339    private static final long[] mk_tokenSet_3() {
2340        long[] data = new long[8];
2341        data[0]=288484363337730L;
2342        data[1]=-4611686018427420672L;
2343        data[2]=-4194309L;
2344        data[3]=1023L;
2345        return data;
2346    }
2347    public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
2348    private static final long[] mk_tokenSet_4() {
2349        long[] data = new long[8];
2350        data[0]=7009386627074L;
2351        data[1]=-16384L;
2352        data[2]=8809322345643638779L;
2353        data[3]=1023L;
2354        return data;
2355    }
2356    public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
2357    private static final long[] mk_tokenSet_5() {
2358        long[] data = new long[8];
2359        data[0]=288484363337730L;
2360        data[1]=-16384L;
2361        data[2]=-1L;
2362        data[3]=1023L;
2363        return data;
2364    }
2365    public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
2366    private static final long[] mk_tokenSet_6() {
2367        long[] data = { 0L, 3458764513820540928L, 512L, 0L, 0L, 0L};
2368        return data;
2369    }
2370    public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
2371    private static final long[] mk_tokenSet_7() {
2372        long[] data = new long[8];
2373        data[0]=4810363371520L;
2374        data[1]=3782953284552065024L;
2375        data[2]=8809040871149256451L;
2376        data[3]=1023L;
2377        return data;
2378    }
2379    public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
2380    private static final long[] mk_tokenSet_8() {
2381        long[] data = new long[8];
2382        data[0]=7009386627074L;
2383        data[1]=9187343239567343616L;
2384        data[2]=9223372036854775803L;
2385        data[3]=1023L;
2386        return data;
2387    }
2388    public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
2389    private static final long[] mk_tokenSet_9() {
2390        long[] data = { 2L, 8646911284551352320L, 4194816L, 0L, 0L, 0L};
2391        return data;
2392    }
2393    public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
2394    private static final long[] mk_tokenSet_10() {
2395        long[] data = new long[8];
2396        data[0]=286285340082178L;
2397        data[1]=9223372036586307584L;
2398        data[2]=-5L;
2399        data[3]=1023L;
2400        return data;
2401    }
2402    public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());
2403    private static final long[] mk_tokenSet_11() {
2404        long[] data = new long[8];
2405        data[0]=288484363337730L;
2406        data[1]=9223372036586323968L;
2407        data[2]=-1L;
2408        data[3]=1023L;
2409        return data;
2410    }
2411    public static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11());
2412    private static final long[] mk_tokenSet_12() {
2413        long[] data = { 4810363371520L, 35923209543942144L, 0L, 0L};
2414        return data;
2415    }
2416    public static final BitSet _tokenSet_12 = new BitSet(mk_tokenSet_12());
2417    private static final long[] mk_tokenSet_13() {
2418        long[] data = { 4810363371520L, 2341766219836620800L, 2L, 0L, 0L, 0L};
2419        return data;
2420    }
2421    public static final BitSet _tokenSet_13 = new BitSet(mk_tokenSet_13());
2422    private static final long[] mk_tokenSet_14() {
2423        long[] data = { 4810363371522L, 8754892091504394240L, 4194818L, 0L, 0L, 0L};
2424        return data;
2425    }
2426    public static final BitSet _tokenSet_14 = new BitSet(mk_tokenSet_14());
2427    private static final long[] mk_tokenSet_15() {
2428        long[] data = new long[8];
2429        data[0]=4810363371520L;
2430        data[1]=324188770731524096L;
2431        data[2]=8809040871149255939L;
2432        data[3]=1023L;
2433        return data;
2434    }
2435    public static final BitSet _tokenSet_15 = new BitSet(mk_tokenSet_15());
2436    private static final long[] mk_tokenSet_16() {
2437        long[] data = new long[8];
2438        data[0]=4810363371520L;
2439        data[1]=4359414036855488512L;
2440        data[2]=8809040871149256059L;
2441        data[3]=1023L;
2442        return data;
2443    }
2444    public static final BitSet _tokenSet_16 = new BitSet(mk_tokenSet_16());
2445    private static final long[] mk_tokenSet_17() {
2446        long[] data = new long[8];
2447        data[0]=7009386627074L;
2448        data[1]=9223372036586307584L;
2449        data[2]=9223372036854775803L;
2450        data[3]=1023L;
2451        return data;
2452    }
2453    public static final BitSet _tokenSet_17 = new BitSet(mk_tokenSet_17());
2454    private static final long[] mk_tokenSet_18() {
2455        long[] data = new long[8];
2456        data[0]=288484363337730L;
2457        data[1]=-32768L;
2458        data[2]=-5L;
2459        data[3]=1023L;
2460        return data;
2461    }
2462    public static final BitSet _tokenSet_18 = new BitSet(mk_tokenSet_18());
2463    private static final long[] mk_tokenSet_19() {
2464        long[] data = new long[8];
2465        data[1]=288265526710894592L;
2466        data[2]=8809040871139835907L;
2467        data[3]=1023L;
2468        return data;
2469    }
2470    public static final BitSet _tokenSet_19 = new BitSet(mk_tokenSet_19());
2471    private static final long[] mk_tokenSet_20() {
2472        long[] data = new long[8];
2473        data[0]=288484363337730L;
2474        data[1]=9223372036586307584L;
2475        data[2]=-5L;
2476        data[3]=1023L;
2477        return data;
2478    }
2479    public static final BitSet _tokenSet_20 = new BitSet(mk_tokenSet_20());
2480    private static final long[] mk_tokenSet_21() {
2481        long[] data = { 4810363371520L, 35888059648507904L, 0L, 0L};
2482        return data;
2483    }
2484    public static final BitSet _tokenSet_21 = new BitSet(mk_tokenSet_21());
2485    private static final long[] mk_tokenSet_22() {
2486        long[] data = { 4810363371520L, 2341731068862726144L, 0L, 0L};
2487        return data;
2488    }
2489    public static final BitSet _tokenSet_22 = new BitSet(mk_tokenSet_22());
2490    private static final long[] mk_tokenSet_23() {
2491        long[] data = { 4810363371520L, -6593410590485577728L, 0L, 0L};
2492        return data;
2493    }
2494    public static final BitSet _tokenSet_23 = new BitSet(mk_tokenSet_23());
2495    private static final long[] mk_tokenSet_24() {
2496        long[] data = new long[8];
2497        data[0]=4810363371522L;
2498        data[1]=8971100056356618240L;
2499        data[2]=8809040871153450755L;
2500        data[3]=1023L;
2501        return data;
2502    }
2503    public static final BitSet _tokenSet_24 = new BitSet(mk_tokenSet_24());
2504    private static final long[] mk_tokenSet_25() {
2505        long[] data = { 2L, 8646981653300248576L, 4194816L, 0L, 0L, 0L};
2506        return data;
2507    }
2508    public static final BitSet _tokenSet_25 = new BitSet(mk_tokenSet_25());
2509    private static final long[] mk_tokenSet_26() {
2510        long[] data = { 0L, 35150012874752L, 0L, 0L};
2511        return data;
2512    }
2513    public static final BitSet _tokenSet_26 = new BitSet(mk_tokenSet_26());
2514    private static final long[] mk_tokenSet_27() {
2515        long[] data = { 0L, 1079508992L, 2L, 0L, 0L, 0L};
2516        return data;
2517    }
2518    public static final BitSet _tokenSet_27 = new BitSet(mk_tokenSet_27());
2519    private static final long[] mk_tokenSet_28() {
2520        long[] data = { 2L, 8718968880745152512L, 4194816L, 0L, 0L, 0L};
2521        return data;
2522    }
2523    public static final BitSet _tokenSet_28 = new BitSet(mk_tokenSet_28());
2524    private static final long[] mk_tokenSet_29() {
2525        long[] data = { 2L, 8718968880736763904L, 4194816L, 0L, 0L, 0L};
2526        return data;
2527    }
2528    public static final BitSet _tokenSet_29 = new BitSet(mk_tokenSet_29());
2529    private static final long[] mk_tokenSet_30() {
2530        long[] data = { 0L, 1079508992L, 0L, 0L};
2531        return data;
2532    }
2533    public static final BitSet _tokenSet_30 = new BitSet(mk_tokenSet_30());
2534    private static final long[] mk_tokenSet_31() {
2535        long[] data = { 0L, 1261007897813319680L, 16512L, 0L, 0L, 0L};
2536        return data;
2537    }
2538    public static final BitSet _tokenSet_31 = new BitSet(mk_tokenSet_31());
2539    private static final long[] mk_tokenSet_32() {
2540        long[] data = { 0L, 288230376161148928L, 4611686018427387904L, 0L, 0L, 0L};
2541        return data;
2542    }
2543    public static final BitSet _tokenSet_32 = new BitSet(mk_tokenSet_32());
2544    private static final long[] mk_tokenSet_33() {
2545        long[] data = new long[12];
2546        data[0]=-16L;
2547        data[1]=-900719925485633537L;
2548        data[2]=4611686018427387903L;
2549        data[3]=134217727L;
2550        return data;
2551    }
2552    public static final BitSet _tokenSet_33 = new BitSet(mk_tokenSet_33());
2553    private static final long[] mk_tokenSet_34() {
2554        long[] data = { 4810363371520L, 35888059531067392L, 0L, 0L};
2555        return data;
2556    }
2557    public static final BitSet _tokenSet_34 = new BitSet(mk_tokenSet_34());
2558    private static final long[] mk_tokenSet_35() {
2559        long[] data = { 4810363371520L, 2341766219948818432L, 0L, 0L};
2560        return data;
2561    }
2562    public static final BitSet _tokenSet_35 = new BitSet(mk_tokenSet_35());
2563    private static final long[] mk_tokenSet_36() {
2564        long[] data = { 4810363371522L, 2341766219962449920L, 2L, 0L, 0L, 0L};
2565        return data;
2566    }
2567    public static final BitSet _tokenSet_36 = new BitSet(mk_tokenSet_36());
2568    private static final long[] mk_tokenSet_37() {
2569        long[] data = { 0L, 35151204319232L, 0L, 0L};
2570        return data;
2571    }
2572    public static final BitSet _tokenSet_37 = new BitSet(mk_tokenSet_37());
2573    private static final long[] mk_tokenSet_38() {
2574        long[] data = { 2L, 2305843010335145984L, 2L, 0L, 0L, 0L};
2575        return data;
2576    }
2577    public static final BitSet _tokenSet_38 = new BitSet(mk_tokenSet_38());
2578    private static final long[] mk_tokenSet_39() {
2579        long[] data = { 137438953474L, -4791794819809804288L, 8L, 0L, 0L, 0L};
2580        return data;
2581    }
2582    public static final BitSet _tokenSet_39 = new BitSet(mk_tokenSet_39());
2583    private static final long[] mk_tokenSet_40() {
2584        long[] data = new long[8];
2585        data[0]=2199023255554L;
2586        data[1]=-35923244003491840L;
2587        data[2]=8809322345642620923L;
2588        data[3]=1023L;
2589        return data;
2590    }
2591    public static final BitSet _tokenSet_40 = new BitSet(mk_tokenSet_40());
2592    private static final long[] mk_tokenSet_41() {
2593        long[] data = new long[8];
2594        data[0]=2199023255554L;
2595        data[1]=-35923245077233664L;
2596        data[2]=8809322345642620923L;
2597        data[3]=1023L;
2598        return data;
2599    }
2600    public static final BitSet _tokenSet_41 = new BitSet(mk_tokenSet_41());
2601    private static final long[] mk_tokenSet_42() {
2602        long[] data = { 0L, 2305878159360786432L, 0L, 0L};
2603        return data;
2604    }
2605    public static final BitSet _tokenSet_42 = new BitSet(mk_tokenSet_42());
2606    private static final long[] mk_tokenSet_43() {
2607        long[] data = { 4810363371520L, 35888059530674176L, 0L, 0L};
2608        return data;
2609    }
2610    public static final BitSet _tokenSet_43 = new BitSet(mk_tokenSet_43());
2611    private static final long[] mk_tokenSet_44() {
2612        long[] data = { 4810363371520L, 2341766219961401344L, 2L, 0L, 0L, 0L};
2613        return data;
2614    }
2615    public static final BitSet _tokenSet_44 = new BitSet(mk_tokenSet_44());
2616    private static final long[] mk_tokenSet_45() {
2617        long[] data = new long[8];
2618        data[1]=288265526711156736L;
2619        data[2]=8809040871139835907L;
2620        data[3]=1023L;
2621        return data;
2622    }
2623    public static final BitSet _tokenSet_45 = new BitSet(mk_tokenSet_45());
2624    private static final long[] mk_tokenSet_46() {
2625        long[] data = new long[8];
2626        data[0]=7009386627072L;
2627        data[1]=4539628424120991744L;
2628        data[2]=9223369838364196859L;
2629        data[3]=1023L;
2630        return data;
2631    }
2632    public static final BitSet _tokenSet_46 = new BitSet(mk_tokenSet_46());
2633    private static final long[] mk_tokenSet_47() {
2634        long[] data = { 0L, 4323455644432072704L, 0L, 0L};
2635        return data;
2636    }
2637    public static final BitSet _tokenSet_47 = new BitSet(mk_tokenSet_47());
2638    private static final long[] mk_tokenSet_48() {
2639        long[] data = new long[8];
2640        data[0]=7009386627074L;
2641        data[1]=9007199224271405056L;
2642        data[2]=8809040871203796739L;
2643        data[3]=1023L;
2644        return data;
2645    }
2646    public static final BitSet _tokenSet_48 = new BitSet(mk_tokenSet_48());
2647    private static final long[] mk_tokenSet_49() {
2648        long[] data = { 4810363371520L, 4359378851937058816L, 0L, 0L};
2649        return data;
2650    }
2651    public static final BitSet _tokenSet_49 = new BitSet(mk_tokenSet_49());
2652    private static final long[] mk_tokenSet_50() {
2653        long[] data = new long[8];
2654        data[0]=4810363371522L;
2655        data[1]=8971100056360812544L;
2656        data[2]=8809040871153450755L;
2657        data[3]=1023L;
2658        return data;
2659    }
2660    public static final BitSet _tokenSet_50 = new BitSet(mk_tokenSet_50());
2661    private static final long[] mk_tokenSet_51() {
2662        long[] data = { 0L, -6485148279842013184L, 0L, 0L};
2663        return data;
2664    }
2665    public static final BitSet _tokenSet_51 = new BitSet(mk_tokenSet_51());
2666    private static final long[] mk_tokenSet_52() {
2667        long[] data = { 0L, -6629263468995805184L, 0L, 0L};
2668        return data;
2669    }
2670    public static final BitSet _tokenSet_52 = new BitSet(mk_tokenSet_52());
2671    private static final long[] mk_tokenSet_53() {
2672        long[] data = { 4810363371520L, -4863993153505525760L, 2L, 0L, 0L, 0L};
2673        return data;
2674    }
2675    public static final BitSet _tokenSet_53 = new BitSet(mk_tokenSet_53());
2676    private static final long[] mk_tokenSet_54() {
2677        long[] data = new long[8];
2678        data[0]=4810363371522L;
2679        data[1]=-180214353839030272L;
2680        data[2]=8809040871153450755L;
2681        data[3]=1023L;
2682        return data;
2683    }
2684    public static final BitSet _tokenSet_54 = new BitSet(mk_tokenSet_54());
2685    private static final long[] mk_tokenSet_55() {
2686        long[] data = { 4810363371520L, 35888059531591680L, 0L, 0L};
2687        return data;
2688    }
2689    public static final BitSet _tokenSet_55 = new BitSet(mk_tokenSet_55());
2690    private static final long[] mk_tokenSet_56() {
2691        long[] data = { 4810363371520L, 2341731068753674240L, 0L, 0L};
2692        return data;
2693    }
2694    public static final BitSet _tokenSet_56 = new BitSet(mk_tokenSet_56());
2695    private static final long[] mk_tokenSet_57() {
2696        long[] data = { 4810363371520L, 2377795015789182976L, 8L, 0L, 0L, 0L};
2697        return data;
2698    }
2699    public static final BitSet _tokenSet_57 = new BitSet(mk_tokenSet_57());
2700    private static final long[] mk_tokenSet_58() {
2701        long[] data = { 4810363371520L, 4143206073077006336L, 2L, 0L, 0L, 0L};
2702        return data;
2703    }
2704    public static final BitSet _tokenSet_58 = new BitSet(mk_tokenSet_58());
2705    private static final long[] mk_tokenSet_59() {
2706        long[] data = { 0L, 4107282862317764608L, 0L, 0L};
2707        return data;
2708    }
2709    public static final BitSet _tokenSet_59 = new BitSet(mk_tokenSet_59());
2710    private static final long[] mk_tokenSet_60() {
2711        long[] data = new long[8];
2712        data[0]=4810363371522L;
2713        data[1]=9007093667929718784L;
2714        data[2]=8809040871144030731L;
2715        data[3]=1023L;
2716        return data;
2717    }
2718    public static final BitSet _tokenSet_60 = new BitSet(mk_tokenSet_60());
2719    private static final long[] mk_tokenSet_61() {
2720        long[] data = { 0L, 2305843009214480384L, 0L, 0L};
2721        return data;
2722    }
2723    public static final BitSet _tokenSet_61 = new BitSet(mk_tokenSet_61());
2724    private static final long[] mk_tokenSet_62() {
2725        long[] data = { 0L, 4323455644432334848L, 0L, 0L};
2726        return data;
2727    }
2728    public static final BitSet _tokenSet_62 = new BitSet(mk_tokenSet_62());
2729    private static final long[] mk_tokenSet_63() {
2730        long[] data = new long[8];
2731        data[0]=7009386627072L;
2732        data[1]=324259139375005696L;
2733        data[2]=8809040871199602435L;
2734        data[3]=1023L;
2735        return data;
2736    }
2737    public static final BitSet _tokenSet_63 = new BitSet(mk_tokenSet_63());
2738    private static final long[] mk_tokenSet_64() {
2739        long[] data = new long[8];
2740        data[0]=7009386627072L;
2741        data[1]=4611686018158919680L;
2742        data[2]=9223372036850581499L;
2743        data[3]=1023L;
2744        return data;
2745    }
2746    public static final BitSet _tokenSet_64 = new BitSet(mk_tokenSet_64());
2747    private static final long[] mk_tokenSet_65() {
2748        long[] data = { 137438953472L, 36063947032231936L, 8L, 0L, 0L, 0L};
2749        return data;
2750    }
2751    public static final BitSet _tokenSet_65 = new BitSet(mk_tokenSet_65());
2752    private static final long[] mk_tokenSet_66() {
2753        long[] data = new long[8];
2754        data[0]=4810363371520L;
2755        data[1]=4395407652723556352L;
2756        data[2]=8809040871139835915L;
2757        data[3]=1023L;
2758        return data;
2759    }
2760    public static final BitSet _tokenSet_66 = new BitSet(mk_tokenSet_66());
2761    private static final long[] mk_tokenSet_67() {
2762        long[] data = { 0L, 1610612736L, 1L, 0L, 0L, 0L};
2763        return data;
2764    }
2765    public static final BitSet _tokenSet_67 = new BitSet(mk_tokenSet_67());
2766    private static final long[] mk_tokenSet_68() {
2767        long[] data = { 0L, 2305878159369175040L, 0L, 0L};
2768        return data;
2769    }
2770    public static final BitSet _tokenSet_68 = new BitSet(mk_tokenSet_68());
2771    private static final long[] mk_tokenSet_69() {
2772        long[] data = new long[8];
2773        data[0]=7009386627072L;
2774        data[1]=2666130979300507648L;
2775        data[2]=8809040871199602435L;
2776        data[3]=1023L;
2777        return data;
2778    }
2779    public static final BitSet _tokenSet_69 = new BitSet(mk_tokenSet_69());
2780    private static final long[] mk_tokenSet_70() {
2781        long[] data = new long[8];
2782        data[0]=4810363371520L;
2783        data[1]=4359414036855488512L;
2784        data[2]=8809040871149255939L;
2785        data[3]=1023L;
2786        return data;
2787    }
2788    public static final BitSet _tokenSet_70 = new BitSet(mk_tokenSet_70());
2789    private static final long[] mk_tokenSet_71() {
2790        long[] data = new long[8];
2791        data[0]=7009386627072L;
2792        data[1]=4575657221139955712L;
2793        data[2]=9223372036850581499L;
2794        data[3]=1023L;
2795        return data;
2796    }
2797    public static final BitSet _tokenSet_71 = new BitSet(mk_tokenSet_71());
2798    private static final long[] mk_tokenSet_72() {
2799        long[] data = new long[8];
2800        data[0]=4810363371522L;
2801        data[1]=8971100055282876416L;
2802        data[2]=8809040871153450755L;
2803        data[3]=1023L;
2804        return data;
2805    }
2806    public static final BitSet _tokenSet_72 = new BitSet(mk_tokenSet_72());
2807    private static final long[] mk_tokenSet_73() {
2808        long[] data = { 0L, 1079508992L, 8L, 0L, 0L, 0L};
2809        return data;
2810    }
2811    public static final BitSet _tokenSet_73 = new BitSet(mk_tokenSet_73());
2812    private static final long[] mk_tokenSet_74() {
2813        long[] data = { 0L, 2413964552567259136L, 16L, 0L, 0L, 0L};
2814        return data;
2815    }
2816    public static final BitSet _tokenSet_74 = new BitSet(mk_tokenSet_74());
2817    private static final long[] mk_tokenSet_75() {
2818        long[] data = { 0L, 2413929402418593792L, 16L, 0L, 0L, 0L};
2819        return data;
2820    }
2821    public static final BitSet _tokenSet_75 = new BitSet(mk_tokenSet_75());
2822    private static final long[] mk_tokenSet_76() {
2823        long[] data = new long[8];
2824        data[0]=4810363371522L;
2825        data[1]=9079186448487251968L;
2826        data[2]=8809040871153450847L;
2827        data[3]=1023L;
2828        return data;
2829    }
2830    public static final BitSet _tokenSet_76 = new BitSet(mk_tokenSet_76());
2831    private static final long[] mk_tokenSet_77() {
2832        long[] data = { 0L, 2305843011361177600L, 64L, 0L, 0L, 0L};
2833        return data;
2834    }
2835    public static final BitSet _tokenSet_77 = new BitSet(mk_tokenSet_77());
2836    private static final long[] mk_tokenSet_78() {
2837        long[] data = { 137438953472L, 2305878159226961920L, 24L, 0L, 0L, 0L};
2838        return data;
2839    }
2840    public static final BitSet _tokenSet_78 = new BitSet(mk_tokenSet_78());
2841    private static final long[] mk_tokenSet_79() {
2842        long[] data = new long[8];
2843        data[0]=4810363371520L;
2844        data[1]=4431471634118836224L;
2845        data[2]=8809040871149255963L;
2846        data[3]=1023L;
2847        return data;
2848    }
2849    public static final BitSet _tokenSet_79 = new BitSet(mk_tokenSet_79());
2850    private static final long[] mk_tokenSet_80() {
2851        long[] data = { 0L, 35150021263360L, 96L, 0L, 0L, 0L};
2852        return data;
2853    }
2854    public static final BitSet _tokenSet_80 = new BitSet(mk_tokenSet_80());
2855    private static final long[] mk_tokenSet_81() {
2856        long[] data = new long[8];
2857        data[0]=4810363371520L;
2858        data[1]=4395442837099872256L;
2859        data[2]=8809040871149256011L;
2860        data[3]=1023L;
2861        return data;
2862    }
2863    public static final BitSet _tokenSet_81 = new BitSet(mk_tokenSet_81());
2864    private static final long[] mk_tokenSet_82() {
2865        long[] data = new long[8];
2866        data[0]=4810363371520L;
2867        data[1]=4359414036855488512L;
2868        data[2]=8809040871149256003L;
2869        data[3]=1023L;
2870        return data;
2871    }
2872    public static final BitSet _tokenSet_82 = new BitSet(mk_tokenSet_82());
2873    private static final long[] mk_tokenSet_83() {
2874        long[] data = { 137438953472L, 2341906956254314496L, 8L, 0L, 0L, 0L};
2875        return data;
2876    }
2877    public static final BitSet _tokenSet_83 = new BitSet(mk_tokenSet_83());
2878    private static final long[] mk_tokenSet_84() {
2879        long[] data = { 137438953472L, 2413964553518710784L, 72L, 0L, 0L, 0L};
2880        return data;
2881    }
2882    public static final BitSet _tokenSet_84 = new BitSet(mk_tokenSet_84());
2883    private static final long[] mk_tokenSet_85() {
2884        long[] data = { 0L, 35150012874752L, 64L, 0L, 0L, 0L};
2885        return data;
2886    }
2887    public static final BitSet _tokenSet_85 = new BitSet(mk_tokenSet_85());
2888    private static final long[] mk_tokenSet_86() {
2889        long[] data = { 0L, 2305878162453037056L, 64L, 0L, 0L, 0L};
2890        return data;
2891    }
2892    public static final BitSet _tokenSet_86 = new BitSet(mk_tokenSet_86());
2893    private static final long[] mk_tokenSet_87() {
2894        long[] data = new long[8];
2895        data[0]=4810363371520L;
2896        data[1]=4359414040217223168L;
2897        data[2]=8809040871149256003L;
2898        data[3]=1023L;
2899        return data;
2900    }
2901    public static final BitSet _tokenSet_87 = new BitSet(mk_tokenSet_87());
2902    private static final long[] mk_tokenSet_88() {
2903        long[] data = new long[12];
2904        data[0]=-14L;
2905        data[1]=-576460752305520641L;
2906        data[2]=9223372036854775807L;
2907        data[3]=134217727L;
2908        return data;
2909    }
2910    public static final BitSet _tokenSet_88 = new BitSet(mk_tokenSet_88());
2911    private static final long[] mk_tokenSet_89() {
2912        long[] data = new long[12];
2913        data[0]=-14L;
2914        for (int i = 1; i<=2; i++) { data[i]=-1L; }
2915        data[3]=134217727L;
2916        return data;
2917    }
2918    public static final BitSet _tokenSet_89 = new BitSet(mk_tokenSet_89());
2919    private static final long[] mk_tokenSet_90() {
2920        long[] data = { 137438953474L, 2377935756491358208L, 24L, 0L, 0L, 0L};
2921        return data;
2922    }
2923    public static final BitSet _tokenSet_90 = new BitSet(mk_tokenSet_90());
2924    private static final long[] mk_tokenSet_91() {
2925        long[] data = new long[8];
2926        data[0]=137438953474L;
2927        data[1]=2666166133324644352L;
2928        data[2]=8809040871139835931L;
2929        data[3]=1023L;
2930        return data;
2931    }
2932    public static final BitSet _tokenSet_91 = new BitSet(mk_tokenSet_91());
2933    private static final long[] mk_tokenSet_92() {
2934        long[] data = { 4810363371520L, 2341766219836620800L, 0L, 0L};
2935        return data;
2936    }
2937    public static final BitSet _tokenSet_92 = new BitSet(mk_tokenSet_92());
2938    private static final long[] mk_tokenSet_93() {
2939        long[] data = { 4810363371520L, 3602774117792546816L, 0L, 0L};
2940        return data;
2941    }
2942    public static final BitSet _tokenSet_93 = new BitSet(mk_tokenSet_93());
2943    private static final long[] mk_tokenSet_94() {
2944        long[] data = { 0L, 1188950303787974656L, 0L, 0L};
2945        return data;
2946    }
2947    public static final BitSet _tokenSet_94 = new BitSet(mk_tokenSet_94());
2948    private static final long[] mk_tokenSet_95() {
2949        long[] data = new long[8];
2950        data[0]=4810363371520L;
2951        data[1]=1477075090848808960L;
2952        data[2]=8809040871140851715L;
2953        data[3]=1023L;
2954        return data;
2955    }
2956    public static final BitSet _tokenSet_95 = new BitSet(mk_tokenSet_95());
2957    private static final long[] mk_tokenSet_96() {
2958        long[] data = new long[8];
2959        data[0]=288484363337728L;
2960        data[1]=4611686018158919680L;
2961        data[2]=-4194309L;
2962        data[3]=1023L;
2963        return data;
2964    }
2965    public static final BitSet _tokenSet_96 = new BitSet(mk_tokenSet_96());
2966    private static final long[] mk_tokenSet_97() {
2967        long[] data = { 4810363371520L, 2341766219836620800L, 16512L, 0L, 0L, 0L};
2968        return data;
2969    }
2970    public static final BitSet _tokenSet_97 = new BitSet(mk_tokenSet_97());
2971    private static final long[] mk_tokenSet_98() {
2972        long[] data = new long[8];
2973        data[0]=4810363371520L;
2974        data[1]=2629996596669906944L;
2975        data[2]=8809040871139852419L;
2976        data[3]=1023L;
2977        return data;
2978    }
2979    public static final BitSet _tokenSet_98 = new BitSet(mk_tokenSet_98());
2980    private static final long[] mk_tokenSet_99() {
2981        long[] data = { 137438953472L, 35150021656576L, 8L, 0L, 0L, 0L};
2982        return data;
2983    }
2984    public static final BitSet _tokenSet_99 = new BitSet(mk_tokenSet_99());
2985    private static final long[] mk_tokenSet_100() {
2986        long[] data = { 0L, 2594073385365405696L, 16777216L, 0L, 0L, 0L};
2987        return data;
2988    }
2989    public static final BitSet _tokenSet_100 = new BitSet(mk_tokenSet_100());
2990    private static final long[] mk_tokenSet_101() {
2991        long[] data = new long[8];
2992        data[0]=2L;
2993        data[1]=8971205610430791680L;
2994        data[2]=8809040871144030723L;
2995        data[3]=1023L;
2996        return data;
2997    }
2998    public static final BitSet _tokenSet_101 = new BitSet(mk_tokenSet_101());
2999    private static final long[] mk_tokenSet_102() {
3000        long[] data = { 2L, 8682940083719897088L, 4194816L, 0L, 0L, 0L};
3001        return data;
3002    }
3003    public static final BitSet _tokenSet_102 = new BitSet(mk_tokenSet_102());
3004    private static final long[] mk_tokenSet_103() {
3005        long[] data = { 4810363371520L, 3566745320773582848L, 2L, 0L, 0L, 0L};
3006        return data;
3007    }
3008    public static final BitSet _tokenSet_103 = new BitSet(mk_tokenSet_103());
3009    private static final long[] mk_tokenSet_104() {
3010        long[] data = { 0L, 25769803776L, 15762598695796744L, 0L, 0L, 0L};
3011        return data;
3012    }
3013    public static final BitSet _tokenSet_104 = new BitSet(mk_tokenSet_104());
3014    private static final long[] mk_tokenSet_105() {
3015        long[] data = new long[8];
3016        data[0]=-16L;
3017        data[1]=-288230376151711745L;
3018        data[2]=-1L;
3019        data[3]=134217727L;
3020        return data;
3021    }
3022    public static final BitSet _tokenSet_105 = new BitSet(mk_tokenSet_105());
3023    private static final long[] mk_tokenSet_106() {
3024        long[] data = { 0L, 288230376165343232L, 469762048L, 0L, 0L, 0L};
3025        return data;
3026    }
3027    public static final BitSet _tokenSet_106 = new BitSet(mk_tokenSet_106());
3028    private static final long[] mk_tokenSet_107() {
3029        long[] data = new long[8];
3030        data[0]=7009386627072L;
3031        data[1]=4395513205841952768L;
3032        data[2]=8809040871199604603L;
3033        data[3]=1023L;
3034        return data;
3035    }
3036    public static final BitSet _tokenSet_107 = new BitSet(mk_tokenSet_107());
3037    private static final long[] mk_tokenSet_108() {
3038        long[] data = new long[8];
3039        data[1]=2594108535924588544L;
3040        data[2]=8809040871139835907L;
3041        data[3]=1023L;
3042        return data;
3043    }
3044    public static final BitSet _tokenSet_108 = new BitSet(mk_tokenSet_108());
3045    private static final long[] mk_tokenSet_109() {
3046        long[] data = { 0L, 35184372088832L, 108086391056891904L, 0L, 0L, 0L};
3047        return data;
3048    }
3049    public static final BitSet _tokenSet_109 = new BitSet(mk_tokenSet_109());
3050    private static final long[] mk_tokenSet_110() {
3051        long[] data = { 0L, 36028798097948672L, 0L, 0L};
3052        return data;
3053    }
3054    public static final BitSet _tokenSet_110 = new BitSet(mk_tokenSet_110());
3055    private static final long[] mk_tokenSet_111() {
3056        long[] data = new long[8];
3057        data[1]=288265526710894592L;
3058        data[2]=6917529027641081859L;
3059        data[3]=1023L;
3060        return data;
3061    }
3062    public static final BitSet _tokenSet_111 = new BitSet(mk_tokenSet_111());
3063    private static final long[] mk_tokenSet_112() {
3064        long[] data = new long[8];
3065        data[0]=2L;
3066        data[1]=9187483976933572608L;
3067        data[2]=9223372036325262075L;
3068        data[3]=1023L;
3069        return data;
3070    }
3071    public static final BitSet _tokenSet_112 = new BitSet(mk_tokenSet_112());
3072    private static final long[] mk_tokenSet_113() {
3073        long[] data = new long[8];
3074        data[0]=2L;
3075        data[1]=9187483976937766912L;
3076        data[2]=9223372036795024123L;
3077        data[3]=1023L;
3078        return data;
3079    }
3080    public static final BitSet _tokenSet_113 = new BitSet(mk_tokenSet_113());
3081    private static final long[] mk_tokenSet_114() {
3082        long[] data = new long[8];
3083        data[0]=7009386627072L;
3084        data[1]=324259141524586496L;
3085        data[2]=8809040871199602435L;
3086        data[3]=1023L;
3087        return data;
3088    }
3089    public static final BitSet _tokenSet_114 = new BitSet(mk_tokenSet_114());
3090    private static final long[] mk_tokenSet_115() {
3091        long[] data = new long[8];
3092        data[1]=288265526712991744L;
3093        data[2]=8809040871139835907L;
3094        data[3]=1023L;
3095        return data;
3096    }
3097    public static final BitSet _tokenSet_115 = new BitSet(mk_tokenSet_115());
3098    private static final long[] mk_tokenSet_116() {
3099        long[] data = new long[8];
3100        data[0]=2199023255552L;
3101        data[1]=288335895471980544L;
3102        data[2]=6917529027699832579L;
3103        data[3]=1023L;
3104        return data;
3105    }
3106    public static final BitSet _tokenSet_116 = new BitSet(mk_tokenSet_116());
3107    private static final long[] mk_tokenSet_117() {
3108        long[] data = new long[8];
3109        data[0]=7009386627072L;
3110        data[1]=4359484408822988800L;
3111        data[2]=8809040871199604731L;
3112        data[3]=1023L;
3113        return data;
3114    }
3115    public static final BitSet _tokenSet_117 = new BitSet(mk_tokenSet_117());
3116    private static final long[] mk_tokenSet_118() {
3117        long[] data = new long[8];
3118        data[0]=4810363371520L;
3119        data[1]=324153586241961984L;
3120        data[2]=8809040871140851715L;
3121        data[3]=1023L;
3122        return data;
3123    }
3124    public static final BitSet _tokenSet_118 = new BitSet(mk_tokenSet_118());
3125    private static final long[] mk_tokenSet_119() {
3126        long[] data = { 2199023255552L, 105518773436416L, 58750720L, 0L, 0L, 0L};
3127        return data;
3128    }
3129    public static final BitSet _tokenSet_119 = new BitSet(mk_tokenSet_119());
3130    
3131    }
3132
Popular Tags