1
2
3 package org.codehaus.groovy.antlr.java;
4 import org.codehaus.groovy.antlr.*;
5 import org.codehaus.groovy.antlr.parser.*;
6 import java.util.*;
7 import java.io.InputStream;
8 import java.io.Reader;
9 import antlr.InputBuffer;
10 import antlr.LexerSharedInputState;
11
12 import antlr.TokenBuffer;
13 import antlr.TokenStreamException;
14 import antlr.TokenStreamIOException;
15 import antlr.ANTLRException;
16 import antlr.LLkParser;
17 import antlr.Token;
18 import antlr.TokenStream;
19 import antlr.RecognitionException;
20 import antlr.NoViableAltException;
21 import antlr.MismatchedTokenException;
22 import antlr.SemanticException;
23 import antlr.ParserSharedInputState;
24 import antlr.collections.impl.BitSet;
25 import antlr.collections.AST;
26 import java.util.Hashtable;
27 import antlr.ASTFactory;
28 import antlr.ASTPair;
29 import antlr.collections.impl.ASTArray;
30
31 /*** Java 1.5 Recognizer
32 *
33 * Run 'java Main [-showtree] directory-full-of-java-files'
34 *
35 * [The -showtree option pops up a Swing frame that shows
36 * the AST constructed from the parser.]
37 *
38 * Run 'java Main <directory full of java files>'
39 *
40 * Contributing authors:
41 * Jeremy Rayner groovy@ross-rayner.com
42 * John Mitchell johnm@non.net
43 * Terence Parr parrt@magelang.com
44 * John Lilley jlilley@empathy.com
45 * Scott Stanchfield thetick@magelang.com
46 * Markus Mohnen mohnen@informatik.rwth-aachen.de
47 * Peter Williams pete.williams@sun.com
48 * Allan Jacobs Allan.Jacobs@eng.sun.com
49 * Steve Messick messick@redhills.com
50 * John Pybus john@pybus.org
51 *
52 * Version 1.00 December 9, 1997 -- initial release
53 * Version 1.01 December 10, 1997
54 * fixed bug in octal def (0..7 not 0..8)
55 * Version 1.10 August 1998 (parrt)
56 * added tree construction
57 * fixed definition of WS,comments for mac,pc,unix newlines
58 * added unary plus
59 * Version 1.11 (Nov 20, 1998)
60 * Added "shutup" option to turn off last ambig warning.
61 * Fixed inner class def to allow named class defs as statements
62 * synchronized requires compound not simple statement
63 * add [] after builtInType DOT class in primaryExpression
64 * "const" is reserved but not valid..removed from modifiers
65 * Version 1.12 (Feb 2, 1999)
66 * Changed LITERAL_xxx to xxx in tree grammar.
67 * Updated java.g to use tokens {...} now for 2.6.0 (new feature).
68 *
69 * Version 1.13 (Apr 23, 1999)
70 * Didn't have (stat)? for else clause in tree parser.
71 * Didn't gen ASTs for interface extends. Updated tree parser too.
72 * Updated to 2.6.0.
73 * Version 1.14 (Jun 20, 1999)
74 * Allowed final/abstract on local classes.
75 * Removed local interfaces from methods
76 * Put instanceof precedence where it belongs...in relationalExpr
77 * It also had expr not type as arg; fixed it.
78 * Missing ! on SEMI in classBlock
79 * fixed: (expr) + "string" was parsed incorrectly (+ as unary plus).
80 * fixed: didn't like Object[].class in parser or tree parser
81 * Version 1.15 (Jun 26, 1999)
82 * Screwed up rule with instanceof in it. :( Fixed.
83 * Tree parser didn't like (expr).something; fixed.
84 * Allowed multiple inheritance in tree grammar. oops.
85 * Version 1.16 (August 22, 1999)
86 * Extending an interface built a wacky tree: had extra EXTENDS.
87 * Tree grammar didn't allow multiple superinterfaces.
88 * Tree grammar didn't allow empty var initializer: {}
89 * Version 1.17 (October 12, 1999)
90 * ESC lexer rule allowed 399 max not 377 max.
91 * java.tree.g didn't handle the expression of synchronized
92 * statements.
93 * Version 1.18 (August 12, 2001)
94 * Terence updated to Java 2 Version 1.3 by
95 * observing/combining work of Allan Jacobs and Steve
96 * Messick. Handles 1.3 src. Summary:
97 * o primary didn't include boolean.class kind of thing
98 * o constructor calls parsed explicitly now:
99 * see explicitConstructorInvocation
100 * o add strictfp modifier
101 * o missing objBlock after new expression in tree grammar
102 * o merged local class definition alternatives, moved after declaration
103 * o fixed problem with ClassName.super.field
104 * o reordered some alternatives to make things more efficient
105 * o long and double constants were not differentiated from int/float
106 * o whitespace rule was inefficient: matched only one char
107 * o add an examples directory with some nasty 1.3 cases
108 * o made Main.java use buffered IO and a Reader for Unicode support
109 * o supports UNICODE?
110 * Using Unicode charVocabulay makes code file big, but only
111 * in the bitsets at the end. I need to make ANTLR generate
112 * unicode bitsets more efficiently.
113 * Version 1.19 (April 25, 2002)
114 * Terence added in nice fixes by John Pybus concerning floating
115 * constants and problems with super() calls. John did a nice
116 * reorg of the primary/postfix expression stuff to read better
117 * and makes f.g.super() parse properly (it was METHOD_CALL not
118 * a SUPER_CTOR_CALL). Also:
119 *
120 * o "finally" clause was a root...made it a child of "try"
121 * o Added stuff for asserts too for Java 1.4, but *commented out*
122 * as it is not backward compatible.
123 *
124 * Version 1.20 (October 27, 2002)
125 *
126 * Terence ended up reorging John Pybus' stuff to
127 * remove some nondeterminisms and some syntactic predicates.
128 * Note that the grammar is stricter now; e.g., this(...) must
129 * be the first statement.
130 *
131 * Trinary ?: operator wasn't working as array name:
132 * (isBig ? bigDigits : digits)[i];
133 *
134 * Checked parser/tree parser on source for
135 * Resin-2.0.5, jive-2.1.1, jdk 1.3.1, Lucene, antlr 2.7.2a4,
136 * and the 110k-line jGuru server source.
137 *
138 * Version 1.21 (October 17, 2003)
139 * Fixed lots of problems including:
140 * Ray Waldin: add typeDefinition to interfaceBlock in java.tree.g
141 * He found a problem/fix with floating point that start with 0
142 * Ray also fixed problem that (int.class) was not recognized.
143 * Thorsten van Ellen noticed that \n are allowed incorrectly in strings.
144 * TJP fixed CHAR_LITERAL analogously.
145 *
146 * Version 1.21.2 (March, 2003)
147 * Changes by Matt Quail to support generics (as per JDK1.5/JSR14)
148 * Notes:
149 * o We only allow the "extends" keyword and not the "implements"
150 * keyword, since thats what JSR14 seems to imply.
151 * o Thanks to Monty Zukowski for his help on the antlr-interest
152 * mail list.
153 * o Thanks to Alan Eliasen for testing the grammar over his
154 * Fink source base
155 *
156 * Version 1.22 (July, 2004)
157 * Changes by Michael Studman to support Java 1.5 language extensions
158 * Notes:
159 * o Added support for annotations types
160 * o Finished off Matt Quail's generics enhancements to support bound type arguments
161 * o Added support for new for statement syntax
162 * o Added support for static import syntax
163 * o Added support for enum types
164 * o Tested against JDK 1.5 source base and source base of jdigraph project
165 * o Thanks to Matt Quail for doing the hard part by doing most of the generics work
166 *
167 * Version 1.22.1 (July 28, 2004)
168 * Bug/omission fixes for Java 1.5 language support
169 * o Fixed tree structure bug with classOrInterface - thanks to Pieter Vangorpto for
170 * spotting this
171 * o Fixed bug where incorrect handling of SR and BSR tokens would cause type
172 * parameters to be recognised as type arguments.
173 * o Enabled type parameters on constructors, annotations on enum constants
174 * and package definitions
175 * o Fixed problems when parsing if ((char.class.equals(c))) {} - solution by Matt Quail at Cenqua
176 *
177 * Version 1.22.2 (July 28, 2004)
178 * Slight refactoring of Java 1.5 language support
179 * o Refactored for/"foreach" productions so that original literal "for" literal
180 * is still used but the for sub-clauses vary by token type
181 * o Fixed bug where type parameter was not included in generic constructor's branch of AST
182 *
183 * Version 1.22.3 (August 26, 2004)
184 * Bug fixes as identified by Michael Stahl; clean up of tabs/spaces
185 * and other refactorings
186 * o Fixed typeParameters omission in identPrimary and newStatement
187 * o Replaced GT reconcilliation code with simple semantic predicate
188 * o Adapted enum/assert keyword checking support from Michael Stahl's java15 grammar
189 * o Refactored typeDefinition production and field productions to reduce duplication
190 *
191 * Version 1.22.4 (October 21, 2004)
192 * Small bux fixes
193 * o Added typeArguments to explicitConstructorInvocation, e.g. new <String>MyParameterised()
194 * o Added typeArguments to postfixExpression productions for anonymous inner class super
195 * constructor invocation, e.g. new Outer().<String>super()
196 * o Fixed bug in array declarations identified by Geoff Roy
197 *
198 * Version 1.22.4.j.1
199 * Changes by Jeremy Rayner to support java2groovy tool
200 * o I have taken java.g for Java1.5 from Michael Studman (1.22.4)
201 * and have made some changes to enable use by java2groovy tool (Jan 2007)
202 *
203 * This grammar is in the PUBLIC DOMAIN
204 */
205 public class JavaRecognizer extends antlr.LLkParser implements JavaTokenTypes
206 {
207
208 /*** This factory is the correct way to wire together a Groovy parser and lexer. */
209 public static JavaRecognizer make(JavaLexer lexer) {
210 JavaRecognizer parser = new JavaRecognizer(lexer.plumb());
211
212 parser.lexer = lexer;
213 lexer.parser = parser;
214 parser.setASTNodeClass("org.codehaus.groovy.antlr.GroovySourceAST");
215 return parser;
216 }
217
218 public static JavaRecognizer make(InputStream in) { return make(new JavaLexer(in)); }
219 public static JavaRecognizer make(Reader in) { return make(new JavaLexer(in)); }
220 public static JavaRecognizer make(InputBuffer in) { return make(new JavaLexer(in)); }
221 public static JavaRecognizer make(LexerSharedInputState in) { return make(new JavaLexer(in)); }
222
223 private static GroovySourceAST dummyVariableToforceClassLoaderToFindASTClass = new GroovySourceAST();
224
225 JavaLexer lexer;
226 public JavaLexer getLexer() { return lexer; }
227 public void setFilename(String f) { super.setFilename(f); lexer.setFilename(f); }
228 private SourceBuffer sourceBuffer;
229 public void setSourceBuffer(SourceBuffer sourceBuffer) {
230 this.sourceBuffer = sourceBuffer;
231 }
232
233 /*** Create an AST node with the token type and text passed in, but
234 * with the same background information as another supplied Token (e.g. line numbers)
235 * to be used in place of antlr tree construction syntax,
236 * i.e. #[TOKEN,"text"] becomes create(TOKEN,"text",anotherToken)
237 *
238 * todo - change antlr.ASTFactory to do this instead...
239 */
240 public AST create(int type, String txt, Token first, Token last) {
241 AST t = astFactory.create(type,txt);
242 if ( t != null && first != null) {
243
244 t.initialize(first);
245
246 t.initialize(type,txt);
247 }
248
249 if ((t instanceof GroovySourceAST) && last != null) {
250 GroovySourceAST node = (GroovySourceAST)t;
251 node.setLast(last);
252
253
254 }
255 return t;
256 }
257
258
259 /***
260 * Counts the number of LT seen in the typeArguments production.
261 * It is used in semantic predicates to ensure we have seen
262 * enough closing '>' characters; which actually may have been
263 * either GT, SR or BSR tokens.
264 */
265 private int ltCounter = 0;
266
267 protected JavaRecognizer(TokenBuffer tokenBuf, int k) {
268 super(tokenBuf,k);
269 tokenNames = _tokenNames;
270 buildTokenTypeASTClassMap();
271 astFactory = new ASTFactory(getTokenTypeToASTClassMap());
272 }
273
274 public JavaRecognizer(TokenBuffer tokenBuf) {
275 this(tokenBuf,2);
276 }
277
278 protected JavaRecognizer(TokenStream lexer, int k) {
279 super(lexer,k);
280 tokenNames = _tokenNames;
281 buildTokenTypeASTClassMap();
282 astFactory = new ASTFactory(getTokenTypeToASTClassMap());
283 }
284
285 public JavaRecognizer(TokenStream lexer) {
286 this(lexer,2);
287 }
288
289 public JavaRecognizer(ParserSharedInputState state) {
290 super(state,2);
291 tokenNames = _tokenNames;
292 buildTokenTypeASTClassMap();
293 astFactory = new ASTFactory(getTokenTypeToASTClassMap());
294 }
295
296 public final void compilationUnit() throws RecognitionException, TokenStreamException {
297
298 returnAST = null;
299 ASTPair currentAST = new ASTPair();
300 AST compilationUnit_AST = null;
301
302 {
303 boolean synPredMatched4 = false;
304 if (((LA(1)==LITERAL_package||LA(1)==AT) && (LA(2)==IDENT))) {
305 int _m4 = mark();
306 synPredMatched4 = true;
307 inputState.guessing++;
308 try {
309 {
310 annotations();
311 match(LITERAL_package);
312 }
313 }
314 catch (RecognitionException pe) {
315 synPredMatched4 = false;
316 }
317 rewind(_m4);
318 inputState.guessing--;
319 }
320 if ( synPredMatched4 ) {
321 packageDefinition();
322 astFactory.addASTChild(currentAST, returnAST);
323 }
324 else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_1.member(LA(2)))) {
325 }
326 else {
327 throw new NoViableAltException(LT(1), getFilename());
328 }
329
330 }
331 {
332 _loop6:
333 do {
334 if ((LA(1)==LITERAL_import)) {
335 importDefinition();
336 astFactory.addASTChild(currentAST, returnAST);
337 }
338 else {
339 break _loop6;
340 }
341
342 } while (true);
343 }
344 {
345 _loop8:
346 do {
347 if ((_tokenSet_2.member(LA(1)))) {
348 typeDefinition();
349 astFactory.addASTChild(currentAST, returnAST);
350 }
351 else {
352 break _loop8;
353 }
354
355 } while (true);
356 }
357 match(Token.EOF_TYPE);
358 compilationUnit_AST = (AST)currentAST.root;
359 returnAST = compilationUnit_AST;
360 }
361
362 public final void annotations() throws RecognitionException, TokenStreamException {
363
364 returnAST = null;
365 ASTPair currentAST = new ASTPair();
366 AST annotations_AST = null;
367 Token first = LT(1);
368
369 {
370 _loop62:
371 do {
372 if ((LA(1)==AT)) {
373 annotation();
374 astFactory.addASTChild(currentAST, returnAST);
375 }
376 else {
377 break _loop62;
378 }
379
380 } while (true);
381 }
382 if ( inputState.guessing==0 ) {
383 annotations_AST = (AST)currentAST.root;
384 annotations_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(ANNOTATIONS,"ANNOTATIONS")).add(annotations_AST));
385 currentAST.root = annotations_AST;
386 currentAST.child = annotations_AST!=null &&annotations_AST.getFirstChild()!=null ?
387 annotations_AST.getFirstChild() : annotations_AST;
388 currentAST.advanceChildToEnd();
389 }
390 annotations_AST = (AST)currentAST.root;
391 returnAST = annotations_AST;
392 }
393
394 public final void packageDefinition() throws RecognitionException, TokenStreamException {/package-summary.html">> final void packageDefinition() throws RecognitionException, TokenStreamException {
395
396 returnAST = null;
397 ASTPair currentAST = new ASTPair();
398 AST packageDefinition_AST = null;
399 Token p = null;
400 AST p_AST = null;
401
402 try {
403 annotations();
404 astFactory.addASTChild(currentAST, returnAST);
405 p = LT(1);
406 p_AST = astFactory.create(p);
407 astFactory.makeASTRoot(currentAST, p_AST);
408 match(LITERAL_package);
409 if ( inputState.guessing==0 ) {
410 p_AST.setType(PACKAGE_DEF);
411 }
412 identifier();
413 astFactory.addASTChild(currentAST, returnAST);
414 match(SEMI);
415 packageDefinition_AST = (AST)currentAST.root;
416 }
417 catch (RecognitionException ex) {
418 if (inputState.guessing==0) {
419 reportError(ex);
420 consume();
421 consumeUntil(_tokenSet_0);
422 } else {
423 throw ex;
424 }
425 }
426 returnAST = packageDefinition_AST;
427 }
428
429 public final void importDefinition() throws RecognitionException, TokenStreamException {
430
431 returnAST = null;
432 ASTPair currentAST = new ASTPair();
433 AST importDefinition_AST = null;
434 Token i = null;
435 AST i_AST = null;
436 boolean isStatic = false;
437
438 try {
439 i = LT(1);
440 i_AST = astFactory.create(i);
441 astFactory.makeASTRoot(currentAST, i_AST);
442 match(LITERAL_import);
443 if ( inputState.guessing==0 ) {
444 i_AST.setType(IMPORT);
445 }
446 {
447 switch ( LA(1)) {
448 case LITERAL_static:
449 {
450 match(LITERAL_static);
451 if ( inputState.guessing==0 ) {
452 i_AST.setType(STATIC_IMPORT);
453 }
454 break;
455 }
456 case IDENT:
457 {
458 break;
459 }
460 default:
461 {
462 throw new NoViableAltException(LT(1), getFilename());
463 }
464 }
465 }
466 identifierStar();
467 astFactory.addASTChild(currentAST, returnAST);
468 match(SEMI);
469 importDefinition_AST = (AST)currentAST.root;
470 }
471 catch (RecognitionException ex) {
472 if (inputState.guessing==0) {
473 reportError(ex);
474 consume();
475 consumeUntil(_tokenSet_0);
476 } else {
477 throw ex;
478 }
479 }
480 returnAST = importDefinition_AST;
481 }
482
483 public final void typeDefinition() throws RecognitionException, TokenStreamException {
484
485 returnAST = null;
486 ASTPair currentAST = new ASTPair();
487 AST typeDefinition_AST = null;
488 AST m_AST = null;
489
490 try {
491 switch ( LA(1)) {
492 case FINAL:
493 case ABSTRACT:
494 case STRICTFP:
495 case LITERAL_static:
496 case LITERAL_private:
497 case LITERAL_public:
498 case LITERAL_protected:
499 case LITERAL_transient:
500 case LITERAL_native:
501 case LITERAL_threadsafe:
502 case LITERAL_synchronized:
503 case LITERAL_volatile:
504 case AT:
505 case LITERAL_class:
506 case LITERAL_interface:
507 case LITERAL_enum:
508 {
509 modifiers();
510 m_AST = (AST)returnAST;
511 typeDefinitionInternal(m_AST);
512 astFactory.addASTChild(currentAST, returnAST);
513 typeDefinition_AST = (AST)currentAST.root;
514 break;
515 }
516 case SEMI:
517 {
518 match(SEMI);
519 typeDefinition_AST = (AST)currentAST.root;
520 break;
521 }
522 default:
523 {
524 throw new NoViableAltException(LT(1), getFilename());
525 }
526 }
527 }
528 catch (RecognitionException ex) {
529 if (inputState.guessing==0) {
530 reportError(ex);
531 consume();
532 consumeUntil(_tokenSet_3);
533 } else {
534 throw ex;
535 }
536 }
537 returnAST = typeDefinition_AST;
538 }
539
540 public final void identifier() throws RecognitionException, TokenStreamException {
541
542 returnAST = null;
543 ASTPair currentAST = new ASTPair();
544 AST identifier_AST = null;
545
546 AST tmp6_AST = null;
547 tmp6_AST = astFactory.create(LT(1));
548 astFactory.addASTChild(currentAST, tmp6_AST);
549 match(IDENT);
550 {
551 _loop48:
552 do {
553 if ((LA(1)==DOT)) {
554 AST tmp7_AST = null;
555 tmp7_AST = astFactory.create(LT(1));
556 astFactory.makeASTRoot(currentAST, tmp7_AST);
557 match(DOT);
558 AST tmp8_AST = null;
559 tmp8_AST = astFactory.create(LT(1));
560 astFactory.addASTChild(currentAST, tmp8_AST);
561 match(IDENT);
562 }
563 else {
564 break _loop48;
565 }
566
567 } while (true);
568 }
569 identifier_AST = (AST)currentAST.root;
570 returnAST = identifier_AST;
571 }
572
573 public final void identifierStar() throws RecognitionException, TokenStreamException {
574
575 returnAST = null;
576 ASTPair currentAST = new ASTPair();
577 AST identifierStar_AST = null;
578
579 AST tmp9_AST = null;
580 tmp9_AST = astFactory.create(LT(1));
581 astFactory.addASTChild(currentAST, tmp9_AST);
582 match(IDENT);
583 {
584 _loop51:
585 do {
586 if ((LA(1)==DOT) && (LA(2)==IDENT)) {
587 AST tmp10_AST = null;
588 tmp10_AST = astFactory.create(LT(1));
589 astFactory.makeASTRoot(currentAST, tmp10_AST);
590 match(DOT);
591 AST tmp11_AST = null;
592 tmp11_AST = astFactory.create(LT(1));
593 astFactory.addASTChild(currentAST, tmp11_AST);
594 match(IDENT);
595 }
596 else {
597 break _loop51;
598 }
599
600 } while (true);
601 }
602 {
603 switch ( LA(1)) {
604 case DOT:
605 {
606 AST tmp12_AST = null;
607 tmp12_AST = astFactory.create(LT(1));
608 astFactory.makeASTRoot(currentAST, tmp12_AST);
609 match(DOT);
610 AST tmp13_AST = null;
611 tmp13_AST = astFactory.create(LT(1));
612 astFactory.addASTChild(currentAST, tmp13_AST);
613 match(STAR);
614 break;
615 }
616 case SEMI:
617 {
618 break;
619 }
620 default:
621 {
622 throw new NoViableAltException(LT(1), getFilename());
623 }
624 }
625 }
626 identifierStar_AST = (AST)currentAST.root;
627 returnAST = identifierStar_AST;
628 }
629
630 public final void modifiers() throws RecognitionException, TokenStreamException {
631
632 returnAST = null;
633 ASTPair currentAST = new ASTPair();
634 AST modifiers_AST = null;
635 Token first = LT(1);
636
637 {
638 _loop55:
639 do {
640 if ((_tokenSet_4.member(LA(1)))) {
641 modifier();
642 astFactory.addASTChild(currentAST, returnAST);
643 }
644 else if (((LA(1)==AT) && (LA(2)==IDENT))&&(LA(1)==AT && !LT(2).getText().equals("interface"))) {
645 annotation();
646 astFactory.addASTChild(currentAST, returnAST);
647 }
648 else {
649 break _loop55;
650 }
651
652 } while (true);
653 }
654 if ( inputState.guessing==0 ) {
655 modifiers_AST = (AST)currentAST.root;
656 modifiers_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(MODIFIERS,"MODIFIERS",first,LT(1))).add(modifiers_AST));
657 currentAST.root = modifiers_AST;
658 currentAST.child = modifiers_AST!=null &&modifiers_AST.getFirstChild()!=null ?
659 modifiers_AST.getFirstChild() : modifiers_AST;
660 currentAST.advanceChildToEnd();
661 }
662 modifiers_AST = (AST)currentAST.root;
663 returnAST = modifiers_AST;
664 }
665
666 protected final void typeDefinitionInternal(
667 AST mods
668 ) throws RecognitionException, TokenStreamException {
669
670 returnAST = null;
671 ASTPair currentAST = new ASTPair();
672 AST typeDefinitionInternal_AST = null;
673
674 switch ( LA(1)) {
675 case LITERAL_class:
676 {
677 classDefinition(mods);
678 astFactory.addASTChild(currentAST, returnAST);
679 typeDefinitionInternal_AST = (AST)currentAST.root;
680 break;
681 }
682 case LITERAL_interface:
683 {
684 interfaceDefinition(mods);
685 astFactory.addASTChild(currentAST, returnAST);
686 typeDefinitionInternal_AST = (AST)currentAST.root;
687 break;
688 }
689 case LITERAL_enum:
690 {
691 enumDefinition(mods);
692 astFactory.addASTChild(currentAST, returnAST);
693 typeDefinitionInternal_AST = (AST)currentAST.root;
694 break;
695 }
696 case AT:
697 {
698 annotationDefinition(mods);
699 astFactory.addASTChild(currentAST, returnAST);
700 typeDefinitionInternal_AST = (AST)currentAST.root;
701 break;
702 }
703 default:
704 {
705 throw new NoViableAltException(LT(1), getFilename());
706 }
707 }
708 returnAST = typeDefinitionInternal_AST;
709 }
710
711 public final void classDefinition(
712 AST modifiers
713 ) throws RecognitionException, TokenStreamException {
714
715 returnAST = null;
716 ASTPair currentAST = new ASTPair();
717 AST classDefinition_AST = null;
718 AST tp_AST = null;
719 AST sc_AST = null;
720 AST ic_AST = null;
721 AST cb_AST = null;
722 Token first = LT(1);
723
724 match(LITERAL_class);
725 AST tmp15_AST = null;
726 tmp15_AST = astFactory.create(LT(1));
727 match(IDENT);
728 {
729 switch ( LA(1)) {
730 case LT:
731 {
732 typeParameters();
733 tp_AST = (AST)returnAST;
734 break;
735 }
736 case LITERAL_extends:
737 case LCURLY:
738 case LITERAL_implements:
739 {
740 break;
741 }
742 default:
743 {
744 throw new NoViableAltException(LT(1), getFilename());
745 }
746 }
747 }
748 superClassClause();
749 sc_AST = (AST)returnAST;
750 implementsClause();
751 ic_AST = (AST)returnAST;
752 classBlock();
753 cb_AST = (AST)returnAST;
754 if ( inputState.guessing==0 ) {
755 classDefinition_AST = (AST)currentAST.root;
756 classDefinition_AST = (AST)astFactory.make( (new ASTArray(7)).add(create(CLASS_DEF,"CLASS_DEF",first,LT(1))).add(modifiers).add(tmp15_AST).add(tp_AST).add(sc_AST).add(ic_AST).add(cb_AST));
757 currentAST.root = classDefinition_AST;
758 currentAST.child = classDefinition_AST!=null &&classDefinition_AST.getFirstChild()!=null ?
759 classDefinition_AST.getFirstChild() : classDefinition_AST;
760 currentAST.advanceChildToEnd();
761 }
762 returnAST = classDefinition_AST;
763 }
764
765 public final void interfaceDefinition(
766 AST modifiers
767 ) throws RecognitionException, TokenStreamException {
768
769 returnAST = null;
770 ASTPair currentAST = new ASTPair();
771 AST interfaceDefinition_AST = null;
772 AST tp_AST = null;
773 AST ie_AST = null;
774 AST ib_AST = null;
775 Token first = LT(1);
776
777 match(LITERAL_interface);
778 AST tmp17_AST = null;
779 tmp17_AST = astFactory.create(LT(1));
780 match(IDENT);
781 {
782 switch ( LA(1)) {
783 case LT:
784 {
785 typeParameters();
786 tp_AST = (AST)returnAST;
787 break;
788 }
789 case LITERAL_extends:
790 case LCURLY:
791 {
792 break;
793 }
794 default:
795 {
796 throw new NoViableAltException(LT(1), getFilename());
797 }
798 }
799 }
800 interfaceExtends();
801 ie_AST = (AST)returnAST;
802 interfaceBlock();
803 ib_AST = (AST)returnAST;
804 if ( inputState.guessing==0 ) {
805 interfaceDefinition_AST = (AST)currentAST.root;
806 interfaceDefinition_AST = (AST)astFactory.make( (new ASTArray(6)).add(create(INTERFACE_DEF,"INTERFACE_DEF",first,LT(1))).add(modifiers).add(tmp17_AST).add(tp_AST).add(ie_AST).add(ib_AST));
807 currentAST.root = interfaceDefinition_AST;
808 currentAST.child = interfaceDefinition_AST!=null &&interfaceDefinition_AST.getFirstChild()!=null ?
809 interfaceDefinition_AST.getFirstChild() : interfaceDefinition_AST;
810 currentAST.advanceChildToEnd();
811 }
812 returnAST = interfaceDefinition_AST;
813 }
814
815 public final void enumDefinition(
816 AST modifiers
817 ) throws RecognitionException, TokenStreamException {
818
819 returnAST = null;
820 ASTPair currentAST = new ASTPair();
821 AST enumDefinition_AST = null;
822 AST ic_AST = null;
823 AST eb_AST = null;
824 Token first = LT(1);
825
826 match(LITERAL_enum);
827 AST tmp19_AST = null;
828 tmp19_AST = astFactory.create(LT(1));
829 match(IDENT);
830 implementsClause();
831 ic_AST = (AST)returnAST;
832 enumBlock();
833 eb_AST = (AST)returnAST;
834 if ( inputState.guessing==0 ) {
835 enumDefinition_AST = (AST)currentAST.root;
836 enumDefinition_AST = (AST)astFactory.make( (new ASTArray(5)).add(create(ENUM_DEF,"ENUM_DEF",first,LT(1))).add(modifiers).add(tmp19_AST).add(ic_AST).add(eb_AST));
837 currentAST.root = enumDefinition_AST;
838 currentAST.child = enumDefinition_AST!=null &&enumDefinition_AST.getFirstChild()!=null ?
839 enumDefinition_AST.getFirstChild() : enumDefinition_AST;
840 currentAST.advanceChildToEnd();
841 }
842 returnAST = enumDefinition_AST;
843 }
844
845 public final void annotationDefinition(
846 AST modifiers
847 ) throws RecognitionException, TokenStreamException {
848
849 returnAST = null;
850 ASTPair currentAST = new ASTPair();
851 AST annotationDefinition_AST = null;
852 AST ab_AST = null;
853 Token first = LT(1);
854
855 AST tmp20_AST = null;
856 tmp20_AST = astFactory.create(LT(1));
857 match(AT);
858 match(LITERAL_interface);
859 AST tmp22_AST = null;
860 tmp22_AST = astFactory.create(LT(1));
861 match(IDENT);
862 annotationBlock();
863 ab_AST = (AST)returnAST;
864 if ( inputState.guessing==0 ) {
865 annotationDefinition_AST = (AST)currentAST.root;
866 annotationDefinition_AST = (AST)astFactory.make( (new ASTArray(4)).add(create(ANNOTATION_DEF,"ANNOTATION_DEF",first,LT(1))).add(modifiers).add(tmp22_AST).add(ab_AST));
867 currentAST.root = annotationDefinition_AST;
868 currentAST.child = annotationDefinition_AST!=null &&annotationDefinition_AST.getFirstChild()!=null ?
869 annotationDefinition_AST.getFirstChild() : annotationDefinition_AST;
870 currentAST.advanceChildToEnd();
871 }
872 returnAST = annotationDefinition_AST;
873 }
874
875 public final void declaration() throws RecognitionException, TokenStreamException {
876
877 returnAST = null;
878 ASTPair currentAST = new ASTPair();
879 AST declaration_AST = null;
880 AST m_AST = null;
881 AST t_AST = null;
882 AST v_AST = null;
883
884 modifiers();
885 m_AST = (AST)returnAST;
886 typeSpec(false);
887 t_AST = (AST)returnAST;
888 variableDefinitions(m_AST,t_AST);
889 v_AST = (AST)returnAST;
890 if ( inputState.guessing==0 ) {
891 declaration_AST = (AST)currentAST.root;
892 declaration_AST = v_AST;
893 currentAST.root = declaration_AST;
894 currentAST.child = declaration_AST!=null &&declaration_AST.getFirstChild()!=null ?
895 declaration_AST.getFirstChild() : declaration_AST;
896 currentAST.advanceChildToEnd();
897 }
898 returnAST = declaration_AST;
899 }
900
901 public final void typeSpec(
902 boolean addImagNode
903 ) throws RecognitionException, TokenStreamException {
904
905 returnAST = null;
906 ASTPair currentAST = new ASTPair();
907 AST typeSpec_AST = null;
908
909 switch ( LA(1)) {
910 case IDENT:
911 {
912 classTypeSpec(addImagNode);
913 astFactory.addASTChild(currentAST, returnAST);
914 typeSpec_AST = (AST)currentAST.root;
915 break;
916 }
917 case LITERAL_void:
918 case LITERAL_boolean:
919 case LITERAL_byte:
920 case LITERAL_char:
921 case LITERAL_short:
922 case LITERAL_int:
923 case LITERAL_float:
924 case LITERAL_long:
925 case LITERAL_double:
926 {
927 builtInTypeSpec(addImagNode);
928 astFactory.addASTChild(currentAST, returnAST);
929 typeSpec_AST = (AST)currentAST.root;
930 break;
931 }
932 default:
933 {
934 throw new NoViableAltException(LT(1), getFilename());
935 }
936 }
937 returnAST = typeSpec_AST;
938 }
939
940 public final void variableDefinitions(
941 AST mods, AST t
942 ) throws RecognitionException, TokenStreamException {
943
944 returnAST = null;
945 ASTPair currentAST = new ASTPair();
946 AST variableDefinitions_AST = null;
947
948 variableDeclarator(getASTFactory().dupTree(mods),
949 getASTFactory().dupTree(t));
950 astFactory.addASTChild(currentAST, returnAST);
951 {
952 _loop155:
953 do {
954 if ((LA(1)==COMMA)) {
955 match(COMMA);
956 variableDeclarator(getASTFactory().dupTree(mods),
957 getASTFactory().dupTree(t));
958 astFactory.addASTChild(currentAST, returnAST);
959 }
960 else {
961 break _loop155;
962 }
963
964 } while (true);
965 }
966 variableDefinitions_AST = (AST)currentAST.root;
967 returnAST = variableDefinitions_AST;
968 }
969
970 public final void classTypeSpec(
971 boolean addImagNode
972 ) throws RecognitionException, TokenStreamException {
973
974 returnAST = null;
975 ASTPair currentAST = new ASTPair();
976 AST classTypeSpec_AST = null;
977 Token lb = null;
978 AST lb_AST = null;
979 Token first = LT(1);
980
981 classOrInterfaceType(false);
982 astFactory.addASTChild(currentAST, returnAST);
983 {
984 _loop18:
985 do {
986 if ((LA(1)==LBRACK) && (LA(2)==RBRACK)) {
987 lb = LT(1);
988 lb_AST = astFactory.create(lb);
989 astFactory.makeASTRoot(currentAST, lb_AST);
990 match(LBRACK);
991 if ( inputState.guessing==0 ) {
992 lb_AST.setType(ARRAY_DECLARATOR);
993 }
994 match(RBRACK);
995 }
996 else {
997 break _loop18;
998 }
999
1000 } while (true);
1001 }
1002 if ( inputState.guessing==0 ) {
1003 classTypeSpec_AST = (AST)currentAST.root;
1004
1005 if ( addImagNode ) {
1006 classTypeSpec_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(classTypeSpec_AST));
1007 }
1008
1009 currentAST.root = classTypeSpec_AST;
1010 currentAST.child = classTypeSpec_AST!=null &&classTypeSpec_AST.getFirstChild()!=null ?
1011 classTypeSpec_AST.getFirstChild() : classTypeSpec_AST;
1012 currentAST.advanceChildToEnd();
1013 }
1014 classTypeSpec_AST = (AST)currentAST.root;
1015 returnAST = classTypeSpec_AST;
1016 }
1017
1018 public final void builtInTypeSpec(
1019 boolean addImagNode
1020 ) throws RecognitionException, TokenStreamException {
1021
1022 returnAST = null;
1023 ASTPair currentAST = new ASTPair();
1024 AST builtInTypeSpec_AST = null;
1025 Token lb = null;
1026 AST lb_AST = null;
1027 Token first = LT(1);
1028
1029 builtInType();
1030 astFactory.addASTChild(currentAST, returnAST);
1031 {
1032 _loop43:
1033 do {
1034 if ((LA(1)==LBRACK)) {
1035 lb = LT(1);
1036 lb_AST = astFactory.create(lb);
1037 astFactory.makeASTRoot(currentAST, lb_AST);
1038 match(LBRACK);
1039 if ( inputState.guessing==0 ) {
1040 lb_AST.setType(ARRAY_DECLARATOR);
1041 }
1042 match(RBRACK);
1043 }
1044 else {
1045 break _loop43;
1046 }
1047
1048 } while (true);
1049 }
1050 if ( inputState.guessing==0 ) {
1051 builtInTypeSpec_AST = (AST)currentAST.root;
1052
1053 if ( addImagNode ) {
1054 builtInTypeSpec_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(builtInTypeSpec_AST));
1055 }
1056
1057 currentAST.root = builtInTypeSpec_AST;
1058 currentAST.child = builtInTypeSpec_AST!=null &&builtInTypeSpec_AST.getFirstChild()!=null ?
1059 builtInTypeSpec_AST.getFirstChild() : builtInTypeSpec_AST;
1060 currentAST.advanceChildToEnd();
1061 }
1062 builtInTypeSpec_AST = (AST)currentAST.root;
1063 returnAST = builtInTypeSpec_AST;
1064 }
1065
1066 public final void classOrInterfaceType(
1067 boolean addImagNode
1068 ) throws RecognitionException, TokenStreamException {
1069
1070 returnAST = null;
1071 ASTPair currentAST = new ASTPair();
1072 AST classOrInterfaceType_AST = null;
1073 Token first = LT(1);
1074
1075 AST tmp26_AST = null;
1076 tmp26_AST = astFactory.create(LT(1));
1077 astFactory.makeASTRoot(currentAST, tmp26_AST);
1078 match(IDENT);
1079 {
1080 switch ( LA(1)) {
1081 case LT:
1082 {
1083 typeArguments();
1084 astFactory.addASTChild(currentAST, returnAST);
1085 break;
1086 }
1087 case SEMI:
1088 case LBRACK:
1089 case RBRACK:
1090 case IDENT:
1091 case DOT:
1092 case QUESTION:
1093 case LITERAL_extends:
1094 case LITERAL_super:
1095 case COMMA:
1096 case GT:
1097 case SR:
1098 case BSR:
1099 case LITERAL_void:
1100 case LITERAL_boolean:
1101 case LITERAL_byte:
1102 case LITERAL_char:
1103 case LITERAL_short:
1104 case LITERAL_int:
1105 case LITERAL_float:
1106 case LITERAL_long:
1107 case LITERAL_double:
1108 case LPAREN:
1109 case RPAREN:
1110 case ASSIGN:
1111 case LCURLY:
1112 case RCURLY:
1113 case BAND:
1114 case LITERAL_implements:
1115 case LITERAL_this:
1116 case TRIPLE_DOT:
1117 case COLON:
1118 case PLUS_ASSIGN:
1119 case MINUS_ASSIGN:
1120 case STAR_ASSIGN:
1121 case DIV_ASSIGN:
1122 case MOD_ASSIGN:
1123 case SR_ASSIGN:
1124 case BSR_ASSIGN:
1125 case SL_ASSIGN:
1126 case BAND_ASSIGN:
1127 case BXOR_ASSIGN:
1128 case BOR_ASSIGN:
1129 case LOR:
1130 case LAND:
1131 case BOR:
1132 case BXOR:
1133 case NOT_EQUAL:
1134 case EQUAL:
1135 {
1136 break;
1137 }
1138 default:
1139 {
1140 throw new NoViableAltException(LT(1), getFilename());
1141 }
1142 }
1143 }
1144 {
1145 _loop23:
1146 do {
1147 if ((LA(1)==DOT) && (LA(2)==IDENT)) {
1148 AST tmp27_AST = null;
1149 tmp27_AST = astFactory.create(LT(1));
1150 astFactory.makeASTRoot(currentAST, tmp27_AST);
1151 match(DOT);
1152 AST tmp28_AST = null;
1153 tmp28_AST = astFactory.create(LT(1));
1154 astFactory.addASTChild(currentAST, tmp28_AST);
1155 match(IDENT);
1156 {
1157 switch ( LA(1)) {
1158 case LT:
1159 {
1160 typeArguments();
1161 astFactory.addASTChild(currentAST, returnAST);
1162 break;
1163 }
1164 case SEMI:
1165 case LBRACK:
1166 case RBRACK:
1167 case IDENT:
1168 case DOT:
1169 case QUESTION:
1170 case LITERAL_extends:
1171 case LITERAL_super:
1172 case COMMA:
1173 case GT:
1174 case SR:
1175 case BSR:
1176 case LITERAL_void:
1177 case LITERAL_boolean:
1178 case LITERAL_byte:
1179 case LITERAL_char:
1180 case LITERAL_short:
1181 case LITERAL_int:
1182 case LITERAL_float:
1183 case LITERAL_long:
1184 case LITERAL_double:
1185 case LPAREN:
1186 case RPAREN:
1187 case ASSIGN:
1188 case LCURLY:
1189 case RCURLY:
1190 case BAND:
1191 case LITERAL_implements:
1192 case LITERAL_this:
1193 case TRIPLE_DOT:
1194 case COLON:
1195 case PLUS_ASSIGN:
1196 case MINUS_ASSIGN:
1197 case STAR_ASSIGN:
1198 case DIV_ASSIGN:
1199 case MOD_ASSIGN:
1200 case SR_ASSIGN:
1201 case BSR_ASSIGN:
1202 case SL_ASSIGN:
1203 case BAND_ASSIGN:
1204 case BXOR_ASSIGN:
1205 case BOR_ASSIGN:
1206 case LOR:
1207 case LAND:
1208 case BOR:
1209 case BXOR:
1210 case NOT_EQUAL:
1211 case EQUAL:
1212 {
1213 break;
1214 }
1215 default:
1216 {
1217 throw new NoViableAltException(LT(1), getFilename());
1218 }
1219 }
1220 }
1221 }
1222 else {
1223 break _loop23;
1224 }
1225
1226 } while (true);
1227 }
1228 if ( inputState.guessing==0 ) {
1229 classOrInterfaceType_AST = (AST)currentAST.root;
1230
1231 if ( addImagNode ) {
1232 classOrInterfaceType_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(classOrInterfaceType_AST));
1233 }
1234
1235 currentAST.root = classOrInterfaceType_AST;
1236 currentAST.child = classOrInterfaceType_AST!=null &&classOrInterfaceType_AST.getFirstChild()!=null ?
1237 classOrInterfaceType_AST.getFirstChild() : classOrInterfaceType_AST;
1238 currentAST.advanceChildToEnd();
1239 }
1240 classOrInterfaceType_AST = (AST)currentAST.root;
1241 returnAST = classOrInterfaceType_AST;
1242 }
1243
1244 public final void typeArguments() throws RecognitionException, TokenStreamException {
1245
1246 returnAST = null;
1247 ASTPair currentAST = new ASTPair();
1248 AST typeArguments_AST = null;
1249 int currentLtLevel = 0; Token first = LT(1);
1250
1251 if ( inputState.guessing==0 ) {
1252 currentLtLevel = ltCounter;
1253 }
1254 match(LT);
1255 if ( inputState.guessing==0 ) {
1256 ltCounter++;
1257 }
1258 typeArgument();
1259 astFactory.addASTChild(currentAST, returnAST);
1260 {
1261 _loop33:
1262 do {
1263 if (((LA(1)==COMMA) && (_tokenSet_5.member(LA(2))))&&(inputState.guessing !=0 || ltCounter == currentLtLevel + 1)) {
1264 match(COMMA);
1265 typeArgument();
1266 astFactory.addASTChild(currentAST, returnAST);
1267 }
1268 else {
1269 break _loop33;
1270 }
1271
1272 } while (true);
1273 }
1274 {
1275 if (((LA(1) >= GT && LA(1) <= BSR)) && (_tokenSet_6.member(LA(2)))) {
1276 typeArgumentsOrParametersEnd();
1277 astFactory.addASTChild(currentAST, returnAST);
1278 }
1279 else if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
1280 }
1281 else {
1282 throw new NoViableAltException(LT(1), getFilename());
1283 }
1284
1285 }
1286 if (!((currentLtLevel != 0) || ltCounter == currentLtLevel))
1287 throw new SemanticException("(currentLtLevel != 0) || ltCounter == currentLtLevel");
1288 if ( inputState.guessing==0 ) {
1289 typeArguments_AST = (AST)currentAST.root;
1290 typeArguments_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE_ARGUMENTS,"TYPE_ARGUMENTS",first,LT(1))).add(typeArguments_AST));
1291 currentAST.root = typeArguments_AST;
1292 currentAST.child = typeArguments_AST!=null &&typeArguments_AST.getFirstChild()!=null ?
1293 typeArguments_AST.getFirstChild() : typeArguments_AST;
1294 currentAST.advanceChildToEnd();
1295 }
1296 typeArguments_AST = (AST)currentAST.root;
1297 returnAST = typeArguments_AST;
1298 }
1299
1300 public final void typeArgumentSpec() throws RecognitionException, TokenStreamException {
1301
1302 returnAST = null;
1303 ASTPair currentAST = new ASTPair();
1304 AST typeArgumentSpec_AST = null;
1305
1306 switch ( LA(1)) {
1307 case IDENT:
1308 {
1309 classTypeSpec(true);
1310 astFactory.addASTChild(currentAST, returnAST);
1311 typeArgumentSpec_AST = (AST)currentAST.root;
1312 break;
1313 }
1314 case LITERAL_void:
1315 case LITERAL_boolean:
1316 case LITERAL_byte:
1317 case LITERAL_char:
1318 case LITERAL_short:
1319 case LITERAL_int:
1320 case LITERAL_float:
1321 case LITERAL_long:
1322 case LITERAL_double:
1323 {
1324 builtInTypeArraySpec(true);
1325 astFactory.addASTChild(currentAST, returnAST);
1326 typeArgumentSpec_AST = (AST)currentAST.root;
1327 break;
1328 }
1329 default:
1330 {
1331 throw new NoViableAltException(LT(1), getFilename());
1332 }
1333 }
1334 returnAST = typeArgumentSpec_AST;
1335 }
1336
1337 public final void builtInTypeArraySpec(
1338 boolean addImagNode
1339 ) throws RecognitionException, TokenStreamException {
1340
1341 returnAST = null;
1342 ASTPair currentAST = new ASTPair();
1343 AST builtInTypeArraySpec_AST = null;
1344 Token lb = null;
1345 AST lb_AST = null;
1346 Token first = LT(1);
1347
1348 builtInType();
1349 astFactory.addASTChild(currentAST, returnAST);
1350 {
1351 int _cnt40=0;
1352 _loop40:
1353 do {
1354 if ((LA(1)==LBRACK) && (LA(2)==RBRACK)) {
1355 lb = LT(1);
1356 lb_AST = astFactory.create(lb);
1357 astFactory.makeASTRoot(currentAST, lb_AST);
1358 match(LBRACK);
1359 if ( inputState.guessing==0 ) {
1360 lb_AST.setType(ARRAY_DECLARATOR);
1361 }
1362 match(RBRACK);
1363 }
1364 else {
1365 if ( _cnt40>=1 ) { break _loop40; } else {throw new NoViableAltException(LT(1), getFilename());}
1366 }
1367
1368 _cnt40++;
1369 } while (true);
1370 }
1371 if ( inputState.guessing==0 ) {
1372 builtInTypeArraySpec_AST = (AST)currentAST.root;
1373
1374 if ( addImagNode ) {
1375 builtInTypeArraySpec_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(builtInTypeArraySpec_AST));
1376 }
1377
1378 currentAST.root = builtInTypeArraySpec_AST;
1379 currentAST.child = builtInTypeArraySpec_AST!=null &&builtInTypeArraySpec_AST.getFirstChild()!=null ?
1380 builtInTypeArraySpec_AST.getFirstChild() : builtInTypeArraySpec_AST;
1381 currentAST.advanceChildToEnd();
1382 }
1383 builtInTypeArraySpec_AST = (AST)currentAST.root;
1384 returnAST = builtInTypeArraySpec_AST;
1385 }
1386
1387 public final void typeArgument() throws RecognitionException, TokenStreamException {
1388
1389 returnAST = null;
1390 ASTPair currentAST = new ASTPair();
1391 AST typeArgument_AST = null;
1392 Token first = LT(1);
1393
1394 {
1395 switch ( LA(1)) {
1396 case IDENT:
1397 case LITERAL_void:
1398 case LITERAL_boolean:
1399 case LITERAL_byte:
1400 case LITERAL_char:
1401 case LITERAL_short:
1402 case LITERAL_int:
1403 case LITERAL_float:
1404 case LITERAL_long:
1405 case LITERAL_double:
1406 {
1407 typeArgumentSpec();
1408 astFactory.addASTChild(currentAST, returnAST);
1409 break;
1410 }
1411 case QUESTION:
1412 {
1413 wildcardType();
1414 astFactory.addASTChild(currentAST, returnAST);
1415 break;
1416 }
1417 default:
1418 {
1419 throw new NoViableAltException(LT(1), getFilename());
1420 }
1421 }
1422 }
1423 if ( inputState.guessing==0 ) {
1424 typeArgument_AST = (AST)currentAST.root;
1425 typeArgument_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE_ARGUMENT,"TYPE_ARGUMENT",first,LT(1))).add(typeArgument_AST));
1426 currentAST.root = typeArgument_AST;
1427 currentAST.child = typeArgument_AST!=null &&typeArgument_AST.getFirstChild()!=null ?
1428 typeArgument_AST.getFirstChild() : typeArgument_AST;
1429 currentAST.advanceChildToEnd();
1430 }
1431 typeArgument_AST = (AST)currentAST.root;
1432 returnAST = typeArgument_AST;
1433 }
1434
1435 public final void wildcardType() throws RecognitionException, TokenStreamException {
1436
1437 returnAST = null;
1438 ASTPair currentAST = new ASTPair();
1439 AST wildcardType_AST = null;
1440 Token q = null;
1441 AST q_AST = null;
1442
1443 q = LT(1);
1444 q_AST = astFactory.create(q);
1445 astFactory.makeASTRoot(currentAST, q_AST);
1446 match(QUESTION);
1447 if ( inputState.guessing==0 ) {
1448 q_AST.setType(WILDCARD_TYPE);
1449 }
1450 {
1451 boolean synPredMatched30 = false;
1452 if (((LA(1)==LITERAL_extends||LA(1)==LITERAL_super) && (LA(2)==IDENT))) {
1453 int _m30 = mark();
1454 synPredMatched30 = true;
1455 inputState.guessing++;
1456 try {
1457 {
1458 switch ( LA(1)) {
1459 case LITERAL_extends:
1460 {
1461 match(LITERAL_extends);
1462 break;
1463 }
1464 case LITERAL_super:
1465 {
1466 match(LITERAL_super);
1467 break;
1468 }
1469 default:
1470 {
1471 throw new NoViableAltException(LT(1), getFilename());
1472 }
1473 }
1474 }
1475 }
1476 catch (RecognitionException pe) {
1477 synPredMatched30 = false;
1478 }
1479 rewind(_m30);
1480 inputState.guessing--;
1481 }
1482 if ( synPredMatched30 ) {
1483 typeArgumentBounds();
1484 astFactory.addASTChild(currentAST, returnAST);
1485 }
1486 else if ((_tokenSet_8.member(LA(1))) && (_tokenSet_9.member(LA(2)))) {
1487 }
1488 else {
1489 throw new NoViableAltException(LT(1), getFilename());
1490 }
1491
1492 }
1493 wildcardType_AST = (AST)currentAST.root;
1494 returnAST = wildcardType_AST;
1495 }
1496
1497 public final void typeArgumentBounds() throws RecognitionException, TokenStreamException {
1498
1499 returnAST = null;
1500 ASTPair currentAST = new ASTPair();
1501 AST typeArgumentBounds_AST = null;
1502 boolean isUpperBounds = false; Token first = LT(1);
1503
1504 {
1505 switch ( LA(1)) {
1506 case LITERAL_extends:
1507 {
1508 match(LITERAL_extends);
1509 if ( inputState.guessing==0 ) {
1510 isUpperBounds=true;
1511 }
1512 break;
1513 }
1514 case LITERAL_super:
1515 {
1516 match(LITERAL_super);
1517 break;
1518 }
1519 default:
1520 {
1521 throw new NoViableAltException(LT(1), getFilename());
1522 }
1523 }
1524 }
1525 classOrInterfaceType(false);
1526 astFactory.addASTChild(currentAST, returnAST);
1527 if ( inputState.guessing==0 ) {
1528 typeArgumentBounds_AST = (AST)currentAST.root;
1529
1530 if (isUpperBounds)
1531 {
1532 typeArgumentBounds_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE_UPPER_BOUNDS,"TYPE_UPPER_BOUNDS",first,LT(1))).add(typeArgumentBounds_AST));
1533 }
1534 else
1535 {
1536 typeArgumentBounds_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE_LOWER_BOUNDS,"TYPE_LOWER_BOUNDS",first,LT(1))).add(typeArgumentBounds_AST));
1537 }
1538
1539 currentAST.root = typeArgumentBounds_AST;
1540 currentAST.child = typeArgumentBounds_AST!=null &&typeArgumentBounds_AST.getFirstChild()!=null ?
1541 typeArgumentBounds_AST.getFirstChild() : typeArgumentBounds_AST;
1542 currentAST.advanceChildToEnd();
1543 }
1544 typeArgumentBounds_AST = (AST)currentAST.root;
1545 returnAST = typeArgumentBounds_AST;
1546 }
1547
1548 protected final void typeArgumentsOrParametersEnd() throws RecognitionException, TokenStreamException {
1549
1550 returnAST = null;
1551 ASTPair currentAST = new ASTPair();
1552 AST typeArgumentsOrParametersEnd_AST = null;
1553
1554 switch ( LA(1)) {
1555 case GT:
1556 {
1557 match(GT);
1558 if ( inputState.guessing==0 ) {
1559 ltCounter-=1;
1560 }
1561 typeArgumentsOrParametersEnd_AST = (AST)currentAST.root;
1562 break;
1563 }
1564 case SR:
1565 {
1566 match(SR);
1567 if ( inputState.guessing==0 ) {
1568 ltCounter-=2;
1569 }
1570 typeArgumentsOrParametersEnd_AST = (AST)currentAST.root;
1571 break;
1572 }
1573 case BSR:
1574 {
1575 match(BSR);
1576 if ( inputState.guessing==0 ) {
1577 ltCounter-=3;
1578 }
1579 typeArgumentsOrParametersEnd_AST = (AST)currentAST.root;
1580 break;
1581 }
1582 default:
1583 {
1584 throw new NoViableAltException(LT(1), getFilename());
1585 }
1586 }
1587 returnAST = typeArgumentsOrParametersEnd_AST;
1588 }
1589
1590 public final void builtInType() throws RecognitionException, TokenStreamException {
1591
1592 returnAST = null;
1593 ASTPair currentAST = new ASTPair();
1594 AST builtInType_AST = null;
1595
1596 switch ( LA(1)) {
1597 case LITERAL_void:
1598 {
1599 AST tmp37_AST = null;
1600 tmp37_AST = astFactory.create(LT(1));
1601 astFactory.addASTChild(currentAST, tmp37_AST);
1602 match(LITERAL_void);
1603 builtInType_AST = (AST)currentAST.root;
1604 break;
1605 }
1606 case LITERAL_boolean:
1607 {
1608 AST tmp38_AST = null;
1609 tmp38_AST = astFactory.create(LT(1));
1610 astFactory.addASTChild(currentAST, tmp38_AST);
1611 match(LITERAL_boolean);
1612 builtInType_AST = (AST)currentAST.root;
1613 break;
1614 }
1615 case LITERAL_byte:
1616 {
1617 AST tmp39_AST = null;
1618 tmp39_AST = astFactory.create(LT(1));
1619 astFactory.addASTChild(currentAST, tmp39_AST);
1620 match(LITERAL_byte);
1621 builtInType_AST = (AST)currentAST.root;
1622 break;
1623 }
1624 case LITERAL_char:
1625 {
1626 AST tmp40_AST = null;
1627 tmp40_AST = astFactory.create(LT(1));
1628 astFactory.addASTChild(currentAST, tmp40_AST);
1629 match(LITERAL_char);
1630 builtInType_AST = (AST)currentAST.root;
1631 break;
1632 }
1633 case LITERAL_short:
1634 {
1635 AST tmp41_AST = null;
1636 tmp41_AST = astFactory.create(LT(1));
1637 astFactory.addASTChild(currentAST, tmp41_AST);
1638 match(LITERAL_short);
1639 builtInType_AST = (AST)currentAST.root;
1640 break;
1641 }
1642 case LITERAL_int:
1643 {
1644 AST tmp42_AST = null;
1645 tmp42_AST = astFactory.create(LT(1));
1646 astFactory.addASTChild(currentAST, tmp42_AST);
1647 match(LITERAL_int);
1648 builtInType_AST = (AST)currentAST.root;
1649 break;
1650 }
1651 case LITERAL_float:
1652 {
1653 AST tmp43_AST = null;
1654 tmp43_AST = astFactory.create(LT(1));
1655 astFactory.addASTChild(currentAST, tmp43_AST);
1656 match(LITERAL_float);
1657 builtInType_AST = (AST)currentAST.root;
1658 break;
1659 }
1660 case LITERAL_long:
1661 {
1662 AST tmp44_AST = null;
1663 tmp44_AST = astFactory.create(LT(1));
1664 astFactory.addASTChild(currentAST, tmp44_AST);
1665 match(LITERAL_long);
1666 builtInType_AST = (AST)currentAST.root;
1667 break;
1668 }
1669 case LITERAL_double:
1670 {
1671 AST tmp45_AST = null;
1672 tmp45_AST = astFactory.create(LT(1));
1673 astFactory.addASTChild(currentAST, tmp45_AST);
1674 match(LITERAL_double);
1675 builtInType_AST = (AST)currentAST.root;
1676 break;
1677 }
1678 default:
1679 {
1680 throw new NoViableAltException(LT(1), getFilename());
1681 }
1682 }
1683 returnAST = builtInType_AST;
1684 }
1685
1686 public final void type() throws RecognitionException, TokenStreamException {
1687
1688 returnAST = null;
1689 ASTPair currentAST = new ASTPair();
1690 AST type_AST = null;
1691
1692 switch ( LA(1)) {
1693 case IDENT:
1694 {
1695 classOrInterfaceType(false);
1696 astFactory.addASTChild(currentAST, returnAST);
1697 type_AST = (AST)currentAST.root;
1698 break;
1699 }
1700 case LITERAL_void:
1701 case LITERAL_boolean:
1702 case LITERAL_byte:
1703 case LITERAL_char:
1704 case LITERAL_short:
1705 case LITERAL_int:
1706 case LITERAL_float:
1707 case LITERAL_long:
1708 case LITERAL_double:
1709 {
1710 builtInType();
1711 astFactory.addASTChild(currentAST, returnAST);
1712 type_AST = (AST)currentAST.root;
1713 break;
1714 }
1715 default:
1716 {
1717 throw new NoViableAltException(LT(1), getFilename());
1718 }
1719 }
1720 returnAST = type_AST;
1721 }
1722
1723 public final void modifier() throws RecognitionException, TokenStreamException {
1724
1725 returnAST = null;
1726 ASTPair currentAST = new ASTPair();
1727 AST modifier_AST = null;
1728
1729 switch ( LA(1)) {
1730 case LITERAL_private:
1731 {
1732 AST tmp46_AST = null;
1733 tmp46_AST = astFactory.create(LT(1));
1734 astFactory.addASTChild(currentAST, tmp46_AST);
1735 match(LITERAL_private);
1736 modifier_AST = (AST)currentAST.root;
1737 break;
1738 }
1739 case LITERAL_public:
1740 {
1741 AST tmp47_AST = null;
1742 tmp47_AST = astFactory.create(LT(1));
1743 astFactory.addASTChild(currentAST, tmp47_AST);
1744 match(LITERAL_public);
1745 modifier_AST = (AST)currentAST.root;
1746 break;
1747 }
1748 case LITERAL_protected:
1749 {
1750 AST tmp48_AST = null;
1751 tmp48_AST = astFactory.create(LT(1));
1752 astFactory.addASTChild(currentAST, tmp48_AST);
1753 match(LITERAL_protected);
1754 modifier_AST = (AST)currentAST.root;
1755 break;
1756 }
1757 case LITERAL_static:
1758 {
1759 AST tmp49_AST = null;
1760 tmp49_AST = astFactory.create(LT(1));
1761 astFactory.addASTChild(currentAST, tmp49_AST);
1762 match(LITERAL_static);
1763 modifier_AST = (AST)currentAST.root;
1764 break;
1765 }
1766 case LITERAL_transient:
1767 {
1768 AST tmp50_AST = null;
1769 tmp50_AST = astFactory.create(LT(1));
1770 astFactory.addASTChild(currentAST, tmp50_AST);
1771 match(LITERAL_transient);
1772 modifier_AST = (AST)currentAST.root;
1773 break;
1774 }
1775 case FINAL:
1776 {
1777 AST tmp51_AST = null;
1778 tmp51_AST = astFactory.create(LT(1));
1779 astFactory.addASTChild(currentAST, tmp51_AST);
1780 match(FINAL);
1781 modifier_AST = (AST)currentAST.root;
1782 break;
1783 }
1784 case ABSTRACT:
1785 {
1786 AST tmp52_AST = null;
1787 tmp52_AST = astFactory.create(LT(1));
1788 astFactory.addASTChild(currentAST, tmp52_AST);
1789 match(ABSTRACT);
1790 modifier_AST = (AST)currentAST.root;
1791 break;
1792 }
1793 case LITERAL_native:
1794 {
1795 AST tmp53_AST = null;
1796 tmp53_AST = astFactory.create(LT(1));
1797 astFactory.addASTChild(currentAST, tmp53_AST);
1798 match(LITERAL_native);
1799 modifier_AST = (AST)currentAST.root;
1800 break;
1801 }
1802 case LITERAL_threadsafe:
1803 {
1804 AST tmp54_AST = null;
1805 tmp54_AST = astFactory.create(LT(1));
1806 astFactory.addASTChild(currentAST, tmp54_AST);
1807 match(LITERAL_threadsafe);
1808 modifier_AST = (AST)currentAST.root;
1809 break;
1810 }
1811 case LITERAL_synchronized:
1812 {
1813 AST tmp55_AST = null;
1814 tmp55_AST = astFactory.create(LT(1));
1815 astFactory.addASTChild(currentAST, tmp55_AST);
1816 match(LITERAL_synchronized);
1817 modifier_AST = (AST)currentAST.root;
1818 break;
1819 }
1820 case LITERAL_volatile:
1821 {
1822 AST tmp56_AST = null;
1823 tmp56_AST = astFactory.create(LT(1));
1824 astFactory.addASTChild(currentAST, tmp56_AST);
1825 match(LITERAL_volatile);
1826 modifier_AST = (AST)currentAST.root;
1827 break;
1828 }
1829 case STRICTFP:
1830 {
1831 AST tmp57_AST = null;
1832 tmp57_AST = astFactory.create(LT(1));
1833 astFactory.addASTChild(currentAST, tmp57_AST);
1834 match(STRICTFP);
1835 modifier_AST = (AST)currentAST.root;
1836 break;
1837 }
1838 default:
1839 {
1840 throw new NoViableAltException(LT(1), getFilename());
1841 }
1842 }
1843 returnAST = modifier_AST;
1844 }
1845
1846 public final void annotation() throws RecognitionException, TokenStreamException {
1847
1848 returnAST = null;
1849 ASTPair currentAST = new ASTPair();
1850 AST annotation_AST = null;
1851 AST i_AST = null;
1852 AST args_AST = null;
1853 Token first = LT(1);
1854
1855 match(AT);
1856 identifier();
1857 i_AST = (AST)returnAST;
1858 {
1859 switch ( LA(1)) {
1860 case LPAREN:
1861 {
1862 match(LPAREN);
1863 {
1864 switch ( LA(1)) {
1865 case IDENT:
1866 case LITERAL_super:
1867 case LT:
1868 case LITERAL_void:
1869 case LITERAL_boolean:
1870 case LITERAL_byte:
1871 case LITERAL_char:
1872 case LITERAL_short:
1873 case LITERAL_int:
1874 case LITERAL_float:
1875 case LITERAL_long:
1876 case LITERAL_double:
1877 case AT:
1878 case LPAREN:
1879 case LCURLY:
1880 case LITERAL_this:
1881 case PLUS:
1882 case MINUS:
1883 case INC:
1884 case DEC:
1885 case BNOT:
1886 case LNOT:
1887 case LITERAL_true:
1888 case LITERAL_false:
1889 case LITERAL_null:
1890 case LITERAL_new:
1891 case NUM_INT:
1892 case STRING_LITERAL:
1893 case NUM_FLOAT:
1894 case NUM_LONG:
1895 case NUM_DOUBLE:
1896 {
1897 annotationArguments();
1898 args_AST = (AST)returnAST;
1899 break;
1900 }
1901 case RPAREN:
1902 {
1903 break;
1904 }
1905 default:
1906 {
1907 throw new NoViableAltException(LT(1), getFilename());
1908 }
1909 }
1910 }
1911 match(RPAREN);
1912 break;
1913 }
1914 case FINAL:
1915 case ABSTRACT:
1916 case STRICTFP:
1917 case LITERAL_package:/package-summary.html">g> LITERAL_package:
1918 case SEMI:
1919 case LITERAL_static:
1920 case IDENT:
1921 case LT:
1922 case COMMA:
1923 case LITERAL_void:
1924 case LITERAL_boolean:
1925 case LITERAL_byte:
1926 case LITERAL_char:
1927 case LITERAL_short:
1928 case LITERAL_int:
1929 case LITERAL_float:
1930 case LITERAL_long:
1931 case LITERAL_double:
1932 case LITERAL_private:
1933 case LITERAL_public:
1934 case LITERAL_protected:
1935 case LITERAL_transient:
1936 case LITERAL_native:
1937 case LITERAL_threadsafe:
1938 case LITERAL_synchronized:
1939 case LITERAL_volatile:
1940 case AT:
1941 case RPAREN:
1942 case RCURLY:
1943 case LITERAL_class:
1944 case LITERAL_interface:
1945 case LITERAL_enum:
1946 {
1947 break;
1948 }
1949 default:
1950 {
1951 throw new NoViableAltException(LT(1), getFilename());
1952 }
1953 }
1954 }
1955 if ( inputState.guessing==0 ) {
1956 annotation_AST = (AST)currentAST.root;
1957 annotation_AST = (AST)astFactory.make( (new ASTArray(3)).add(create(ANNOTATION,"ANNOTATION",first,LT(1))).add(i_AST).add(args_AST));
1958 currentAST.root = annotation_AST;
1959 currentAST.child = annotation_AST!=null &&annotation_AST.getFirstChild()!=null ?
1960 annotation_AST.getFirstChild() : annotation_AST;
1961 currentAST.advanceChildToEnd();
1962 }
1963 returnAST = annotation_AST;
1964 }
1965
1966 public final void annotationArguments() throws RecognitionException, TokenStreamException {
1967
1968 returnAST = null;
1969 ASTPair currentAST = new ASTPair();
1970 AST annotationArguments_AST = null;
1971
1972 if ((_tokenSet_10.member(LA(1))) && (_tokenSet_11.member(LA(2)))) {
1973 annotationMemberValueInitializer();
1974 astFactory.addASTChild(currentAST, returnAST);
1975 annotationArguments_AST = (AST)currentAST.root;
1976 }
1977 else if ((LA(1)==IDENT) && (LA(2)==ASSIGN)) {
1978 anntotationMemberValuePairs();
1979 astFactory.addASTChild(currentAST, returnAST);
1980 annotationArguments_AST = (AST)currentAST.root;
1981 }
1982 else {
1983 throw new NoViableAltException(LT(1), getFilename());
1984 }
1985
1986 returnAST = annotationArguments_AST;
1987 }
1988
1989 public final void annotationMemberValueInitializer() throws RecognitionException, TokenStreamException {
1990
1991 returnAST = null;
1992 ASTPair currentAST = new ASTPair();
1993 AST annotationMemberValueInitializer_AST = null;
1994
1995 switch ( LA(1)) {
1996 case IDENT:
1997 case LITERAL_super:
1998 case LT:
1999 case LITERAL_void:
2000 case LITERAL_boolean:
2001 case LITERAL_byte:
2002 case LITERAL_char:
2003 case LITERAL_short:
2004 case LITERAL_int:
2005 case LITERAL_float:
2006 case LITERAL_long:
2007 case LITERAL_double:
2008 case LPAREN:
2009 case LITERAL_this:
2010 case PLUS:
2011 case MINUS:
2012 case INC:
2013 case DEC:
2014 case BNOT:
2015 case LNOT:
2016 case LITERAL_true:
2017 case LITERAL_false:
2018 case LITERAL_null:
2019 case LITERAL_new:
2020 case NUM_INT:
2021 case STRING_LITERAL:
2022 case NUM_FLOAT:
2023 case NUM_LONG:
2024 case NUM_DOUBLE:
2025 {
2026 conditionalExpression();
2027 astFactory.addASTChild(currentAST, returnAST);
2028 annotationMemberValueInitializer_AST = (AST)currentAST.root;
2029 break;
2030 }
2031 case AT:
2032 {
2033 annotation();
2034 astFactory.addASTChild(currentAST, returnAST);
2035 annotationMemberValueInitializer_AST = (AST)currentAST.root;
2036 break;
2037 }
2038 case LCURLY:
2039 {
2040 annotationMemberArrayInitializer();
2041 astFactory.addASTChild(currentAST, returnAST);
2042 annotationMemberValueInitializer_AST = (AST)currentAST.root;
2043 break;
2044 }
2045 default:
2046 {
2047 throw new NoViableAltException(LT(1), getFilename());
2048 }
2049 }
2050 returnAST = annotationMemberValueInitializer_AST;
2051 }
2052
2053 public final void anntotationMemberValuePairs() throws RecognitionException, TokenStreamException {
2054
2055 returnAST = null;
2056 ASTPair currentAST = new ASTPair();
2057 AST anntotationMemberValuePairs_AST = null;
2058
2059 annotationMemberValuePair();
2060 astFactory.addASTChild(currentAST, returnAST);
2061 {
2062 _loop66:
2063 do {
2064 if ((LA(1)==COMMA)) {
2065 match(COMMA);
2066 annotationMemberValuePair();
2067 astFactory.addASTChild(currentAST, returnAST);
2068 }
2069 else {
2070 break _loop66;
2071 }
2072
2073 } while (true);
2074 }
2075 anntotationMemberValuePairs_AST = (AST)currentAST.root;
2076 returnAST = anntotationMemberValuePairs_AST;
2077 }
2078
2079 public final void annotationMemberValuePair() throws RecognitionException, TokenStreamException {
2080
2081 returnAST = null;
2082 ASTPair currentAST = new ASTPair();
2083 AST annotationMemberValuePair_AST = null;
2084 Token i = null;
2085 AST i_AST = null;
2086 AST v_AST = null;
2087 Token first = LT(1);
2088
2089 i = LT(1);
2090 i_AST = astFactory.create(i);
2091 match(IDENT);
2092 match(ASSIGN);
2093 annotationMemberValueInitializer();
2094 v_AST = (AST)returnAST;
2095 if ( inputState.guessing==0 ) {
2096 annotationMemberValuePair_AST = (AST)currentAST.root;
2097 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));
2098 currentAST.root = annotationMemberValuePair_AST;
2099 currentAST.child = annotationMemberValuePair_AST!=null &&annotationMemberValuePair_AST.getFirstChild()!=null ?
2100 annotationMemberValuePair_AST.getFirstChild() : annotationMemberValuePair_AST;
2101 currentAST.advanceChildToEnd();
2102 }
2103 returnAST = annotationMemberValuePair_AST;
2104 }
2105
2106 public final void conditionalExpression() throws RecognitionException, TokenStreamException {
2107
2108 returnAST = null;
2109 ASTPair currentAST = new ASTPair();
2110 AST conditionalExpression_AST = null;
2111
2112 logicalOrExpression();
2113 astFactory.addASTChild(currentAST, returnAST);
2114 {
2115 switch ( LA(1)) {
2116 case QUESTION:
2117 {
2118 AST tmp63_AST = null;
2119 tmp63_AST = astFactory.create(LT(1));
2120 astFactory.makeASTRoot(currentAST, tmp63_AST);
2121 match(QUESTION);
2122 assignmentExpression();
2123 astFactory.addASTChild(currentAST, returnAST);
2124 match(COLON);
2125 conditionalExpression();
2126 astFactory.addASTChild(currentAST, returnAST);
2127 break;
2128 }
2129 case SEMI:
2130 case RBRACK:
2131 case COMMA:
2132 case RPAREN:
2133 case ASSIGN:
2134 case RCURLY:
2135 case COLON:
2136 case PLUS_ASSIGN:
2137 case MINUS_ASSIGN:
2138 case STAR_ASSIGN:
2139 case DIV_ASSIGN:
2140 case MOD_ASSIGN:
2141 case SR_ASSIGN:
2142 case BSR_ASSIGN:
2143 case SL_ASSIGN:
2144 case BAND_ASSIGN:
2145 case BXOR_ASSIGN:
2146 case BOR_ASSIGN:
2147 {
2148 break;
2149 }
2150 default:
2151 {
2152 throw new NoViableAltException(LT(1), getFilename());
2153 }
2154 }
2155 }
2156 conditionalExpression_AST = (AST)currentAST.root;
2157 returnAST = conditionalExpression_AST;
2158 }
2159
2160 public final void annotationMemberArrayInitializer() throws RecognitionException, TokenStreamException {
2161
2162 returnAST = null;
2163 ASTPair currentAST = new ASTPair();
2164 AST annotationMemberArrayInitializer_AST = null;
2165 Token lc = null;
2166 AST lc_AST = null;
2167
2168 lc = LT(1);
2169 lc_AST = astFactory.create(lc);
2170 astFactory.makeASTRoot(currentAST, lc_AST);
2171 match(LCURLY);
2172 if ( inputState.guessing==0 ) {
2173 lc_AST.setType(ANNOTATION_ARRAY_INIT);
2174 }
2175 {
2176 switch ( LA(1)) {
2177 case IDENT:
2178 case LITERAL_super:
2179 case LT:
2180 case LITERAL_void:
2181 case LITERAL_boolean:
2182 case LITERAL_byte:
2183 case LITERAL_char:
2184 case LITERAL_short:
2185 case LITERAL_int:
2186 case LITERAL_float:
2187 case LITERAL_long:
2188 case LITERAL_double:
2189 case AT:
2190 case LPAREN:
2191 case LITERAL_this:
2192 case PLUS:
2193 case MINUS:
2194 case INC:
2195 case DEC:
2196 case BNOT:
2197 case LNOT:
2198 case LITERAL_true:
2199 case LITERAL_false:
2200 case LITERAL_null:
2201 case LITERAL_new:
2202 case NUM_INT:
2203 case STRING_LITERAL:
2204 case NUM_FLOAT:
2205 case NUM_LONG:
2206 case NUM_DOUBLE:
2207 {
2208 annotationMemberArrayValueInitializer();
2209 astFactory.addASTChild(currentAST, returnAST);
2210 {
2211 _loop72:
2212 do {
2213 if ((LA(1)==COMMA) && (_tokenSet_12.member(LA(2)))) {
2214 match(COMMA);
2215 annotationMemberArrayValueInitializer();
2216 astFactory.addASTChild(currentAST, returnAST);
2217 }
2218 else {
2219 break _loop72;
2220 }
2221
2222 } while (true);
2223 }
2224 {
2225 switch ( LA(1)) {
2226 case COMMA:
2227 {
2228 match(COMMA);
2229 break;
2230 }
2231 case RCURLY:
2232 {
2233 break;
2234 }
2235 default:
2236 {
2237 throw new NoViableAltException(LT(1), getFilename());
2238 }
2239 }
2240 }
2241 break;
2242 }
2243 case RCURLY:
2244 {
2245 break;
2246 }
2247 default:
2248 {
2249 throw new NoViableAltException(LT(1), getFilename());
2250 }
2251 }
2252 }
2253 match(RCURLY);
2254 annotationMemberArrayInitializer_AST = (AST)currentAST.root;
2255 returnAST = annotationMemberArrayInitializer_AST;
2256 }
2257
2258 public final void annotationMemberArrayValueInitializer() throws RecognitionException, TokenStreamException {
2259
2260 returnAST = null;
2261 ASTPair currentAST = new ASTPair();
2262 AST annotationMemberArrayValueInitializer_AST = null;
2263
2264 switch ( LA(1)) {
2265 case IDENT:
2266 case LITERAL_super:
2267 case LT:
2268 case LITERAL_void:
2269 case LITERAL_boolean:
2270 case LITERAL_byte:
2271 case LITERAL_char:
2272 case LITERAL_short:
2273 case LITERAL_int:
2274 case LITERAL_float:
2275 case LITERAL_long:
2276 case LITERAL_double:
2277 case LPAREN:
2278 case LITERAL_this:
2279 case PLUS:
2280 case MINUS:
2281 case INC:
2282 case DEC:
2283 case BNOT:
2284 case LNOT:
2285 case LITERAL_true:
2286 case LITERAL_false:
2287 case LITERAL_null:
2288 case LITERAL_new:
2289 case NUM_INT:
2290 case STRING_LITERAL:
2291 case NUM_FLOAT:
2292 case NUM_LONG:
2293 case NUM_DOUBLE:
2294 {
2295 conditionalExpression();
2296 astFactory.addASTChild(currentAST, returnAST);
2297 annotationMemberArrayValueInitializer_AST = (AST)currentAST.root;
2298 break;
2299 }
2300 case AT:
2301 {
2302 annotation();
2303 astFactory.addASTChild(currentAST, returnAST);
2304 annotationMemberArrayValueInitializer_AST = (AST)currentAST.root;
2305 break;
2306 }
2307 default:
2308 {
2309 throw new NoViableAltException(LT(1), getFilename());
2310 }
2311 }
2312 returnAST = annotationMemberArrayValueInitializer_AST;
2313 }
2314
2315 public final void superClassClause() throws RecognitionException, TokenStreamException {
2316
2317 returnAST = null;
2318 ASTPair currentAST = new ASTPair();
2319 AST superClassClause_AST = null;
2320 AST c_AST = null;
2321 Token first = LT(1);
2322
2323 {
2324 switch ( LA(1)) {
2325 case LITERAL_extends:
2326 {
2327 match(LITERAL_extends);
2328 classOrInterfaceType(false);
2329 c_AST = (AST)returnAST;
2330 break;
2331 }
2332 case LCURLY:
2333 case LITERAL_implements:
2334 {
2335 break;
2336 }
2337 default:
2338 {
2339 throw new NoViableAltException(LT(1), getFilename());
2340 }
2341 }
2342 }
2343 if ( inputState.guessing==0 ) {
2344 superClassClause_AST = (AST)currentAST.root;
2345 superClassClause_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(EXTENDS_CLAUSE,"EXTENDS_CLAUSE",first,LT(1))).add(c_AST));
2346 currentAST.root = superClassClause_AST;
2347 currentAST.child = superClassClause_AST!=null &&superClassClause_AST.getFirstChild()!=null ?
2348 superClassClause_AST.getFirstChild() : superClassClause_AST;
2349 currentAST.advanceChildToEnd();
2350 }
2351 returnAST = superClassClause_AST;
2352 }
2353
2354 public final void typeParameters() throws RecognitionException, TokenStreamException {
2355
2356 returnAST = null;
2357 ASTPair currentAST = new ASTPair();
2358 AST typeParameters_AST = null;
2359 int currentLtLevel = 0; Token first = LT(1);
2360
2361 if ( inputState.guessing==0 ) {
2362 currentLtLevel = ltCounter;
2363 }
2364 match(LT);
2365 if ( inputState.guessing==0 ) {
2366 ltCounter++;
2367 }
2368 typeParameter();
2369 astFactory.addASTChild(currentAST, returnAST);
2370 {
2371 _loop85:
2372 do {
2373 if ((LA(1)==COMMA)) {
2374 match(COMMA);
2375 typeParameter();
2376 astFactory.addASTChild(currentAST, returnAST);
2377 }
2378 else {
2379 break _loop85;
2380 }
2381
2382 } while (true);
2383 }
2384 {
2385 switch ( LA(1)) {
2386 case GT:
2387 case SR:
2388 case BSR:
2389 {
2390 typeArgumentsOrParametersEnd();
2391 astFactory.addASTChild(currentAST, returnAST);
2392 break;
2393 }
2394 case IDENT:
2395 case LITERAL_extends:
2396 case LITERAL_void:
2397 case LITERAL_boolean:
2398 case LITERAL_byte:
2399 case LITERAL_char:
2400 case LITERAL_short:
2401 case LITERAL_int:
2402 case LITERAL_float:
2403 case LITERAL_long:
2404 case LITERAL_double:
2405 case LCURLY:
2406 case LITERAL_implements:
2407 {
2408 break;
2409 }
2410 default:
2411 {
2412 throw new NoViableAltException(LT(1), getFilename());
2413 }
2414 }
2415 }
2416 if (!((currentLtLevel != 0) || ltCounter == currentLtLevel))
2417 throw new SemanticException("(currentLtLevel != 0) || ltCounter == currentLtLevel");
2418 if ( inputState.guessing==0 ) {
2419 typeParameters_AST = (AST)currentAST.root;
2420 typeParameters_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE_PARAMETERS,"TYPE_PARAMETERS",first,LT(1))).add(typeParameters_AST));
2421 currentAST.root = typeParameters_AST;
2422 currentAST.child = typeParameters_AST!=null &&typeParameters_AST.getFirstChild()!=null ?
2423 typeParameters_AST.getFirstChild() : typeParameters_AST;
2424 currentAST.advanceChildToEnd();
2425 }
2426 typeParameters_AST = (AST)currentAST.root;
2427 returnAST = typeParameters_AST;
2428 }
2429
2430 public final void implementsClause() throws RecognitionException, TokenStreamException {
2431
2432 returnAST = null;
2433 ASTPair currentAST = new ASTPair();
2434 AST implementsClause_AST = null;
2435 Token i = null;
2436 AST i_AST = null;
2437 Token first = LT(1);
2438
2439 {
2440 switch ( LA(1)) {
2441 case LITERAL_implements:
2442 {
2443 i = LT(1);
2444 i_AST = astFactory.create(i);
2445 match(LITERAL_implements);
2446 classOrInterfaceType(false);
2447 astFactory.addASTChild(currentAST, returnAST);
2448 {
2449 _loop133:
2450 do {
2451 if ((LA(1)==COMMA)) {
2452 match(COMMA);
2453 classOrInterfaceType(false);
2454 astFactory.addASTChild(currentAST, returnAST);
2455 }
2456 else {
2457 break _loop133;
2458 }
2459
2460 } while (true);
2461 }
2462 break;
2463 }
2464 case LCURLY:
2465 {
2466 break;
2467 }
2468 default:
2469 {
2470 throw new NoViableAltException(LT(1), getFilename());
2471 }
2472 }
2473 }
2474 if ( inputState.guessing==0 ) {
2475 implementsClause_AST = (AST)currentAST.root;
2476 implementsClause_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(IMPLEMENTS_CLAUSE,"IMPLEMENTS_CLAUSE",first,LT(1))).add(implementsClause_AST));
2477 currentAST.root = implementsClause_AST;
2478 currentAST.child = implementsClause_AST!=null &&implementsClause_AST.getFirstChild()!=null ?
2479 implementsClause_AST.getFirstChild() : implementsClause_AST;
2480 currentAST.advanceChildToEnd();
2481 }
2482 implementsClause_AST = (AST)currentAST.root;
2483 returnAST = implementsClause_AST;
2484 }
2485
2486 public final void classBlock() throws RecognitionException, TokenStreamException {
2487
2488 returnAST = null;
2489 ASTPair currentAST = new ASTPair();
2490 AST classBlock_AST = null;
2491
2492 match(LCURLY);
2493 {
2494 _loop95:
2495 do {
2496 switch ( LA(1)) {
2497 case FINAL:
2498 case ABSTRACT:
2499 case STRICTFP:
2500 case LITERAL_static:
2501 case IDENT:
2502 case LT:
2503 case LITERAL_void:
2504 case LITERAL_boolean:
2505 case LITERAL_byte:
2506 case LITERAL_char:
2507 case LITERAL_short:
2508 case LITERAL_int:
2509 case LITERAL_float:
2510 case LITERAL_long:
2511 case LITERAL_double:
2512 case LITERAL_private:
2513 case LITERAL_public:
2514 case LITERAL_protected:
2515 case LITERAL_transient:
2516 case LITERAL_native:
2517 case LITERAL_threadsafe:
2518 case LITERAL_synchronized:
2519 case LITERAL_volatile:
2520 case AT:
2521 case LCURLY:
2522 case LITERAL_class:
2523 case LITERAL_interface:
2524 case LITERAL_enum:
2525 {
2526 classField();
2527 astFactory.addASTChild(currentAST, returnAST);
2528 break;
2529 }
2530 case SEMI:
2531 {
2532 match(SEMI);
2533 break;
2534 }
2535 default:
2536 {
2537 break _loop95;
2538 }
2539 }
2540 } while (true);
2541 }
2542 match(RCURLY);
2543 if ( inputState.guessing==0 ) {
2544 classBlock_AST = (AST)currentAST.root;
2545 classBlock_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(OBJBLOCK,"OBJBLOCK")).add(classBlock_AST));
2546 currentAST.root = classBlock_AST;
2547 currentAST.child = classBlock_AST!=null &&classBlock_AST.getFirstChild()!=null ?
2548 classBlock_AST.getFirstChild() : classBlock_AST;
2549 currentAST.advanceChildToEnd();
2550 }
2551 classBlock_AST = (AST)currentAST.root;
2552 returnAST = classBlock_AST;
2553 }
2554
2555 public final void interfaceExtends() throws RecognitionException, TokenStreamException {
2556
2557 returnAST = null;
2558 ASTPair currentAST = new ASTPair();
2559 AST interfaceExtends_AST = null;
2560 Token e = null;
2561 AST e_AST = null;
2562 Token first = LT(1);
2563
2564 {
2565 switch ( LA(1)) {
2566 case LITERAL_extends:
2567 {
2568 e = LT(1);
2569 e_AST = astFactory.create(e);
2570 match(LITERAL_extends);
2571 classOrInterfaceType(false);
2572 astFactory.addASTChild(currentAST, returnAST);
2573 {
2574 _loop129:
2575 do {
2576 if ((LA(1)==COMMA)) {
2577 match(COMMA);
2578 classOrInterfaceType(false);
2579 astFactory.addASTChild(currentAST, returnAST);
2580 }
2581 else {
2582 break _loop129;
2583 }
2584
2585 } while (true);
2586 }
2587 break;
2588 }
2589 case LCURLY:
2590 {
2591 break;
2592 }
2593 default:
2594 {
2595 throw new NoViableAltException(LT(1), getFilename());
2596 }
2597 }
2598 }
2599 if ( inputState.guessing==0 ) {
2600 interfaceExtends_AST = (AST)currentAST.root;
2601 interfaceExtends_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(EXTENDS_CLAUSE,"EXTENDS_CLAUSE",first,LT(1))).add(interfaceExtends_AST));
2602 currentAST.root = interfaceExtends_AST;
2603 currentAST.child = interfaceExtends_AST!=null &&interfaceExtends_AST.getFirstChild()!=null ?
2604 interfaceExtends_AST.getFirstChild() : interfaceExtends_AST;
2605 currentAST.advanceChildToEnd();
2606 }
2607 interfaceExtends_AST = (AST)currentAST.root;
2608 returnAST = interfaceExtends_AST;
2609 }
2610
2611 public final void interfaceBlock() throws RecognitionException, TokenStreamException {
2612
2613 returnAST = null;
2614 ASTPair currentAST = new ASTPair();
2615 AST interfaceBlock_AST = null;
2616
2617 match(LCURLY);
2618 {
2619 _loop98:
2620 do {
2621 switch ( LA(1)) {
2622 case FINAL:
2623 case ABSTRACT:
2624 case STRICTFP:
2625 case LITERAL_static:
2626 case IDENT:
2627 case LT:
2628 case LITERAL_void:
2629 case LITERAL_boolean:
2630 case LITERAL_byte:
2631 case LITERAL_char:
2632 case LITERAL_short:
2633 case LITERAL_int:
2634 case LITERAL_float:
2635 case LITERAL_long:
2636 case LITERAL_double:
2637 case LITERAL_private:
2638 case LITERAL_public:
2639 case LITERAL_protected:
2640 case LITERAL_transient:
2641 case LITERAL_native:
2642 case LITERAL_threadsafe:
2643 case LITERAL_synchronized:
2644 case LITERAL_volatile:
2645 case AT:
2646 case LITERAL_class:
2647 case LITERAL_interface:
2648 case LITERAL_enum:
2649 {
2650 interfaceField();
2651 astFactory.addASTChild(currentAST, returnAST);
2652 break;
2653 }
2654 case SEMI:
2655 {
2656 match(SEMI);
2657 break;
2658 }
2659 default:
2660 {
2661 break _loop98;
2662 }
2663 }
2664 } while (true);
2665 }
2666 match(RCURLY);
2667 if ( inputState.guessing==0 ) {
2668 interfaceBlock_AST = (AST)currentAST.root;
2669 interfaceBlock_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(OBJBLOCK,"OBJBLOCK")).add(interfaceBlock_AST));
2670 currentAST.root = interfaceBlock_AST;
2671 currentAST.child = interfaceBlock_AST!=null &&interfaceBlock_AST.getFirstChild()!=null ?
2672 interfaceBlock_AST.getFirstChild() : interfaceBlock_AST;
2673 currentAST.advanceChildToEnd();
2674 }
2675 interfaceBlock_AST = (AST)currentAST.root;
2676 returnAST = interfaceBlock_AST;
2677 }
2678
2679 public final void enumBlock() throws RecognitionException, TokenStreamException {
2680
2681 returnAST = null;
2682 ASTPair currentAST = new ASTPair();
2683 AST enumBlock_AST = null;
2684
2685 match(LCURLY);
2686 {
2687 switch ( LA(1)) {
2688 case IDENT:
2689 case AT:
2690 {
2691 enumConstant();
2692 astFactory.addASTChild(currentAST, returnAST);
2693 {
2694 _loop105:
2695 do {
2696 if ((LA(1)==COMMA) && (LA(2)==IDENT||LA(2)==AT)) {
2697 match(COMMA);
2698 enumConstant();
2699 astFactory.addASTChild(currentAST, returnAST);
2700 }
2701 else {
2702 break _loop105;
2703 }
2704
2705 } while (true);
2706 }
2707 {
2708 switch ( LA(1)) {
2709 case COMMA:
2710 {
2711 match(COMMA);
2712 break;
2713 }
2714 case SEMI:
2715 case RCURLY:
2716 {
2717 break;
2718 }
2719 default:
2720 {
2721 throw new NoViableAltException(LT(1), getFilename());
2722 }
2723 }
2724 }
2725 break;
2726 }
2727 case SEMI:
2728 case RCURLY:
2729 {
2730 break;
2731 }
2732 default:
2733 {
2734 throw new NoViableAltException(LT(1), getFilename());
2735 }
2736 }
2737 }
2738 {
2739 switch ( LA(1)) {
2740 case SEMI:
2741 {
2742 match(SEMI);
2743 {
2744 _loop109:
2745 do {
2746 switch ( LA(1)) {
2747 case FINAL:
2748 case ABSTRACT:
2749 case STRICTFP:
2750 case LITERAL_static:
2751 case IDENT:
2752 case LT:
2753 case LITERAL_void:
2754 case LITERAL_boolean:
2755 case LITERAL_byte:
2756 case LITERAL_char:
2757 case LITERAL_short:
2758 case LITERAL_int:
2759 case LITERAL_float:
2760 case LITERAL_long:
2761 case LITERAL_double:
2762 case LITERAL_private:
2763 case LITERAL_public:
2764 case LITERAL_protected:
2765 case LITERAL_transient:
2766 case LITERAL_native:
2767 case LITERAL_threadsafe:
2768 case LITERAL_synchronized:
2769 case LITERAL_volatile:
2770 case AT:
2771 case LCURLY:
2772 case LITERAL_class:
2773 case LITERAL_interface:
2774 case LITERAL_enum:
2775 {
2776 classField();
2777 astFactory.addASTChild(currentAST, returnAST);
2778 break;
2779 }
2780 case SEMI:
2781 {
2782 match(SEMI);
2783 break;
2784 }
2785 default:
2786 {
2787 break _loop109;
2788 }
2789 }
2790 } while (true);
2791 }
2792 break;
2793 }
2794 case RCURLY:
2795 {
2796 break;
2797 }
2798 default:
2799 {
2800 throw new NoViableAltException(LT(1), getFilename());
2801 }
2802 }
2803 }
2804 match(RCURLY);
2805 if ( inputState.guessing==0 ) {
2806 enumBlock_AST = (AST)currentAST.root;
2807 enumBlock_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(OBJBLOCK,"OBJBLOCK")).add(enumBlock_AST));
2808 currentAST.root = enumBlock_AST;
2809 currentAST.child = enumBlock_AST!=null &&enumBlock_AST.getFirstChild()!=null ?
2810 enumBlock_AST.getFirstChild() : enumBlock_AST;
2811 currentAST.advanceChildToEnd();
2812 }
2813 enumBlock_AST = (AST)currentAST.root;
2814 returnAST = enumBlock_AST;
2815 }
2816
2817 public final void annotationBlock() throws RecognitionException, TokenStreamException {
2818
2819 returnAST = null;
2820 ASTPair currentAST = new ASTPair();
2821 AST annotationBlock_AST = null;
2822
2823 match(LCURLY);
2824 {
2825 _loop101:
2826 do {
2827 switch ( LA(1)) {
2828 case FINAL:
2829 case ABSTRACT:
2830 case STRICTFP:
2831 case LITERAL_static:
2832 case IDENT:
2833 case LITERAL_void:
2834 case LITERAL_boolean:
2835 case LITERAL_byte:
2836 case LITERAL_char:
2837 case LITERAL_short:
2838 case LITERAL_int:
2839 case LITERAL_float:
2840 case LITERAL_long:
2841 case LITERAL_double:
2842 case LITERAL_private:
2843 case LITERAL_public:
2844 case LITERAL_protected:
2845 case LITERAL_transient:
2846 case LITERAL_native:
2847 case LITERAL_threadsafe:
2848 case LITERAL_synchronized:
2849 case LITERAL_volatile:
2850 case AT:
2851 case LITERAL_class:
2852 case LITERAL_interface:
2853 case LITERAL_enum:
2854 {
2855 annotationField();
2856 astFactory.addASTChild(currentAST, returnAST);
2857 break;
2858 }
2859 case SEMI:
2860 {
2861 match(SEMI);
2862 break;
2863 }
2864 default:
2865 {
2866 break _loop101;
2867 }
2868 }
2869 } while (true);
2870 }
2871 match(RCURLY);
2872 if ( inputState.guessing==0 ) {
2873 annotationBlock_AST = (AST)currentAST.root;
2874 annotationBlock_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(OBJBLOCK,"OBJBLOCK")).add(annotationBlock_AST));
2875 currentAST.root = annotationBlock_AST;
2876 currentAST.child = annotationBlock_AST!=null &&annotationBlock_AST.getFirstChild()!=null ?
2877 annotationBlock_AST.getFirstChild() : annotationBlock_AST;
2878 currentAST.advanceChildToEnd();
2879 }
2880 annotationBlock_AST = (AST)currentAST.root;
2881 returnAST = annotationBlock_AST;
2882 }
2883
2884 public final void typeParameter() throws RecognitionException, TokenStreamException {
2885
2886 returnAST = null;
2887 ASTPair currentAST = new ASTPair();
2888 AST typeParameter_AST = null;
2889 Token id = null;
2890 AST id_AST = null;
2891 Token first = LT(1);
2892
2893 {
2894 id = LT(1);
2895 id_AST = astFactory.create(id);
2896 astFactory.addASTChild(currentAST, id_AST);
2897 match(IDENT);
2898 }
2899 {
2900 if ((LA(1)==LITERAL_extends) && (LA(2)==IDENT)) {
2901 typeParameterBounds();
2902 astFactory.addASTChild(currentAST, returnAST);
2903 }
2904 else if ((_tokenSet_13.member(LA(1))) && (_tokenSet_14.member(LA(2)))) {
2905 }
2906 else {
2907 throw new NoViableAltException(LT(1), getFilename());
2908 }
2909
2910 }
2911 if ( inputState.guessing==0 ) {
2912 typeParameter_AST = (AST)currentAST.root;
2913 typeParameter_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE_PARAMETER,"TYPE_PARAMETER",first,LT(1))).add(typeParameter_AST));
2914 currentAST.root = typeParameter_AST;
2915 currentAST.child = typeParameter_AST!=null &&typeParameter_AST.getFirstChild()!=null ?
2916 typeParameter_AST.getFirstChild() : typeParameter_AST;
2917 currentAST.advanceChildToEnd();
2918 }
2919 typeParameter_AST = (AST)currentAST.root;
2920 returnAST = typeParameter_AST;
2921 }
2922
2923 public final void typeParameterBounds() throws RecognitionException, TokenStreamException {
2924
2925 returnAST = null;
2926 ASTPair currentAST = new ASTPair();
2927 AST typeParameterBounds_AST = null;
2928 Token first = LT(1);
2929
2930 match(LITERAL_extends);
2931 classOrInterfaceType(false);
2932 astFactory.addASTChild(currentAST, returnAST);
2933 {
2934 _loop92:
2935 do {
2936 if ((LA(1)==BAND)) {
2937 match(BAND);
2938 classOrInterfaceType(false);
2939 astFactory.addASTChild(currentAST, returnAST);
2940 }
2941 else {
2942 break _loop92;
2943 }
2944
2945 } while (true);
2946 }
2947 if ( inputState.guessing==0 ) {
2948 typeParameterBounds_AST = (AST)currentAST.root;
2949 typeParameterBounds_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE_UPPER_BOUNDS,"TYPE_UPPER_BOUNDS",first,LT(1))).add(typeParameterBounds_AST));
2950 currentAST.root = typeParameterBounds_AST;
2951 currentAST.child = typeParameterBounds_AST!=null &&typeParameterBounds_AST.getFirstChild()!=null ?
2952 typeParameterBounds_AST.getFirstChild() : typeParameterBounds_AST;
2953 currentAST.advanceChildToEnd();
2954 }
2955 typeParameterBounds_AST = (AST)currentAST.root;
2956 returnAST = typeParameterBounds_AST;
2957 }
2958
2959 public final void classField() throws RecognitionException, TokenStreamException {
2960
2961 returnAST = null;
2962 ASTPair currentAST = new ASTPair();
2963 AST classField_AST = null;
2964 AST mods_AST = null;
2965 AST td_AST = null;
2966 AST tp_AST = null;
2967 AST h_AST = null;
2968 AST s_AST = null;
2969 AST t_AST = null;
2970 AST param_AST = null;
2971 AST rt_AST = null;
2972 AST tc_AST = null;
2973 AST s2_AST = null;
2974 AST v_AST = null;
2975 AST s3_AST = null;
2976 AST s4_AST = null;
2977 Token first = LT(1);
2978
2979 if ((_tokenSet_15.member(LA(1))) && (_tokenSet_16.member(LA(2)))) {
2980 modifiers();
2981 mods_AST = (AST)returnAST;
2982 {
2983 switch ( LA(1)) {
2984 case AT:
2985 case LITERAL_class:
2986 case LITERAL_interface:
2987 case LITERAL_enum:
2988 {
2989 typeDefinitionInternal(mods_AST);
2990 td_AST = (AST)returnAST;
2991 if ( inputState.guessing==0 ) {
2992 classField_AST = (AST)currentAST.root;
2993 classField_AST = td_AST;
2994 currentAST.root = classField_AST;
2995 currentAST.child = classField_AST!=null &&classField_AST.getFirstChild()!=null ?
2996 classField_AST.getFirstChild() : classField_AST;
2997 currentAST.advanceChildToEnd();
2998 }
2999 break;
3000 }
3001 case IDENT:
3002 case LT:
3003 case LITERAL_void:
3004 case LITERAL_boolean:
3005 case LITERAL_byte:
3006 case LITERAL_char:
3007 case LITERAL_short:
3008 case LITERAL_int:
3009 case LITERAL_float:
3010 case LITERAL_long:
3011 case LITERAL_double:
3012 {
3013 {
3014 switch ( LA(1)) {
3015 case LT:
3016 {
3017 typeParameters();
3018 tp_AST = (AST)returnAST;
3019 break;
3020 }
3021 case IDENT:
3022 case LITERAL_void:
3023 case LITERAL_boolean:
3024 case LITERAL_byte:
3025 case LITERAL_char:
3026 case LITERAL_short:
3027 case LITERAL_int:
3028 case LITERAL_float:
3029 case LITERAL_long:
3030 case LITERAL_double:
3031 {
3032 break;
3033 }
3034 default:
3035 {
3036 throw new NoViableAltException(LT(1), getFilename());
3037 }
3038 }
3039 }
3040 {
3041 if ((LA(1)==IDENT) && (LA(2)==LPAREN)) {
3042 ctorHead();
3043 h_AST = (AST)returnAST;
3044 constructorBody();
3045 s_AST = (AST)returnAST;
3046 if ( inputState.guessing==0 ) {
3047 classField_AST = (AST)currentAST.root;
3048 classField_AST = (AST)astFactory.make( (new ASTArray(5)).add(create(METHOD_DEF,"METHOD_DEF",first,LT(1))).add(mods_AST).add(tp_AST).add(h_AST).add(s_AST));
3049 currentAST.root = classField_AST;
3050 currentAST.child = classField_AST!=null &&classField_AST.getFirstChild()!=null ?
3051 classField_AST.getFirstChild() : classField_AST;
3052 currentAST.advanceChildToEnd();
3053 }
3054 }
3055 else if ((_tokenSet_17.member(LA(1))) && (_tokenSet_18.member(LA(2)))) {
3056 typeSpec(false);
3057 t_AST = (AST)returnAST;
3058 {
3059 if ((LA(1)==IDENT) && (LA(2)==LPAREN)) {
3060 AST tmp90_AST = null;
3061 tmp90_AST = astFactory.create(LT(1));
3062 match(IDENT);
3063 match(LPAREN);
3064 parameterDeclarationList();
3065 param_AST = (AST)returnAST;
3066 match(RPAREN);
3067 declaratorBrackets(t_AST);
3068 rt_AST = (AST)returnAST;
3069 {
3070 switch ( LA(1)) {
3071 case LITERAL_throws:
3072 {
3073 throwsClause();
3074 tc_AST = (AST)returnAST;
3075 break;
3076 }
3077 case SEMI:
3078 case LCURLY:
3079 {
3080 break;
3081 }
3082 default:
3083 {
3084 throw new NoViableAltException(LT(1), getFilename());
3085 }
3086 }
3087 }
3088 {
3089 switch ( LA(1)) {
3090 case LCURLY:
3091 {
3092 compoundStatement();
3093 s2_AST = (AST)returnAST;
3094 break;
3095 }
3096 case SEMI:
3097 {
3098 AST tmp93_AST = null;
3099 tmp93_AST = astFactory.create(LT(1));
3100 match(SEMI);
3101 break;
3102 }
3103 default:
3104 {
3105 throw new NoViableAltException(LT(1), getFilename());
3106 }
3107 }
3108 }
3109 if ( inputState.guessing==0 ) {
3110 classField_AST = (AST)currentAST.root;
3111 classField_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(rt_AST))).add(tmp90_AST).add(param_AST).add(tc_AST).add(s2_AST));
3112 currentAST.root = classField_AST;
3113 currentAST.child = classField_AST!=null &&classField_AST.getFirstChild()!=null ?
3114 classField_AST.getFirstChild() : classField_AST;
3115 currentAST.advanceChildToEnd();
3116 }
3117 }
3118 else if ((LA(1)==IDENT) && (_tokenSet_19.member(LA(2)))) {
3119 variableDefinitions(mods_AST,t_AST);
3120 v_AST = (AST)returnAST;
3121 AST tmp94_AST = null;
3122 tmp94_AST = astFactory.create(LT(1));
3123 match(SEMI);
3124 if ( inputState.guessing==0 ) {
3125 classField_AST = (AST)currentAST.root;
3126 classField_AST = v_AST;
3127 currentAST.root = classField_AST;
3128 currentAST.child = classField_AST!=null &&classField_AST.getFirstChild()!=null ?
3129 classField_AST.getFirstChild() : classField_AST;
3130 currentAST.advanceChildToEnd();
3131 }
3132 }
3133 else {
3134 throw new NoViableAltException(LT(1), getFilename());
3135 }
3136
3137 }
3138 }
3139 else {
3140 throw new NoViableAltException(LT(1), getFilename());
3141 }
3142
3143 }
3144 break;
3145 }
3146 default:
3147 {
3148 throw new NoViableAltException(LT(1), getFilename());
3149 }
3150 }
3151 }
3152 }
3153 else if ((LA(1)==LITERAL_static) && (LA(2)==LCURLY)) {
3154 match(LITERAL_static);
3155 compoundStatement();
3156 s3_AST = (AST)returnAST;
3157 if ( inputState.guessing==0 ) {
3158 classField_AST = (AST)currentAST.root;
3159 classField_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(STATIC_INIT,"STATIC_INIT",first,LT(1))).add(s3_AST));
3160 currentAST.root = classField_AST;
3161 currentAST.child = classField_AST!=null &&classField_AST.getFirstChild()!=null ?
3162 classField_AST.getFirstChild() : classField_AST;
3163 currentAST.advanceChildToEnd();
3164 }
3165 }
3166 else if ((LA(1)==LCURLY)) {
3167 compoundStatement();
3168 s4_AST = (AST)returnAST;
3169 if ( inputState.guessing==0 ) {
3170 classField_AST = (AST)currentAST.root;
3171 classField_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(INSTANCE_INIT,"INSTANCE_INIT",first,LT(1))).add(s4_AST));
3172 currentAST.root = classField_AST;
3173 currentAST.child = classField_AST!=null &&classField_AST.getFirstChild()!=null ?
3174 classField_AST.getFirstChild() : classField_AST;
3175 currentAST.advanceChildToEnd();
3176 }
3177 }
3178 else {
3179 throw new NoViableAltException(LT(1), getFilename());
3180 }
3181
3182 returnAST = classField_AST;
3183 }
3184
3185 public final void interfaceField() throws RecognitionException, TokenStreamException {
3186
3187 returnAST = null;
3188 ASTPair currentAST = new ASTPair();
3189 AST interfaceField_AST = null;
3190 AST mods_AST = null;
3191 AST td_AST = null;
3192 AST tp_AST = null;
3193 AST t_AST = null;
3194 AST param_AST = null;
3195 AST rt_AST = null;
3196 AST tc_AST = null;
3197 AST v_AST = null;
3198 Token first = LT(1);
3199
3200 modifiers();
3201 mods_AST = (AST)returnAST;
3202 {
3203 switch ( LA(1)) {
3204 case AT:
3205 case LITERAL_class:
3206 case LITERAL_interface:
3207 case LITERAL_enum:
3208 {
3209 typeDefinitionInternal(mods_AST);
3210 td_AST = (AST)returnAST;
3211 if ( inputState.guessing==0 ) {
3212 interfaceField_AST = (AST)currentAST.root;
3213 interfaceField_AST = td_AST;
3214 currentAST.root = interfaceField_AST;
3215 currentAST.child = interfaceField_AST!=null &&interfaceField_AST.getFirstChild()!=null ?
3216 interfaceField_AST.getFirstChild() : interfaceField_AST;
3217 currentAST.advanceChildToEnd();
3218 }
3219 break;
3220 }
3221 case IDENT:
3222 case LT:
3223 case LITERAL_void:
3224 case LITERAL_boolean:
3225 case LITERAL_byte:
3226 case LITERAL_char:
3227 case LITERAL_short:
3228 case LITERAL_int:
3229 case LITERAL_float:
3230 case LITERAL_long:
3231 case LITERAL_double:
3232 {
3233 {
3234 switch ( LA(1)) {
3235 case LT:
3236 {
3237 typeParameters();
3238 tp_AST = (AST)returnAST;
3239 break;
3240 }
3241 case IDENT:
3242 case LITERAL_void:
3243 case LITERAL_boolean:
3244 case LITERAL_byte:
3245 case LITERAL_char:
3246 case LITERAL_short:
3247 case LITERAL_int:
3248 case LITERAL_float:
3249 case LITERAL_long:
3250 case LITERAL_double:
3251 {
3252 break;
3253 }
3254 default:
3255 {
3256 throw new NoViableAltException(LT(1), getFilename());
3257 }
3258 }
3259 }
3260 typeSpec(false);
3261 t_AST = (AST)returnAST;
3262 {
3263 if ((LA(1)==IDENT) && (LA(2)==LPAREN)) {
3264 AST tmp96_AST = null;
3265 tmp96_AST = astFactory.create(LT(1));
3266 match(IDENT);
3267 match(LPAREN);
3268 parameterDeclarationList();
3269 param_AST = (AST)returnAST;
3270 match(RPAREN);
3271 declaratorBrackets(t_AST);
3272 rt_AST = (AST)returnAST;
3273 {
3274 switch ( LA(1)) {
3275 case LITERAL_throws:
3276 {
3277 throwsClause();
3278 tc_AST = (AST)returnAST;
3279 break;
3280 }
3281 case SEMI:
3282 {
3283 break;
3284 }
3285 default:
3286 {
3287 throw new NoViableAltException(LT(1), getFilename());
3288 }
3289 }
3290 }
3291 AST tmp99_AST = null;
3292 tmp99_AST = astFactory.create(LT(1));
3293 match(SEMI);
3294 if ( inputState.guessing==0 ) {
3295 interfaceField_AST = (AST)currentAST.root;
3296 interfaceField_AST = (AST)astFactory.make( (new ASTArray(7)).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(rt_AST))).add(tmp96_AST).add(param_AST).add(tc_AST));
3297 currentAST.root = interfaceField_AST;
3298 currentAST.child = interfaceField_AST!=null &&interfaceField_AST.getFirstChild()!=null ?
3299 interfaceField_AST.getFirstChild() : interfaceField_AST;
3300 currentAST.advanceChildToEnd();
3301 }
3302 }
3303 else if ((LA(1)==IDENT) && (_tokenSet_19.member(LA(2)))) {
3304 variableDefinitions(mods_AST,t_AST);
3305 v_AST = (AST)returnAST;
3306 AST tmp100_AST = null;
3307 tmp100_AST = astFactory.create(LT(1));
3308 match(SEMI);
3309 if ( inputState.guessing==0 ) {
3310 interfaceField_AST = (AST)currentAST.root;
3311 interfaceField_AST = v_AST;
3312 currentAST.root = interfaceField_AST;
3313 currentAST.child = interfaceField_AST!=null &&interfaceField_AST.getFirstChild()!=null ?
3314 interfaceField_AST.getFirstChild() : interfaceField_AST;
3315 currentAST.advanceChildToEnd();
3316 }
3317 }
3318 else {
3319 throw new NoViableAltException(LT(1), getFilename());
3320 }
3321
3322 }
3323 break;
3324 }
3325 default:
3326 {
3327 throw new NoViableAltException(LT(1), getFilename());
3328 }
3329 }
3330 }
3331 returnAST = interfaceField_AST;
3332 }
3333
3334 public final void annotationField() throws RecognitionException, TokenStreamException {
3335
3336 returnAST = null;
3337 ASTPair currentAST = new ASTPair();
3338 AST annotationField_AST = null;
3339 AST mods_AST = null;
3340 AST td_AST = null;
3341 AST t_AST = null;
3342 Token i = null;
3343 AST i_AST = null;
3344 AST rt_AST = null;
3345 AST amvi_AST = null;
3346 AST v_AST = null;
3347 Token first = LT(1);
3348
3349 modifiers();
3350 mods_AST = (AST)returnAST;
3351 {
3352 switch ( LA(1)) {
3353 case AT:
3354 case LITERAL_class:
3355 case LITERAL_interface:
3356 case LITERAL_enum:
3357 {
3358 typeDefinitionInternal(mods_AST);
3359 td_AST = (AST)returnAST;
3360 if ( inputState.guessing==0 ) {
3361 annotationField_AST = (AST)currentAST.root;
3362 annotationField_AST = td_AST;
3363 currentAST.root = annotationField_AST;
3364 currentAST.child = annotationField_AST!=null &&annotationField_AST.getFirstChild()!=null ?
3365 annotationField_AST.getFirstChild() : annotationField_AST;
3366 currentAST.advanceChildToEnd();
3367 }
3368 break;
3369 }
3370 case IDENT:
3371 case LITERAL_void:
3372 case LITERAL_boolean:
3373 case LITERAL_byte:
3374 case LITERAL_char:
3375 case LITERAL_short:
3376 case LITERAL_int:
3377 case LITERAL_float:
3378 case LITERAL_long:
3379 case LITERAL_double:
3380 {
3381 typeSpec(false);
3382 t_AST = (AST)returnAST;
3383 {
3384 if ((LA(1)==IDENT) && (LA(2)==LPAREN)) {
3385 i = LT(1);
3386 i_AST = astFactory.create(i);
3387 match(IDENT);
3388 match(LPAREN);
3389 match(RPAREN);
3390 declaratorBrackets(t_AST);
3391 rt_AST = (AST)returnAST;
3392 {
3393 switch ( LA(1)) {
3394 case LITERAL_default:
3395 {
3396 match(LITERAL_default);
3397 annotationMemberValueInitializer();
3398 amvi_AST = (AST)returnAST;
3399 break;
3400 }
3401 case SEMI:
3402 {
3403 break;
3404 }
3405 default:
3406 {
3407 throw new NoViableAltException(LT(1), getFilename());
3408 }
3409 }
3410 }
3411 AST tmp104_AST = null;
3412 tmp104_AST = astFactory.create(LT(1));
3413 match(SEMI);
3414 if ( inputState.guessing==0 ) {
3415 annotationField_AST = (AST)currentAST.root;
3416 annotationField_AST =
3417 (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(rt_AST))).add(i_AST).add(amvi_AST));
3418 currentAST.root = annotationField_AST;
3419 currentAST.child = annotationField_AST!=null &&annotationField_AST.getFirstChild()!=null ?
3420 annotationField_AST.getFirstChild() : annotationField_AST;
3421 currentAST.advanceChildToEnd();
3422 }
3423 }
3424 else if ((LA(1)==IDENT) && (_tokenSet_19.member(LA(2)))) {
3425 variableDefinitions(mods_AST,t_AST);
3426 v_AST = (AST)returnAST;
3427 AST tmp105_AST = null;
3428 tmp105_AST = astFactory.create(LT(1));
3429 match(SEMI);
3430 if ( inputState.guessing==0 ) {
3431 annotationField_AST = (AST)currentAST.root;
3432 annotationField_AST = v_AST;
3433 currentAST.root = annotationField_AST;
3434 currentAST.child = annotationField_AST!=null &&annotationField_AST.getFirstChild()!=null ?
3435 annotationField_AST.getFirstChild() : annotationField_AST;
3436 currentAST.advanceChildToEnd();
3437 }
3438 }
3439 else {
3440 throw new NoViableAltException(LT(1), getFilename());
3441 }
3442
3443 }
3444 break;
3445 }
3446 default:
3447 {
3448 throw new NoViableAltException(LT(1), getFilename());
3449 }
3450 }
3451 }
3452 returnAST = annotationField_AST;
3453 }
3454
3455 public final void enumConstant() throws RecognitionException, TokenStreamException {
3456
3457 returnAST = null;
3458 ASTPair currentAST = new ASTPair();
3459 AST enumConstant_AST = null;
3460 AST an_AST = null;
3461 Token i = null;
3462 AST i_AST = null;
3463 AST a_AST = null;
3464 AST b_AST = null;
3465
3466 annotations();
3467 an_AST = (AST)returnAST;
3468 i = LT(1);
3469 i_AST = astFactory.create(i);
3470 match(IDENT);
3471 {
3472 switch ( LA(1)) {
3473 case LPAREN:
3474 {
3475 match(LPAREN);
3476 argList();
3477 a_AST = (AST)returnAST;
3478 match(RPAREN);
3479 break;
3480 }
3481 case SEMI:
3482 case COMMA:
3483 case LCURLY:
3484 case RCURLY:
3485 {
3486 break;
3487 }
3488 default:
3489 {
3490 throw new NoViableAltException(LT(1), getFilename());
3491 }
3492 }
3493 }
3494 {
3495 switch ( LA(1)) {
3496 case LCURLY:
3497 {
3498 enumConstantBlock();
3499 b_AST = (AST)returnAST;
3500 break;
3501 }
3502 case SEMI:
3503 case COMMA:
3504 case RCURLY:
3505 {
3506 break;
3507 }
3508 default:
3509 {
3510 throw new NoViableAltException(LT(1), getFilename());
3511 }
3512 }
3513 }
3514 if ( inputState.guessing==0 ) {
3515 enumConstant_AST = (AST)currentAST.root;
3516 enumConstant_AST = (AST)astFactory.make( (new ASTArray(5)).add(astFactory.create(ENUM_CONSTANT_DEF,"ENUM_CONSTANT_DEF")).add(an_AST).add(i_AST).add(a_AST).add(b_AST));
3517 currentAST.root = enumConstant_AST;
3518 currentAST.child = enumConstant_AST!=null &&enumConstant_AST.getFirstChild()!=null ?
3519 enumConstant_AST.getFirstChild() : enumConstant_AST;
3520 currentAST.advanceChildToEnd();
3521 }
3522 returnAST = enumConstant_AST;
3523 }
3524
3525 public final void declaratorBrackets(
3526 AST typ
3527 ) throws RecognitionException, TokenStreamException {
3528
3529 returnAST = null;
3530 ASTPair currentAST = new ASTPair();
3531 AST declaratorBrackets_AST = null;
3532 Token lb = null;
3533 AST lb_AST = null;
3534
3535 if ( inputState.guessing==0 ) {
3536 declaratorBrackets_AST = (AST)currentAST.root;
3537 declaratorBrackets_AST=typ;
3538 currentAST.root = declaratorBrackets_AST;
3539 currentAST.child = declaratorBrackets_AST!=null &&declaratorBrackets_AST.getFirstChild()!=null ?
3540 declaratorBrackets_AST.getFirstChild() : declaratorBrackets_AST;
3541 currentAST.advanceChildToEnd();
3542 }
3543 {
3544 _loop159:
3545 do {
3546 if ((LA(1)==LBRACK)) {
3547 lb = LT(1);
3548 lb_AST = astFactory.create(lb);
3549 astFactory.makeASTRoot(currentAST, lb_AST);
3550 match(LBRACK);
3551 if ( inputState.guessing==0 ) {
3552 lb_AST.setType(ARRAY_DECLARATOR);
3553 }
3554 match(RBRACK);
3555 }
3556 else {
3557 break _loop159;
3558 }
3559
3560 } while (true);
3561 }
3562 declaratorBrackets_AST = (AST)currentAST.root;
3563 returnAST = declaratorBrackets_AST;
3564 }
3565
3566 public final void argList() throws RecognitionException, TokenStreamException {
3567
3568 returnAST = null;
3569 ASTPair currentAST = new ASTPair();
3570 AST argList_AST = null;
3571 Token first = LT(1);
3572
3573 {
3574 switch ( LA(1)) {
3575 case IDENT:
3576 case LITERAL_super:
3577 case LT:
3578 case LITERAL_void:
3579 case LITERAL_boolean:
3580 case LITERAL_byte:
3581 case LITERAL_char:
3582 case LITERAL_short:
3583 case LITERAL_int:
3584 case LITERAL_float:
3585 case LITERAL_long:
3586 case LITERAL_double:
3587 case LPAREN:
3588 case LITERAL_this:
3589 case PLUS:
3590 case MINUS:
3591 case INC:
3592 case DEC:
3593 case BNOT:
3594 case LNOT:
3595 case LITERAL_true:
3596 case LITERAL_false:
3597 case LITERAL_null:
3598 case LITERAL_new:
3599 case NUM_INT:
3600 case STRING_LITERAL:
3601 case NUM_FLOAT:
3602 case NUM_LONG:
3603 case NUM_DOUBLE:
3604 {
3605 expressionList();
3606 astFactory.addASTChild(currentAST, returnAST);
3607 break;
3608 }
3609 case RPAREN:
3610 {
3611 if ( inputState.guessing==0 ) {
3612 argList_AST = (AST)currentAST.root;
3613 argList_AST = create(ELIST,"ELIST",first,LT(1));
3614 currentAST.root = argList_AST;
3615 currentAST.child = argList_AST!=null &&argList_AST.getFirstChild()!=null ?
3616 argList_AST.getFirstChild() : argList_AST;
3617 currentAST.advanceChildToEnd();
3618 }
3619 break;
3620 }
3621 default:
3622 {
3623 throw new NoViableAltException(LT(1), getFilename());
3624 }
3625 }
3626 }
3627 argList_AST = (AST)currentAST.root;
3628 returnAST = argList_AST;
3629 }
3630
3631 public final void enumConstantBlock() throws RecognitionException, TokenStreamException {
3632
3633 returnAST = null;
3634 ASTPair currentAST = new ASTPair();
3635 AST enumConstantBlock_AST = null;
3636
3637 match(LCURLY);
3638 {
3639 _loop119:
3640 do {
3641 switch ( LA(1)) {
3642 case FINAL:
3643 case ABSTRACT:
3644 case STRICTFP:
3645 case LITERAL_static:
3646 case IDENT:
3647 case LT:
3648 case LITERAL_void:
3649 case LITERAL_boolean:
3650 case LITERAL_byte:
3651 case LITERAL_char:
3652 case LITERAL_short:
3653 case LITERAL_int:
3654 case LITERAL_float:
3655 case LITERAL_long:
3656 case LITERAL_double:
3657 case LITERAL_private:
3658 case LITERAL_public:
3659 case LITERAL_protected:
3660 case LITERAL_transient:
3661 case LITERAL_native:
3662 case LITERAL_threadsafe:
3663 case LITERAL_synchronized:
3664 case LITERAL_volatile:
3665 case AT:
3666 case LCURLY:
3667 case LITERAL_class:
3668 case LITERAL_interface:
3669 case LITERAL_enum:
3670 {
3671 enumConstantField();
3672 astFactory.addASTChild(currentAST, returnAST);
3673 break;
3674 }
3675 case SEMI:
3676 {
3677 match(SEMI);
3678 break;
3679 }
3680 default:
3681 {
3682 break _loop119;
3683 }
3684 }
3685 } while (true);
3686 }
3687 match(RCURLY);
3688 if ( inputState.guessing==0 ) {
3689 enumConstantBlock_AST = (AST)currentAST.root;
3690 enumConstantBlock_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(OBJBLOCK,"OBJBLOCK")).add(enumConstantBlock_AST));
3691 currentAST.root = enumConstantBlock_AST;
3692 currentAST.child = enumConstantBlock_AST!=null &&enumConstantBlock_AST.getFirstChild()!=null ?
3693 enumConstantBlock_AST.getFirstChild() : enumConstantBlock_AST;
3694 currentAST.advanceChildToEnd();
3695 }
3696 enumConstantBlock_AST = (AST)currentAST.root;
3697 returnAST = enumConstantBlock_AST;
3698 }
3699
3700 public final void enumConstantField() throws RecognitionException, TokenStreamException {
3701
3702 returnAST = null;
3703 ASTPair currentAST = new ASTPair();
3704 AST enumConstantField_AST = null;
3705 AST mods_AST = null;
3706 AST td_AST = null;
3707 AST tp_AST = null;
3708 AST t_AST = null;
3709 AST param_AST = null;
3710 AST rt_AST = null;
3711 AST tc_AST = null;
3712 AST s2_AST = null;
3713 AST v_AST = null;
3714 AST s4_AST = null;
3715 Token first = LT(1);
3716
3717 switch ( LA(1)) {
3718 case FINAL:
3719 case ABSTRACT:
3720 case STRICTFP:
3721 case LITERAL_static:
3722 case IDENT:
3723 case LT:
3724 case LITERAL_void:
3725 case LITERAL_boolean:
3726 case LITERAL_byte:
3727 case LITERAL_char:
3728 case LITERAL_short:
3729 case LITERAL_int:
3730 case LITERAL_float:
3731 case LITERAL_long:
3732 case LITERAL_double:
3733 case LITERAL_private:
3734 case LITERAL_public:
3735 case LITERAL_protected:
3736 case LITERAL_transient:
3737 case LITERAL_native:
3738 case LITERAL_threadsafe:
3739 case LITERAL_synchronized:
3740 case LITERAL_volatile:
3741 case AT:
3742 case LITERAL_class:
3743 case LITERAL_interface:
3744 case LITERAL_enum:
3745 {
3746 modifiers();
3747 mods_AST = (AST)returnAST;
3748 {
3749 switch ( LA(1)) {
3750 case AT:
3751 case LITERAL_class:
3752 case LITERAL_interface:
3753 case LITERAL_enum:
3754 {
3755 typeDefinitionInternal(mods_AST);
3756 td_AST = (AST)returnAST;
3757 if ( inputState.guessing==0 ) {
3758 enumConstantField_AST = (AST)currentAST.root;
3759 enumConstantField_AST = td_AST;
3760 currentAST.root = enumConstantField_AST;
3761 currentAST.child = enumConstantField_AST!=null &&enumConstantField_AST.getFirstChild()!=null ?
3762 enumConstantField_AST.getFirstChild() : enumConstantField_AST;
3763 currentAST.advanceChildToEnd();
3764 }
3765 break;
3766 }
3767 case IDENT:
3768 case LT:
3769 case LITERAL_void:
3770 case LITERAL_boolean:
3771 case LITERAL_byte:
3772 case LITERAL_char:
3773 case LITERAL_short:
3774 case LITERAL_int:
3775 case LITERAL_float:
3776 case LITERAL_long:
3777 case LITERAL_double:
3778 {
3779 {
3780 switch ( LA(1)) {
3781 case LT:
3782 {
3783 typeParameters();
3784 tp_AST = (AST)returnAST;
3785 break;
3786 }
3787 case IDENT:
3788 case LITERAL_void:
3789 case LITERAL_boolean:
3790 case LITERAL_byte:
3791 case LITERAL_char:
3792 case LITERAL_short:
3793 case LITERAL_int:
3794 case LITERAL_float:
3795 case LITERAL_long:
3796 case LITERAL_double:
3797 {
3798 break;
3799 }
3800 default:
3801 {
3802 throw new NoViableAltException(LT(1), getFilename());
3803 }
3804 }
3805 }
3806 typeSpec(false);
3807 t_AST = (AST)returnAST;
3808 {
3809 if ((LA(1)==IDENT) && (LA(2)==LPAREN)) {
3810 AST tmp112_AST = null;
3811 tmp112_AST = astFactory.create(LT(1));
3812 match(IDENT);
3813 match(LPAREN);
3814 parameterDeclarationList();
3815 param_AST = (AST)returnAST;
3816 match(RPAREN);
3817 declaratorBrackets(t_AST);
3818 rt_AST = (AST)returnAST;
3819 {
3820 switch ( LA(1)) {
3821 case LITERAL_throws:
3822 {
3823 throwsClause();
3824 tc_AST = (AST)returnAST;
3825 break;
3826 }
3827 case SEMI:
3828 case LCURLY:
3829 {
3830 break;
3831 }
3832 default:
3833 {
3834 throw new NoViableAltException(LT(1), getFilename());
3835 }
3836 }
3837 }
3838 {
3839 switch ( LA(1)) {
3840 case LCURLY:
3841 {
3842 compoundStatement();
3843 s2_AST = (AST)returnAST;
3844 break;
3845 }
3846 case SEMI:
3847 {
3848 AST tmp115_AST = null;
3849 tmp115_AST = astFactory.create(LT(1));
3850 match(SEMI);
3851 break;
3852 }
3853 default:
3854 {
3855 throw new NoViableAltException(LT(1), getFilename());
3856 }
3857 }
3858 }
3859 if ( inputState.guessing==0 ) {
3860 enumConstantField_AST = (AST)currentAST.root;
3861 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(rt_AST))).add(tmp112_AST).add(param_AST).add(tc_AST).add(s2_AST));
3862 currentAST.root = enumConstantField_AST;
3863 currentAST.child = enumConstantField_AST!=null &&enumConstantField_AST.getFirstChild()!=null ?
3864 enumConstantField_AST.getFirstChild() : enumConstantField_AST;
3865 currentAST.advanceChildToEnd();
3866 }
3867 }
3868 else if ((LA(1)==IDENT) && (_tokenSet_19.member(LA(2)))) {
3869 variableDefinitions(mods_AST,t_AST);
3870 v_AST = (AST)returnAST;
3871 AST tmp116_AST = null;
3872 tmp116_AST = astFactory.create(LT(1));
3873 match(SEMI);
3874 if ( inputState.guessing==0 ) {
3875 enumConstantField_AST = (AST)currentAST.root;
3876 enumConstantField_AST = v_AST;
3877 currentAST.root = enumConstantField_AST;
3878 currentAST.child = enumConstantField_AST!=null &&enumConstantField_AST.getFirstChild()!=null ?
3879 enumConstantField_AST.getFirstChild() : enumConstantField_AST;
3880 currentAST.advanceChildToEnd();
3881 }
3882 }
3883 else {
3884 throw new NoViableAltException(LT(1), getFilename());
3885 }
3886
3887 }
3888 break;
3889 }
3890 default:
3891 {
3892 throw new NoViableAltException(LT(1), getFilename());
3893 }
3894 }
3895 }
3896 break;
3897 }
3898 case LCURLY:
3899 {
3900 compoundStatement();
3901 s4_AST = (AST)returnAST;
3902 if ( inputState.guessing==0 ) {
3903 enumConstantField_AST = (AST)currentAST.root;
3904 enumConstantField_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(INSTANCE_INIT,"INSTANCE_INIT",first,LT(1))).add(s4_AST));
3905 currentAST.root = enumConstantField_AST;
3906 currentAST.child = enumConstantField_AST!=null &&enumConstantField_AST.getFirstChild()!=null ?
3907 enumConstantField_AST.getFirstChild() : enumConstantField_AST;
3908 currentAST.advanceChildToEnd();
3909 }
3910 break;
3911 }
3912 default:
3913 {
3914 throw new NoViableAltException(LT(1), getFilename());
3915 }
3916 }
3917 returnAST = enumConstantField_AST;
3918 }
3919
3920 public final void parameterDeclarationList() throws RecognitionException, TokenStreamException {
3921
3922 returnAST = null;
3923 ASTPair currentAST = new ASTPair();
3924 AST parameterDeclarationList_AST = null;
3925 Token first = LT(1);
3926
3927 {
3928 boolean synPredMatched171 = false;
3929 if (((_tokenSet_20.member(LA(1))) && (_tokenSet_21.member(LA(2))))) {
3930 int _m171 = mark();
3931 synPredMatched171 = true;
3932 inputState.guessing++;
3933 try {
3934 {
3935 parameterDeclaration();
3936 }
3937 }
3938 catch (RecognitionException pe) {
3939 synPredMatched171 = false;
3940 }
3941 rewind(_m171);
3942 inputState.guessing--;
3943 }
3944 if ( synPredMatched171 ) {
3945 parameterDeclaration();
3946 astFactory.addASTChild(currentAST, returnAST);
3947 {
3948 _loop175:
3949 do {
3950 boolean synPredMatched174 = false;
3951 if (((LA(1)==COMMA) && (_tokenSet_20.member(LA(2))))) {
3952 int _m174 = mark();
3953 synPredMatched174 = true;
3954 inputState.guessing++;
3955 try {
3956 {
3957 match(COMMA);
3958 parameterDeclaration();
3959 }
3960 }
3961 catch (RecognitionException pe) {
3962 synPredMatched174 = false;
3963 }
3964 rewind(_m174);
3965 inputState.guessing--;
3966 }
3967 if ( synPredMatched174 ) {
3968 match(COMMA);
3969 parameterDeclaration();
3970 astFactory.addASTChild(currentAST, returnAST);
3971 }
3972 else {
3973 break _loop175;
3974 }
3975
3976 } while (true);
3977 }
3978 {
3979 switch ( LA(1)) {
3980 case COMMA:
3981 {
3982 match(COMMA);
3983 variableLengthParameterDeclaration();
3984 astFactory.addASTChild(currentAST, returnAST);
3985 break;
3986 }
3987 case RPAREN:
3988 {
3989 break;
3990 }
3991 default:
3992 {
3993 throw new NoViableAltException(LT(1), getFilename());
3994 }
3995 }
3996 }
3997 }
3998 else if ((_tokenSet_20.member(LA(1))) && (_tokenSet_22.member(LA(2)))) {
3999 variableLengthParameterDeclaration();
4000 astFactory.addASTChild(currentAST, returnAST);
4001 }
4002 else if ((LA(1)==RPAREN)) {
4003 }
4004 else {
4005 throw new NoViableAltException(LT(1), getFilename());
4006 }
4007
4008 }
4009 if ( inputState.guessing==0 ) {
4010 parameterDeclarationList_AST = (AST)currentAST.root;
4011 parameterDeclarationList_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(PARAMETERS,"PARAMETERS",first,LT(1))).add(parameterDeclarationList_AST));
4012 currentAST.root = parameterDeclarationList_AST;
4013 currentAST.child = parameterDeclarationList_AST!=null &¶meterDeclarationList_AST.getFirstChild()!=null ?
4014 parameterDeclarationList_AST.getFirstChild() : parameterDeclarationList_AST;
4015 currentAST.advanceChildToEnd();
4016 }
4017 parameterDeclarationList_AST = (AST)currentAST.root;
4018 returnAST = parameterDeclarationList_AST;
4019 }
4020
4021 public final void throwsClause() throws RecognitionException, TokenStreamException {
4022
4023 returnAST = null;
4024 ASTPair currentAST = new ASTPair();
4025 AST throwsClause_AST = null;
4026
4027 AST tmp119_AST = null;
4028 tmp119_AST = astFactory.create(LT(1));
4029 astFactory.makeASTRoot(currentAST, tmp119_AST);
4030 match(LITERAL_throws);
4031 identifier();
4032 astFactory.addASTChild(currentAST, returnAST);
4033 {
4034 _loop167:
4035 do {
4036 if ((LA(1)==COMMA)) {
4037 match(COMMA);
4038 identifier();
4039 astFactory.addASTChild(currentAST, returnAST);
4040 }
4041 else {
4042 break _loop167;
4043 }
4044
4045 } while (true);
4046 }
4047 throwsClause_AST = (AST)currentAST.root;
4048 returnAST = throwsClause_AST;
4049 }
4050
4051 public final void compoundStatement() throws RecognitionException, TokenStreamException {
4052
4053 returnAST = null;
4054 ASTPair currentAST = new ASTPair();
4055 AST compoundStatement_AST = null;
4056 Token lc = null;
4057 AST lc_AST = null;
4058
4059 lc = LT(1);
4060 lc_AST = astFactory.create(lc);
4061 astFactory.makeASTRoot(currentAST, lc_AST);
4062 match(LCURLY);
4063 if ( inputState.guessing==0 ) {
4064 lc_AST.setType(SLIST);
4065 }
4066 {
4067 _loop187:
4068 do {
4069 if ((_tokenSet_23.member(LA(1)))) {
4070 statement();
4071 astFactory.addASTChild(currentAST, returnAST);
4072 }
4073 else {
4074 break _loop187;
4075 }
4076
4077 } while (true);
4078 }
4079 match(RCURLY);
4080 compoundStatement_AST = (AST)currentAST.root;
4081 returnAST = compoundStatement_AST;
4082 }
4083
4084 public final void ctorHead() throws RecognitionException, TokenStreamException {
4085
4086 returnAST = null;
4087 ASTPair currentAST = new ASTPair();
4088 AST ctorHead_AST = null;
4089
4090 AST tmp122_AST = null;
4091 tmp122_AST = astFactory.create(LT(1));
4092 astFactory.addASTChild(currentAST, tmp122_AST);
4093 match(IDENT);
4094 match(LPAREN);
4095 parameterDeclarationList();
4096 astFactory.addASTChild(currentAST, returnAST);
4097 match(RPAREN);
4098 {
4099 switch ( LA(1)) {
4100 case LITERAL_throws:
4101 {
4102 throwsClause();
4103 astFactory.addASTChild(currentAST, returnAST);
4104 break;
4105 }
4106 case LCURLY:
4107 {
4108 break;
4109 }
4110 default:
4111 {
4112 throw new NoViableAltException(LT(1), getFilename());
4113 }
4114 }
4115 }
4116 ctorHead_AST = (AST)currentAST.root;
4117 returnAST = ctorHead_AST;
4118 }
4119
4120 public final void constructorBody() throws RecognitionException, TokenStreamException {
4121
4122 returnAST = null;
4123 ASTPair currentAST = new ASTPair();
4124 AST constructorBody_AST = null;
4125 Token lc = null;
4126 AST lc_AST = null;
4127
4128 lc = LT(1);
4129 lc_AST = astFactory.create(lc);
4130 astFactory.makeASTRoot(currentAST, lc_AST);
4131 match(LCURLY);
4132 if ( inputState.guessing==0 ) {
4133 lc_AST.setType(SLIST);
4134 }
4135 {
4136 if ((_tokenSet_24.member(LA(1))) && (_tokenSet_25.member(LA(2)))) {
4137 explicitConstructorInvocation();
4138 astFactory.addASTChild(currentAST, returnAST);
4139 }
4140 else if ((_tokenSet_26.member(LA(1))) && (_tokenSet_27.member(LA(2)))) {
4141 }
4142 else {
4143 throw new NoViableAltException(LT(1), getFilename());
4144 }
4145
4146 }
4147 {
4148 _loop149:
4149 do {
4150 if ((_tokenSet_23.member(LA(1)))) {
4151 statement();
4152 astFactory.addASTChild(currentAST, returnAST);
4153 }
4154 else {
4155 break _loop149;
4156 }
4157
4158 } while (true);
4159 }
4160 match(RCURLY);
4161 constructorBody_AST = (AST)currentAST.root;
4162 returnAST = constructorBody_AST;
4163 }
4164
4165 /*** Catch obvious constructor calls, but not the expr.super(...) calls */
4166 public final void explicitConstructorInvocation() throws RecognitionException, TokenStreamException {
4167
4168 returnAST = null;
4169 ASTPair currentAST = new ASTPair();
4170 AST explicitConstructorInvocation_AST = null;
4171 Token lp1 = null;
4172 AST lp1_AST = null;
4173 Token lp2 = null;
4174 AST lp2_AST = null;
4175
4176 {
4177 switch ( LA(1)) {
4178 case LT:
4179 {
4180 typeArguments();
4181 astFactory.addASTChild(currentAST, returnAST);
4182 break;
4183 }
4184 case LITERAL_super:
4185 case LITERAL_this:
4186 {
4187 break;
4188 }
4189 default:
4190 {
4191 throw new NoViableAltException(LT(1), getFilename());
4192 }
4193 }
4194 }
4195 {
4196 switch ( LA(1)) {
4197 case LITERAL_this:
4198 {
4199 match(LITERAL_this);
4200 lp1 = LT(1);
4201 lp1_AST = astFactory.create(lp1);
4202 astFactory.makeASTRoot(currentAST, lp1_AST);
4203 match(LPAREN);
4204 argList();
4205 astFactory.addASTChild(currentAST, returnAST);
4206 match(RPAREN);
4207 match(SEMI);
4208 if ( inputState.guessing==0 ) {
4209 lp1_AST.setType(CTOR_CALL);
4210 }
4211 break;
4212 }
4213 case LITERAL_super:
4214 {
4215 match(LITERAL_super);
4216 lp2 = LT(1);
4217 lp2_AST = astFactory.create(lp2);
4218 astFactory.makeASTRoot(currentAST, lp2_AST);
4219 match(LPAREN);
4220 argList();
4221 astFactory.addASTChild(currentAST, returnAST);
4222 match(RPAREN);
4223 match(SEMI);
4224 if ( inputState.guessing==0 ) {
4225 lp2_AST.setType(SUPER_CTOR_CALL);
4226 }
4227 break;
4228 }
4229 default:
4230 {
4231 throw new NoViableAltException(LT(1), getFilename());
4232 }
4233 }
4234 }
4235 explicitConstructorInvocation_AST = (AST)currentAST.root;
4236 returnAST = explicitConstructorInvocation_AST;
4237 }
4238
4239 public final void statement() throws RecognitionException, TokenStreamException {
4240
4241 returnAST = null;
4242 ASTPair currentAST = new ASTPair();
4243 AST statement_AST = null;
4244 AST m_AST = null;
4245 Token c = null;
4246 AST c_AST = null;
4247 Token s = null;
4248 AST s_AST = null;
4249
4250 switch ( LA(1)) {
4251 case LCURLY:
4252 {
4253 compoundStatement();
4254 astFactory.addASTChild(currentAST, returnAST);
4255 statement_AST = (AST)currentAST.root;
4256 break;
4257 }
4258 case LITERAL_if:
4259 {
4260 AST tmp132_AST = null;
4261 tmp132_AST = astFactory.create(LT(1));
4262 astFactory.makeASTRoot(currentAST, tmp132_AST);
4263 match(LITERAL_if);
4264 match(LPAREN);
4265 expression();
4266 astFactory.addASTChild(currentAST, returnAST);
4267 match(RPAREN);
4268 statement();
4269 astFactory.addASTChild(currentAST, returnAST);
4270 {
4271 if ((LA(1)==LITERAL_else) && (_tokenSet_23.member(LA(2)))) {
4272 match(LITERAL_else);
4273 statement();
4274 astFactory.addASTChild(currentAST, returnAST);
4275 }
4276 else if ((_tokenSet_28.member(LA(1))) && (_tokenSet_29.member(LA(2)))) {
4277 }
4278 else {
4279 throw new NoViableAltException(LT(1), getFilename());
4280 }
4281
4282 }
4283 statement_AST = (AST)currentAST.root;
4284 break;
4285 }
4286 case LITERAL_for:
4287 {
4288 forStatement();
4289 astFactory.addASTChild(currentAST, returnAST);
4290 statement_AST = (AST)currentAST.root;
4291 break;
4292 }
4293 case LITERAL_while:
4294 {
4295 AST tmp136_AST = null;
4296 tmp136_AST = astFactory.create(LT(1));
4297 astFactory.makeASTRoot(currentAST, tmp136_AST);
4298 match(LITERAL_while);
4299 match(LPAREN);
4300 expression();
4301 astFactory.addASTChild(currentAST, returnAST);
4302 match(RPAREN);
4303 statement();
4304 astFactory.addASTChild(currentAST, returnAST);
4305 statement_AST = (AST)currentAST.root;
4306 break;
4307 }
4308 case LITERAL_break:
4309 {
4310 AST tmp139_AST = null;
4311 tmp139_AST = astFactory.create(LT(1));
4312 astFactory.makeASTRoot(currentAST, tmp139_AST);
4313 match(LITERAL_break);
4314 {
4315 switch ( LA(1)) {
4316 case IDENT:
4317 {
4318 AST tmp140_AST = null;
4319 tmp140_AST = astFactory.create(LT(1));
4320 astFactory.addASTChild(currentAST, tmp140_AST);
4321 match(IDENT);
4322 break;
4323 }
4324 case SEMI:
4325 {
4326 break;
4327 }
4328 default:
4329 {
4330 throw new NoViableAltException(LT(1), getFilename());
4331 }
4332 }
4333 }
4334 match(SEMI);
4335 statement_AST = (AST)currentAST.root;
4336 break;
4337 }
4338 case LITERAL_continue:
4339 {
4340 AST tmp142_AST = null;
4341 tmp142_AST = astFactory.create(LT(1));
4342 astFactory.makeASTRoot(currentAST, tmp142_AST);
4343 match(LITERAL_continue);
4344 {
4345 switch ( LA(1)) {
4346 case IDENT:
4347 {
4348 AST tmp143_AST = null;
4349 tmp143_AST = astFactory.create(LT(1));
4350 astFactory.addASTChild(currentAST, tmp143_AST);
4351 match(IDENT);
4352 break;
4353 }
4354 case SEMI:
4355 {
4356 break;
4357 }
4358 default:
4359 {
4360 throw new NoViableAltException(LT(1), getFilename());
4361 }
4362 }
4363 }
4364 match(SEMI);
4365 statement_AST = (AST)currentAST.root;
4366 break;
4367 }
4368 case LITERAL_return:
4369 {
4370 AST tmp145_AST = null;
4371 tmp145_AST = astFactory.create(LT(1));
4372 astFactory.makeASTRoot(currentAST, tmp145_AST);
4373 match(LITERAL_return);
4374 {
4375 switch ( LA(1)) {
4376 case IDENT:
4377 case LITERAL_super:
4378 case LT:
4379 case LITERAL_void:
4380 case LITERAL_boolean:
4381 case LITERAL_byte:
4382 case LITERAL_char:
4383 case LITERAL_short:
4384 case LITERAL_int:
4385 case LITERAL_float:
4386 case LITERAL_long:
4387 case LITERAL_double:
4388 case LPAREN:
4389 case LITERAL_this:
4390 case PLUS:
4391 case MINUS:
4392 case INC:
4393 case DEC:
4394 case BNOT:
4395 case LNOT:
4396 case LITERAL_true:
4397 case LITERAL_false:
4398 case LITERAL_null:
4399 case LITERAL_new:
4400 case NUM_INT:
4401 case STRING_LITERAL:
4402 case NUM_FLOAT:
4403 case NUM_LONG:
4404 case NUM_DOUBLE:
4405 {
4406 expression();
4407 astFactory.addASTChild(currentAST, returnAST);
4408 break;
4409 }
4410 case SEMI:
4411 {
4412 break;
4413 }
4414 default:
4415 {
4416 throw new NoViableAltException(LT(1), getFilename());
4417 }
4418 }
4419 }
4420 match(SEMI);
4421 statement_AST = (AST)currentAST.root;
4422 break;
4423 }
4424 case LITERAL_switch:
4425 {
4426 AST tmp147_AST = null;
4427 tmp147_AST = astFactory.create(LT(1));
4428 astFactory.makeASTRoot(currentAST, tmp147_AST);
4429 match(LITERAL_switch);
4430 match(LPAREN);
4431 expression();
4432 astFactory.addASTChild(currentAST, returnAST);
4433 match(RPAREN);
4434 match(LCURLY);
4435 {
4436 _loop196:
4437 do {
4438 if ((LA(1)==LITERAL_default||LA(1)==LITERAL_case)) {
4439 casesGroup();
4440 astFactory.addASTChild(currentAST, returnAST);
4441 }
4442 else {
4443 break _loop196;
4444 }
4445
4446 } while (true);
4447 }
4448 match(RCURLY);
4449 statement_AST = (AST)currentAST.root;
4450 break;
4451 }
4452 case LITERAL_try:
4453 {
4454 tryBlock();
4455 astFactory.addASTChild(currentAST, returnAST);
4456 statement_AST = (AST)currentAST.root;
4457 break;
4458 }
4459 case LITERAL_throw:
4460 {
4461 AST tmp152_AST = null;
4462 tmp152_AST = astFactory.create(LT(1));
4463 astFactory.makeASTRoot(currentAST, tmp152_AST);
4464 match(LITERAL_throw);
4465 expression();
4466 astFactory.addASTChild(currentAST, returnAST);
4467 match(SEMI);
4468 statement_AST = (AST)currentAST.root;
4469 break;
4470 }
4471 case LITERAL_assert:
4472 {
4473 AST tmp154_AST = null;
4474 tmp154_AST = astFactory.create(LT(1));
4475 astFactory.makeASTRoot(currentAST, tmp154_AST);
4476 match(LITERAL_assert);
4477 expression();
4478 astFactory.addASTChild(currentAST, returnAST);
4479 {
4480 switch ( LA(1)) {
4481 case COLON:
4482 {
4483 match(COLON);
4484 expression();
4485 astFactory.addASTChild(currentAST, returnAST);
4486 break;
4487 }
4488 case SEMI:
4489 {
4490 break;
4491 }
4492 default:
4493 {
4494 throw new NoViableAltException(LT(1), getFilename());
4495 }
4496 }
4497 }
4498 match(SEMI);
4499 statement_AST = (AST)currentAST.root;
4500 break;
4501 }
4502 case SEMI:
4503 {
4504 s = LT(1);
4505 s_AST = astFactory.create(s);
4506 astFactory.addASTChild(currentAST, s_AST);
4507 match(SEMI);
4508 if ( inputState.guessing==0 ) {
4509 s_AST.setType(EMPTY_STAT);
4510 }
4511 statement_AST = (AST)currentAST.root;
4512 break;
4513 }
4514 default:
4515 boolean synPredMatched190 = false;
4516 if (((_tokenSet_30.member(LA(1))) && (_tokenSet_31.member(LA(2))))) {
4517 int _m190 = mark();
4518 synPredMatched190 = true;
4519 inputState.guessing++;
4520 try {
4521 {
4522 declaration();
4523 }
4524 }
4525 catch (RecognitionException pe) {
4526 synPredMatched190 = false;
4527 }
4528 rewind(_m190);
4529 inputState.guessing--;
4530 }
4531 if ( synPredMatched190 ) {
4532 declaration();
4533 astFactory.addASTChild(currentAST, returnAST);
4534 match(SEMI);
4535 statement_AST = (AST)currentAST.root;
4536 }
4537 else if ((_tokenSet_32.member(LA(1))) && (_tokenSet_33.member(LA(2)))) {
4538 expression();
4539 astFactory.addASTChild(currentAST, returnAST);
4540 match(SEMI);
4541 statement_AST = (AST)currentAST.root;
4542 }
4543 else if ((_tokenSet_34.member(LA(1))) && (_tokenSet_35.member(LA(2)))) {
4544 modifiers();
4545 m_AST = (AST)returnAST;
4546 classDefinition(m_AST);
4547 astFactory.addASTChild(currentAST, returnAST);
4548 statement_AST = (AST)currentAST.root;
4549 }
4550 else if ((LA(1)==IDENT) && (LA(2)==COLON)) {
4551 AST tmp159_AST = null;
4552 tmp159_AST = astFactory.create(LT(1));
4553 astFactory.addASTChild(currentAST, tmp159_AST);
4554 match(IDENT);
4555 c = LT(1);
4556 c_AST = astFactory.create(c);
4557 astFactory.makeASTRoot(currentAST, c_AST);
4558 match(COLON);
4559 if ( inputState.guessing==0 ) {
4560 c_AST.setType(LABELED_STAT);
4561 }
4562 statement();
4563 astFactory.addASTChild(currentAST, returnAST);
4564 statement_AST = (AST)currentAST.root;
4565 }
4566 else if ((LA(1)==LITERAL_synchronized) && (LA(2)==LPAREN)) {
4567 AST tmp160_AST = null;
4568 tmp160_AST = astFactory.create(LT(1));
4569 astFactory.makeASTRoot(currentAST, tmp160_AST);
4570 match(LITERAL_synchronized);
4571 match(LPAREN);
4572 expression();
4573 astFactory.addASTChild(currentAST, returnAST);
4574 match(RPAREN);
4575 compoundStatement();
4576 astFactory.addASTChild(currentAST, returnAST);
4577 statement_AST = (AST)currentAST.root;
4578 }
4579 else {
4580 throw new NoViableAltException(LT(1), getFilename());
4581 }
4582 }
4583 returnAST = statement_AST;
4584 }
4585
4586 /*** Declaration of a variable. This can be a class/instance variable,
4587 * or a local variable in a method
4588 * It can also include possible initialization.
4589 */
4590 public final void variableDeclarator(
4591 AST mods, AST t
4592 ) throws RecognitionException, TokenStreamException {
4593
4594 returnAST = null;
4595 ASTPair currentAST = new ASTPair();
4596 AST variableDeclarator_AST = null;
4597 Token id = null;
4598 AST id_AST = null;
4599 AST d_AST = null;
4600 AST v_AST = null;
4601 Token first = LT(1);
4602
4603 id = LT(1);
4604 id_AST = astFactory.create(id);
4605 match(IDENT);
4606 declaratorBrackets(t);
4607 d_AST = (AST)returnAST;
4608 varInitializer();
4609 v_AST = (AST)returnAST;
4610 if ( inputState.guessing==0 ) {
4611 variableDeclarator_AST = (AST)currentAST.root;
4612 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(d_AST))).add(id_AST).add(v_AST));
4613 currentAST.root = variableDeclarator_AST;
4614 currentAST.child = variableDeclarator_AST!=null &&variableDeclarator_AST.getFirstChild()!=null ?
4615 variableDeclarator_AST.getFirstChild() : variableDeclarator_AST;
4616 currentAST.advanceChildToEnd();
4617 }
4618 returnAST = variableDeclarator_AST;
4619 }
4620
4621 public final void varInitializer() throws RecognitionException, TokenStreamException {
4622
4623 returnAST = null;
4624 ASTPair currentAST = new ASTPair();
4625 AST varInitializer_AST = null;
4626
4627 {
4628 switch ( LA(1)) {
4629 case ASSIGN:
4630 {
4631 AST tmp163_AST = null;
4632 tmp163_AST = astFactory.create(LT(1));
4633 astFactory.makeASTRoot(currentAST, tmp163_AST);
4634 match(ASSIGN);
4635 initializer();
4636 astFactory.addASTChild(currentAST, returnAST);
4637 break;
4638 }
4639 case SEMI:
4640 case COMMA:
4641 {
4642 break;
4643 }
4644 default:
4645 {
4646 throw new NoViableAltException(LT(1), getFilename());
4647 }
4648 }
4649 }
4650 varInitializer_AST = (AST)currentAST.root;
4651 returnAST = varInitializer_AST;
4652 }
4653
4654 public final void initializer() throws RecognitionException, TokenStreamException {
4655
4656 returnAST = null;
4657 ASTPair currentAST = new ASTPair();
4658 AST initializer_AST = null;
4659
4660 expression();
4661 astFactory.addASTChild(currentAST, returnAST);
4662 initializer_AST = (AST)currentAST.root;
4663 returnAST = initializer_AST;
4664 }
4665
4666 public final void expression() throws RecognitionException, TokenStreamException {
4667
4668 returnAST = null;
4669 ASTPair currentAST = new ASTPair();
4670 AST expression_AST = null;
4671 Token first = LT(1);
4672
4673 assignmentExpression();
4674 astFactory.addASTChild(currentAST, returnAST);
4675 if ( inputState.guessing==0 ) {
4676 expression_AST = (AST)currentAST.root;
4677 expression_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(EXPR,"EXPR",first,LT(1))).add(expression_AST));
4678 currentAST.root = expression_AST;
4679 currentAST.child = expression_AST!=null &&expression_AST.getFirstChild()!=null ?
4680 expression_AST.getFirstChild() : expression_AST;
4681 currentAST.advanceChildToEnd();
4682 }
4683 expression_AST = (AST)currentAST.root;
4684 returnAST = expression_AST;
4685 }
4686
4687 public final void parameterDeclaration() throws RecognitionException, TokenStreamException {
4688
4689 returnAST = null;
4690 ASTPair currentAST = new ASTPair();
4691 AST parameterDeclaration_AST = null;
4692 AST pm_AST = null;
4693 AST t_AST = null;
4694 Token id = null;
4695 AST id_AST = null;
4696 AST pd_AST = null;
4697 Token first = LT(1);
4698
4699 parameterModifier();
4700 pm_AST = (AST)returnAST;
4701 typeSpec(false);
4702 t_AST = (AST)returnAST;
4703 id = LT(1);
4704 id_AST = astFactory.create(id);
4705 match(IDENT);
4706 declaratorBrackets(t_AST);
4707 pd_AST = (AST)returnAST;
4708 if ( inputState.guessing==0 ) {
4709 parameterDeclaration_AST = (AST)currentAST.root;
4710 parameterDeclaration_AST = (AST)astFactory.make( (new ASTArray(4)).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(pd_AST))).add(id_AST));
4711 currentAST.root = parameterDeclaration_AST;
4712 currentAST.child = parameterDeclaration_AST!=null &¶meterDeclaration_AST.getFirstChild()!=null ?
4713 parameterDeclaration_AST.getFirstChild() : parameterDeclaration_AST;
4714 currentAST.advanceChildToEnd();
4715 }
4716 returnAST = parameterDeclaration_AST;
4717 }
4718
4719 public final void variableLengthParameterDeclaration() throws RecognitionException, TokenStreamException {
4720
4721 returnAST = null;
4722 ASTPair currentAST = new ASTPair();
4723 AST variableLengthParameterDeclaration_AST = null;
4724 AST pm_AST = null;
4725 AST t_AST = null;
4726 Token id = null;
4727 AST id_AST = null;
4728 AST pd_AST = null;
4729 Token first = LT(1);
4730
4731 parameterModifier();
4732 pm_AST = (AST)returnAST;
4733 typeSpec(false);
4734 t_AST = (AST)returnAST;
4735 match(TRIPLE_DOT);
4736 id = LT(1);
4737 id_AST = astFactory.create(id);
4738 match(IDENT);
4739 declaratorBrackets(t_AST);
4740 pd_AST = (AST)returnAST;
4741 if ( inputState.guessing==0 ) {
4742 variableLengthParameterDeclaration_AST = (AST)currentAST.root;
4743 variableLengthParameterDeclaration_AST = (AST)astFactory.make( (new ASTArray(4)).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(pd_AST))).add(id_AST));
4744 currentAST.root = variableLengthParameterDeclaration_AST;
4745 currentAST.child = variableLengthParameterDeclaration_AST!=null &&variableLengthParameterDeclaration_AST.getFirstChild()!=null ?
4746 variableLengthParameterDeclaration_AST.getFirstChild() : variableLengthParameterDeclaration_AST;
4747 currentAST.advanceChildToEnd();
4748 }
4749 returnAST = variableLengthParameterDeclaration_AST;
4750 }
4751
4752 public final void parameterModifier() throws RecognitionException, TokenStreamException {
4753
4754 returnAST = null;
4755 ASTPair currentAST = new ASTPair();
4756 AST parameterModifier_AST = null;
4757 Token f = null;
4758 AST f_AST = null;
4759 Token first = LT(1);
4760
4761 {
4762 _loop181:
4763 do {
4764 if ((LA(1)==AT) && (LA(2)==IDENT)) {
4765 annotation();
4766 astFactory.addASTChild(currentAST, returnAST);
4767 }
4768 else {
4769 break _loop181;
4770 }
4771
4772 } while (true);
4773 }
4774 {
4775 switch ( LA(1)) {
4776 case FINAL:
4777 {
4778 f = LT(1);
4779 f_AST = astFactory.create(f);
4780 astFactory.addASTChild(currentAST, f_AST);
4781 match(FINAL);
4782 break;
4783 }
4784 case IDENT:
4785 case LITERAL_void:
4786 case LITERAL_boolean:
4787 case LITERAL_byte:
4788 case LITERAL_char:
4789 case LITERAL_short:
4790 case LITERAL_int:
4791 case LITERAL_float:
4792 case LITERAL_long:
4793 case LITERAL_double:
4794 case AT:
4795 {
4796 break;
4797 }
4798 default:
4799 {
4800 throw new NoViableAltException(LT(1), getFilename());
4801 }
4802 }
4803 }
4804 {
4805 _loop184:
4806 do {
4807 if ((LA(1)==AT)) {
4808 annotation();
4809 astFactory.addASTChild(currentAST, returnAST);
4810 }
4811 else {
4812 break _loop184;
4813 }
4814
4815 } while (true);
4816 }
4817 if ( inputState.guessing==0 ) {
4818 parameterModifier_AST = (AST)currentAST.root;
4819 parameterModifier_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(MODIFIERS,"MODIFIERS",first,LT(1))).add(parameterModifier_AST));
4820 currentAST.root = parameterModifier_AST;
4821 currentAST.child = parameterModifier_AST!=null &¶meterModifier_AST.getFirstChild()!=null ?
4822 parameterModifier_AST.getFirstChild() : parameterModifier_AST;
4823 currentAST.advanceChildToEnd();
4824 }
4825 parameterModifier_AST = (AST)currentAST.root;
4826 returnAST = parameterModifier_AST;
4827 }
4828
4829 public final void forStatement() throws RecognitionException, TokenStreamException {
4830
4831 returnAST = null;
4832 ASTPair currentAST = new ASTPair();
4833 AST forStatement_AST = null;
4834 Token f = null;
4835 AST f_AST = null;
4836
4837 f = LT(1);
4838 f_AST = astFactory.create(f);
4839 astFactory.makeASTRoot(currentAST, f_AST);
4840 match(LITERAL_for);
4841 match(LPAREN);
4842 {
4843 boolean synPredMatched201 = false;
4844 if (((_tokenSet_36.member(LA(1))) && (_tokenSet_37.member(LA(2))))) {
4845 int _m201 = mark();
4846 synPredMatched201 = true;
4847 inputState.guessing++;
4848 try {
4849 {
4850 forInit();
4851 match(SEMI);
4852 }
4853 }
4854 catch (RecognitionException pe) {
4855 synPredMatched201 = false;
4856 }
4857 rewind(_m201);
4858 inputState.guessing--;
4859 }
4860 if ( synPredMatched201 ) {
4861 traditionalForClause();
4862 astFactory.addASTChild(currentAST, returnAST);
4863 }
4864 else if ((_tokenSet_20.member(LA(1))) && (_tokenSet_21.member(LA(2)))) {
4865 forEachClause();
4866 astFactory.addASTChild(currentAST, returnAST);
4867 }
4868 else {
4869 throw new NoViableAltException(LT(1), getFilename());
4870 }
4871
4872 }
4873 match(RPAREN);
4874 statement();
4875 astFactory.addASTChild(currentAST, returnAST);
4876 forStatement_AST = (AST)currentAST.root;
4877 returnAST = forStatement_AST;
4878 }
4879
4880 public final void casesGroup() throws RecognitionException, TokenStreamException {
4881
4882 returnAST = null;
4883 ASTPair currentAST = new ASTPair();
4884 AST casesGroup_AST = null;
4885
4886 {
4887 int _cnt206=0;
4888 _loop206:
4889 do {
4890 if ((LA(1)==LITERAL_default||LA(1)==LITERAL_case) && (_tokenSet_38.member(LA(2)))) {
4891 aCase();
4892 astFactory.addASTChild(currentAST, returnAST);
4893 }
4894 else {
4895 if ( _cnt206>=1 ) { break _loop206; } else {throw new NoViableAltException(LT(1), getFilename());}
4896 }
4897
4898 _cnt206++;
4899 } while (true);
4900 }
4901 caseSList();
4902 astFactory.addASTChild(currentAST, returnAST);
4903 if ( inputState.guessing==0 ) {
4904 casesGroup_AST = (AST)currentAST.root;
4905 casesGroup_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(CASE_GROUP,"CASE_GROUP")).add(casesGroup_AST));
4906 currentAST.root = casesGroup_AST;
4907 currentAST.child = casesGroup_AST!=null &&casesGroup_AST.getFirstChild()!=null ?
4908 casesGroup_AST.getFirstChild() : casesGroup_AST;
4909 currentAST.advanceChildToEnd();
4910 }
4911 casesGroup_AST = (AST)currentAST.root;
4912 returnAST = casesGroup_AST;
4913 }
4914
4915 public final void tryBlock() throws RecognitionException, TokenStreamException {
4916
4917 returnAST = null;
4918 ASTPair currentAST = new ASTPair();
4919 AST tryBlock_AST = null;
4920
4921 AST tmp167_AST = null;
4922 tmp167_AST = astFactory.create(LT(1));
4923 astFactory.makeASTRoot(currentAST, tmp167_AST);
4924 match(LITERAL_try);
4925 compoundStatement();
4926 astFactory.addASTChild(currentAST, returnAST);
4927 {
4928 _loop222:
4929 do {
4930 if ((LA(1)==LITERAL_catch)) {
4931 handler();
4932 astFactory.addASTChild(currentAST, returnAST);
4933 }
4934 else {
4935 break _loop222;
4936 }
4937
4938 } while (true);
4939 }
4940 {
4941 switch ( LA(1)) {
4942 case LITERAL_finally:
4943 {
4944 finallyClause();
4945 astFactory.addASTChild(currentAST, returnAST);
4946 break;
4947 }
4948 case FINAL:
4949 case ABSTRACT:
4950 case STRICTFP:
4951 case SEMI:
4952 case LITERAL_static:
4953 case IDENT:
4954 case LITERAL_super:
4955 case LT:
4956 case LITERAL_void:
4957 case LITERAL_boolean:
4958 case LITERAL_byte:
4959 case LITERAL_char:
4960 case LITERAL_short:
4961 case LITERAL_int:
4962 case LITERAL_float:
4963 case LITERAL_long:
4964 case LITERAL_double:
4965 case LITERAL_private:
4966 case LITERAL_public:
4967 case LITERAL_protected:
4968 case LITERAL_transient:
4969 case LITERAL_native:
4970 case LITERAL_threadsafe:
4971 case LITERAL_synchronized:
4972 case LITERAL_volatile:
4973 case AT:
4974 case LPAREN:
4975 case LCURLY:
4976 case RCURLY:
4977 case LITERAL_class:
4978 case LITERAL_default:
4979 case LITERAL_this:
4980 case LITERAL_if:
4981 case LITERAL_else:
4982 case LITERAL_while:
4983 case LITERAL_break:
4984 case LITERAL_continue:
4985 case LITERAL_return:
4986 case LITERAL_switch:
4987 case LITERAL_throw:
4988 case LITERAL_assert:
4989 case LITERAL_for:
4990 case LITERAL_case:
4991 case LITERAL_try:
4992 case PLUS:
4993 case MINUS:
4994 case INC:
4995 case DEC:
4996 case BNOT:
4997 case LNOT:
4998 case LITERAL_true:
4999 case LITERAL_false:
5000 case LITERAL_null:
5001 case LITERAL_new:
5002 case NUM_INT:
5003 case STRING_LITERAL:
5004 case NUM_FLOAT:
5005 case NUM_LONG:
5006 case NUM_DOUBLE:
5007 {
5008 break;
5009 }
5010 default:
5011 {
5012 throw new NoViableAltException(LT(1), getFilename());
5013 }
5014 }
5015 }
5016 tryBlock_AST = (AST)currentAST.root;
5017 returnAST = tryBlock_AST;
5018 }
5019
5020 public final void forInit() throws RecognitionException, TokenStreamException {
5021
5022 returnAST = null;
5023 ASTPair currentAST = new ASTPair();
5024 AST forInit_AST = null;
5025 Token first = LT(1);
5026
5027 {
5028 boolean synPredMatched215 = false;
5029 if (((_tokenSet_30.member(LA(1))) && (_tokenSet_31.member(LA(2))))) {
5030 int _m215 = mark();
5031 synPredMatched215 = true;
5032 inputState.guessing++;
5033 try {
5034 {
5035 declaration();
5036 }
5037 }
5038 catch (RecognitionException pe) {
5039 synPredMatched215 = false;
5040 }
5041 rewind(_m215);
5042 inputState.guessing--;
5043 }
5044 if ( synPredMatched215 ) {
5045 declaration();
5046 astFactory.addASTChild(currentAST, returnAST);
5047 }
5048 else if ((_tokenSet_32.member(LA(1))) && (_tokenSet_39.member(LA(2)))) {
5049 expressionList();
5050 astFactory.addASTChild(currentAST, returnAST);
5051 }
5052 else if ((LA(1)==SEMI)) {
5053 }
5054 else {
5055 throw new NoViableAltException(LT(1), getFilename());
5056 }
5057
5058 }
5059 if ( inputState.guessing==0 ) {
5060 forInit_AST = (AST)currentAST.root;
5061 forInit_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(FOR_INIT,"FOR_INIT",first,LT(1))).add(forInit_AST));
5062 currentAST.root = forInit_AST;
5063 currentAST.child = forInit_AST!=null &&forInit_AST.getFirstChild()!=null ?
5064 forInit_AST.getFirstChild() : forInit_AST;
5065 currentAST.advanceChildToEnd();
5066 }
5067 forInit_AST = (AST)currentAST.root;
5068 returnAST = forInit_AST;
5069 }
5070
5071 public final void traditionalForClause() throws RecognitionException, TokenStreamException {
5072
5073 returnAST = null;
5074 ASTPair currentAST = new ASTPair();
5075 AST traditionalForClause_AST = null;
5076
5077 forInit();
5078 astFactory.addASTChild(currentAST, returnAST);
5079 match(SEMI);
5080 forCond();
5081 astFactory.addASTChild(currentAST, returnAST);
5082 match(SEMI);
5083 forIter();
5084 astFactory.addASTChild(currentAST, returnAST);
5085 traditionalForClause_AST = (AST)currentAST.root;
5086 returnAST = traditionalForClause_AST;
5087 }
5088
5089 public final void forEachClause() throws RecognitionException, TokenStreamException {
5090
5091 returnAST = null;
5092 ASTPair currentAST = new ASTPair();
5093 AST forEachClause_AST = null;
5094 AST p_AST = null;
5095 Token first = LT(1);
5096
5097 parameterDeclaration();
5098 p_AST = (AST)returnAST;
5099 astFactory.addASTChild(currentAST, returnAST);
5100 match(COLON);
5101 expression();
5102 astFactory.addASTChild(currentAST, returnAST);
5103 if ( inputState.guessing==0 ) {
5104 forEachClause_AST = (AST)currentAST.root;
5105 forEachClause_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(FOR_EACH_CLAUSE,"FOR_EACH_CLAUSE",first,LT(1))).add(forEachClause_AST));
5106 currentAST.root = forEachClause_AST;
5107 currentAST.child = forEachClause_AST!=null &&forEachClause_AST.getFirstChild()!=null ?
5108 forEachClause_AST.getFirstChild() : forEachClause_AST;
5109 currentAST.advanceChildToEnd();
5110 }
5111 forEachClause_AST = (AST)currentAST.root;
5112 returnAST = forEachClause_AST;
5113 }
5114
5115 public final void forCond() throws RecognitionException, TokenStreamException {
5116
5117 returnAST = null;
5118 ASTPair currentAST = new ASTPair();
5119 AST forCond_AST = null;
5120 Token first = LT(1);
5121
5122 {
5123 switch ( LA(1)) {
5124 case IDENT:
5125 case LITERAL_super:
5126 case LT:
5127 case LITERAL_void:
5128 case LITERAL_boolean:
5129 case LITERAL_byte:
5130 case LITERAL_char:
5131 case LITERAL_short:
5132 case LITERAL_int:
5133 case LITERAL_float:
5134 case LITERAL_long:
5135 case LITERAL_double:
5136 case LPAREN:
5137 case LITERAL_this:
5138 case PLUS:
5139 case MINUS:
5140 case INC:
5141 case DEC:
5142 case BNOT:
5143 case LNOT:
5144 case LITERAL_true:
5145 case LITERAL_false:
5146 case LITERAL_null:
5147 case LITERAL_new:
5148 case NUM_INT:
5149 case STRING_LITERAL:
5150 case NUM_FLOAT:
5151 case NUM_LONG:
5152 case NUM_DOUBLE:
5153 {
5154 expression();
5155 astFactory.addASTChild(currentAST, returnAST);
5156 break;
5157 }
5158 case SEMI:
5159 {
5160 break;
5161 }
5162 default:
5163 {
5164 throw new NoViableAltException(LT(1), getFilename());
5165 }
5166 }
5167 }
5168 if ( inputState.guessing==0 ) {
5169 forCond_AST = (AST)currentAST.root;
5170 forCond_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(FOR_CONDITION,"FOR_CONDITION",first,LT(1))).add(forCond_AST));
5171 currentAST.root = forCond_AST;
5172 currentAST.child = forCond_AST!=null &&forCond_AST.getFirstChild()!=null ?
5173 forCond_AST.getFirstChild() : forCond_AST;
5174 currentAST.advanceChildToEnd();
5175 }
5176 forCond_AST = (AST)currentAST.root;
5177 returnAST = forCond_AST;
5178 }
5179
5180 public final void forIter() throws RecognitionException, TokenStreamException {
5181
5182 returnAST = null;
5183 ASTPair currentAST = new ASTPair();
5184 AST forIter_AST = null;
5185 Token first = LT(1);
5186
5187 {
5188 switch ( LA(1)) {
5189 case IDENT:
5190 case LITERAL_super:
5191 case LT:
5192 case LITERAL_void:
5193 case LITERAL_boolean:
5194 case LITERAL_byte:
5195 case LITERAL_char:
5196 case LITERAL_short:
5197 case LITERAL_int:
5198 case LITERAL_float:
5199 case LITERAL_long:
5200 case LITERAL_double:
5201 case LPAREN:
5202 case LITERAL_this:
5203 case PLUS:
5204 case MINUS:
5205 case INC:
5206 case DEC:
5207 case BNOT:
5208 case LNOT:
5209 case LITERAL_true:
5210 case LITERAL_false:
5211 case LITERAL_null:
5212 case LITERAL_new:
5213 case NUM_INT:
5214 case STRING_LITERAL:
5215 case NUM_FLOAT:
5216 case NUM_LONG:
5217 case NUM_DOUBLE:
5218 {
5219 expressionList();
5220 astFactory.addASTChild(currentAST, returnAST);
5221 break;
5222 }
5223 case RPAREN:
5224 {
5225 break;
5226 }
5227 default:
5228 {
5229 throw new NoViableAltException(LT(1), getFilename());
5230 }
5231 }
5232 }
5233 if ( inputState.guessing==0 ) {
5234 forIter_AST = (AST)currentAST.root;
5235 forIter_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(FOR_ITERATOR,"FOR_ITERATOR",first,LT(1))).add(forIter_AST));
5236 currentAST.root = forIter_AST;
5237 currentAST.child = forIter_AST!=null &&forIter_AST.getFirstChild()!=null ?
5238 forIter_AST.getFirstChild() : forIter_AST;
5239 currentAST.advanceChildToEnd();
5240 }
5241 forIter_AST = (AST)currentAST.root;
5242 returnAST = forIter_AST;
5243 }
5244
5245 public final void aCase() throws RecognitionException, TokenStreamException {
5246
5247 returnAST = null;
5248 ASTPair currentAST = new ASTPair();
5249 AST aCase_AST = null;
5250
5251 {
5252 switch ( LA(1)) {
5253 case LITERAL_case:
5254 {
5255 AST tmp171_AST = null;
5256 tmp171_AST = astFactory.create(LT(1));
5257 astFactory.makeASTRoot(currentAST, tmp171_AST);
5258 match(LITERAL_case);
5259 expression();
5260 astFactory.addASTChild(currentAST, returnAST);
5261 break;
5262 }
5263 case LITERAL_default:
5264 {
5265 AST tmp172_AST = null;
5266 tmp172_AST = astFactory.create(LT(1));
5267 astFactory.addASTChild(currentAST, tmp172_AST);
5268 match(LITERAL_default);
5269 break;
5270 }
5271 default:
5272 {
5273 throw new NoViableAltException(LT(1), getFilename());
5274 }
5275 }
5276 }
5277 match(COLON);
5278 aCase_AST = (AST)currentAST.root;
5279 returnAST = aCase_AST;
5280 }
5281
5282 public final void caseSList() throws RecognitionException, TokenStreamException {
5283
5284 returnAST = null;
5285 ASTPair currentAST = new ASTPair();
5286 AST caseSList_AST = null;
5287 Token first = LT(1);
5288
5289 {
5290 _loop211:
5291 do {
5292 if ((_tokenSet_23.member(LA(1)))) {
5293 statement();
5294 astFactory.addASTChild(currentAST, returnAST);
5295 }
5296 else {
5297 break _loop211;
5298 }
5299
5300 } while (true);
5301 }
5302 if ( inputState.guessing==0 ) {
5303 caseSList_AST = (AST)currentAST.root;
5304 caseSList_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(SLIST,"SLIST",first,LT(1))).add(caseSList_AST));
5305 currentAST.root = caseSList_AST;
5306 currentAST.child = caseSList_AST!=null &&caseSList_AST.getFirstChild()!=null ?
5307 caseSList_AST.getFirstChild() : caseSList_AST;
5308 currentAST.advanceChildToEnd();
5309 }
5310 caseSList_AST = (AST)currentAST.root;
5311 returnAST = caseSList_AST;
5312 }
5313
5314 public final void expressionList() throws RecognitionException, TokenStreamException {
5315
5316 returnAST = null;
5317 ASTPair currentAST = new ASTPair();
5318 AST expressionList_AST = null;
5319 Token first = LT(1);
5320
5321 expression();
5322 astFactory.addASTChild(currentAST, returnAST);
5323 {
5324 _loop229:
5325 do {
5326 if ((LA(1)==COMMA)) {
5327 match(COMMA);
5328 expression();
5329 astFactory.addASTChild(currentAST, returnAST);
5330 }
5331 else {
5332 break _loop229;
5333 }
5334
5335 } while (true);
5336 }
5337 if ( inputState.guessing==0 ) {
5338 expressionList_AST = (AST)currentAST.root;
5339 expressionList_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(ELIST,"ELIST",first,LT(1))).add(expressionList_AST));
5340 currentAST.root = expressionList_AST;
5341 currentAST.child = expressionList_AST!=null &&expressionList_AST.getFirstChild()!=null ?
5342 expressionList_AST.getFirstChild() : expressionList_AST;
5343 currentAST.advanceChildToEnd();
5344 }
5345 expressionList_AST = (AST)currentAST.root;
5346 returnAST = expressionList_AST;
5347 }
5348
5349 public final void handler() throws RecognitionException, TokenStreamException {
5350
5351 returnAST = null;
5352 ASTPair currentAST = new ASTPair();
5353 AST handler_AST = null;
5354
5355 AST tmp175_AST = null;
5356 tmp175_AST = astFactory.create(LT(1));
5357 astFactory.makeASTRoot(currentAST, tmp175_AST);
5358 match(LITERAL_catch);
5359 match(LPAREN);
5360 parameterDeclaration();
5361 astFactory.addASTChild(currentAST, returnAST);
5362 match(RPAREN);
5363 compoundStatement();
5364 astFactory.addASTChild(currentAST, returnAST);
5365 handler_AST = (AST)currentAST.root;
5366 returnAST = handler_AST;
5367 }
5368
5369 public final void finallyClause() throws RecognitionException, TokenStreamException {
5370
5371 returnAST = null;
5372 ASTPair currentAST = new ASTPair();
5373 AST finallyClause_AST = null;
5374
5375 AST tmp178_AST = null;
5376 tmp178_AST = astFactory.create(LT(1));
5377 astFactory.makeASTRoot(currentAST, tmp178_AST);
5378 match(LITERAL_finally);
5379 compoundStatement();
5380 astFactory.addASTChild(currentAST, returnAST);
5381 finallyClause_AST = (AST)currentAST.root;
5382 returnAST = finallyClause_AST;
5383 }
5384
5385 public final void assignmentExpression() throws RecognitionException, TokenStreamException {
5386
5387 returnAST = null;
5388 ASTPair currentAST = new ASTPair();
5389 AST assignmentExpression_AST = null;
5390
5391 conditionalExpression();
5392 astFactory.addASTChild(currentAST, returnAST);
5393 {
5394 switch ( LA(1)) {
5395 case ASSIGN:
5396 case PLUS_ASSIGN:
5397 case MINUS_ASSIGN:
5398 case STAR_ASSIGN:
5399 case DIV_ASSIGN:
5400 case MOD_ASSIGN:
5401 case SR_ASSIGN:
5402 case BSR_ASSIGN:
5403 case SL_ASSIGN:
5404 case BAND_ASSIGN:
5405 case BXOR_ASSIGN:
5406 case BOR_ASSIGN:
5407 {
5408 {
5409 switch ( LA(1)) {
5410 case ASSIGN:
5411 {
5412 AST tmp179_AST = null;
5413 tmp179_AST = astFactory.create(LT(1));
5414 astFactory.makeASTRoot(currentAST, tmp179_AST);
5415 match(ASSIGN);
5416 break;
5417 }
5418 case PLUS_ASSIGN:
5419 {
5420 AST tmp180_AST = null;
5421 tmp180_AST = astFactory.create(LT(1));
5422 astFactory.makeASTRoot(currentAST, tmp180_AST);
5423 match(PLUS_ASSIGN);
5424 break;
5425 }
5426 case MINUS_ASSIGN:
5427 {
5428 AST tmp181_AST = null;
5429 tmp181_AST = astFactory.create(LT(1));
5430 astFactory.makeASTRoot(currentAST, tmp181_AST);
5431 match(MINUS_ASSIGN);
5432 break;
5433 }
5434 case STAR_ASSIGN:
5435 {
5436 AST tmp182_AST = null;
5437 tmp182_AST = astFactory.create(LT(1));
5438 astFactory.makeASTRoot(currentAST, tmp182_AST);
5439 match(STAR_ASSIGN);
5440 break;
5441 }
5442 case DIV_ASSIGN:
5443 {
5444 AST tmp183_AST = null;
5445 tmp183_AST = astFactory.create(LT(1));
5446 astFactory.makeASTRoot(currentAST, tmp183_AST);
5447 match(DIV_ASSIGN);
5448 break;
5449 }
5450 case MOD_ASSIGN:
5451 {
5452 AST tmp184_AST = null;
5453 tmp184_AST = astFactory.create(LT(1));
5454 astFactory.makeASTRoot(currentAST, tmp184_AST);
5455 match(MOD_ASSIGN);
5456 break;
5457 }
5458 case SR_ASSIGN:
5459 {
5460 AST tmp185_AST = null;
5461 tmp185_AST = astFactory.create(LT(1));
5462 astFactory.makeASTRoot(currentAST, tmp185_AST);
5463 match(SR_ASSIGN);
5464 break;
5465 }
5466 case BSR_ASSIGN:
5467 {
5468 AST tmp186_AST = null;
5469 tmp186_AST = astFactory.create(LT(1));
5470 astFactory.makeASTRoot(currentAST, tmp186_AST);
5471 match(BSR_ASSIGN);
5472 break;
5473 }
5474 case SL_ASSIGN:
5475 {
5476 AST tmp187_AST = null;
5477 tmp187_AST = astFactory.create(LT(1));
5478 astFactory.makeASTRoot(currentAST, tmp187_AST);
5479 match(SL_ASSIGN);
5480 break;
5481 }
5482 case BAND_ASSIGN:
5483 {
5484 AST tmp188_AST = null;
5485 tmp188_AST = astFactory.create(LT(1));
5486 astFactory.makeASTRoot(currentAST, tmp188_AST);
5487 match(BAND_ASSIGN);
5488 break;
5489 }
5490 case BXOR_ASSIGN:
5491 {
5492 AST tmp189_AST = null;
5493 tmp189_AST = astFactory.create(LT(1));
5494 astFactory.makeASTRoot(currentAST, tmp189_AST);
5495 match(BXOR_ASSIGN);
5496 break;
5497 }
5498 case BOR_ASSIGN:
5499 {
5500 AST tmp190_AST = null;
5501 tmp190_AST = astFactory.create(LT(1));
5502 astFactory.makeASTRoot(currentAST, tmp190_AST);
5503 match(BOR_ASSIGN);
5504 break;
5505 }
5506 default:
5507 {
5508 throw new NoViableAltException(LT(1), getFilename());
5509 }
5510 }
5511 }
5512 assignmentExpression();
5513 astFactory.addASTChild(currentAST, returnAST);
5514 break;
5515 }
5516 case SEMI:
5517 case RBRACK:
5518 case COMMA:
5519 case RPAREN:
5520 case COLON:
5521 {
5522 break;
5523 }
5524 default:
5525 {
5526 throw new NoViableAltException(LT(1), getFilename());
5527 }
5528 }
5529 }
5530 assignmentExpression_AST = (AST)currentAST.root;
5531 returnAST = assignmentExpression_AST;
5532 }
5533
5534 public final void logicalOrExpression() throws RecognitionException, TokenStreamException {
5535
5536 returnAST = null;
5537 ASTPair currentAST = new ASTPair();
5538 AST logicalOrExpression_AST = null;
5539
5540 logicalAndExpression();
5541 astFactory.addASTChild(currentAST, returnAST);
5542 {
5543 _loop237:
5544 do {
5545 if ((LA(1)==LOR)) {
5546 AST tmp191_AST = null;
5547 tmp191_AST = astFactory.create(LT(1));
5548 astFactory.makeASTRoot(currentAST, tmp191_AST);
5549 match(LOR);
5550 logicalAndExpression();
5551 astFactory.addASTChild(currentAST, returnAST);
5552 }
5553 else {
5554 break _loop237;
5555 }
5556
5557 } while (true);
5558 }
5559 logicalOrExpression_AST = (AST)currentAST.root;
5560 returnAST = logicalOrExpression_AST;
5561 }
5562
5563 public final void logicalAndExpression() throws RecognitionException, TokenStreamException {
5564
5565 returnAST = null;
5566 ASTPair currentAST = new ASTPair();
5567 AST logicalAndExpression_AST = null;
5568
5569 inclusiveOrExpression();
5570 astFactory.addASTChild(currentAST, returnAST);
5571 {
5572 _loop240:
5573 do {
5574 if ((LA(1)==LAND)) {
5575 AST tmp192_AST = null;
5576 tmp192_AST = astFactory.create(LT(1));
5577 astFactory.makeASTRoot(currentAST, tmp192_AST);
5578 match(LAND);
5579 inclusiveOrExpression();
5580 astFactory.addASTChild(currentAST, returnAST);
5581 }
5582 else {
5583 break _loop240;
5584 }
5585
5586 } while (true);
5587 }
5588 logicalAndExpression_AST = (AST)currentAST.root;
5589 returnAST = logicalAndExpression_AST;
5590 }
5591
5592 public final void inclusiveOrExpression() throws RecognitionException, TokenStreamException {
5593
5594 returnAST = null;
5595 ASTPair currentAST = new ASTPair();
5596 AST inclusiveOrExpression_AST = null;
5597
5598 exclusiveOrExpression();
5599 astFactory.addASTChild(currentAST, returnAST);
5600 {
5601 _loop243:
5602 do {
5603 if ((LA(1)==BOR)) {
5604 AST tmp193_AST = null;
5605 tmp193_AST = astFactory.create(LT(1));
5606 astFactory.makeASTRoot(currentAST, tmp193_AST);
5607 match(BOR);
5608 exclusiveOrExpression();
5609 astFactory.addASTChild(currentAST, returnAST);
5610 }
5611 else {
5612 break _loop243;
5613 }
5614
5615 } while (true);
5616 }
5617 inclusiveOrExpression_AST = (AST)currentAST.root;
5618 returnAST = inclusiveOrExpression_AST;
5619 }
5620
5621 public final void exclusiveOrExpression() throws RecognitionException, TokenStreamException {
5622
5623 returnAST = null;
5624 ASTPair currentAST = new ASTPair();
5625 AST exclusiveOrExpression_AST = null;
5626
5627 andExpression();
5628 astFactory.addASTChild(currentAST, returnAST);
5629 {
5630 _loop246:
5631 do {
5632 if ((LA(1)==BXOR)) {
5633 AST tmp194_AST = null;
5634 tmp194_AST = astFactory.create(LT(1));
5635 astFactory.makeASTRoot(currentAST, tmp194_AST);
5636 match(BXOR);
5637 andExpression();
5638 astFactory.addASTChild(currentAST, returnAST);
5639 }
5640 else {
5641 break _loop246;
5642 }
5643
5644 } while (true);
5645 }
5646 exclusiveOrExpression_AST = (AST)currentAST.root;
5647 returnAST = exclusiveOrExpression_AST;
5648 }
5649
5650 public final void andExpression() throws RecognitionException, TokenStreamException {
5651
5652 returnAST = null;
5653 ASTPair currentAST = new ASTPair();
5654 AST andExpression_AST = null;
5655
5656 equalityExpression();
5657 astFactory.addASTChild(currentAST, returnAST);
5658 {
5659 _loop249:
5660 do {
5661 if ((LA(1)==BAND)) {
5662 AST tmp195_AST = null;
5663 tmp195_AST = astFactory.create(LT(1));
5664 astFactory.makeASTRoot(currentAST, tmp195_AST);
5665 match(BAND);
5666 equalityExpression();
5667 astFactory.addASTChild(currentAST, returnAST);
5668 }
5669 else {
5670 break _loop249;
5671 }
5672
5673 } while (true);
5674 }
5675 andExpression_AST = (AST)currentAST.root;
5676 returnAST = andExpression_AST;
5677 }
5678
5679 public final void equalityExpression() throws RecognitionException, TokenStreamException {
5680
5681 returnAST = null;
5682 ASTPair currentAST = new ASTPair();
5683 AST equalityExpression_AST = null;
5684
5685 relationalExpression();
5686 astFactory.addASTChild(currentAST, returnAST);
5687 {
5688 _loop253:
5689 do {
5690 if ((LA(1)==NOT_EQUAL||LA(1)==EQUAL)) {
5691 {
5692 switch ( LA(1)) {
5693 case NOT_EQUAL:
5694 {
5695 AST tmp196_AST = null;
5696 tmp196_AST = astFactory.create(LT(1));
5697 astFactory.makeASTRoot(currentAST, tmp196_AST);
5698 match(NOT_EQUAL);
5699 break;
5700 }
5701 case EQUAL:
5702 {
5703 AST tmp197_AST = null;
5704 tmp197_AST = astFactory.create(LT(1));
5705 astFactory.makeASTRoot(currentAST, tmp197_AST);
5706 match(EQUAL);
5707 break;
5708 }
5709 default:
5710 {
5711 throw new NoViableAltException(LT(1), getFilename());
5712 }
5713 }
5714 }
5715 relationalExpression();
5716 astFactory.addASTChild(currentAST, returnAST);
5717 }
5718 else {
5719 break _loop253;
5720 }
5721
5722 } while (true);
5723 }
5724 equalityExpression_AST = (AST)currentAST.root;
5725 returnAST = equalityExpression_AST;
5726 }
5727
5728 public final void relationalExpression() throws RecognitionException, TokenStreamException {
5729
5730 returnAST = null;
5731 ASTPair currentAST = new ASTPair();
5732 AST relationalExpression_AST = null;
5733
5734 shiftExpression();
5735 astFactory.addASTChild(currentAST, returnAST);
5736 {
5737 switch ( LA(1)) {
5738 case SEMI:
5739 case RBRACK:
5740 case QUESTION:
5741 case LT:
5742 case COMMA:
5743 case GT:
5744 case RPAREN:
5745 case ASSIGN:
5746 case RCURLY:
5747 case BAND:
5748 case COLON:
5749 case PLUS_ASSIGN:
5750 case MINUS_ASSIGN:
5751 case STAR_ASSIGN:
5752 case DIV_ASSIGN:
5753 case MOD_ASSIGN:
5754 case SR_ASSIGN:
5755 case BSR_ASSIGN:
5756 case SL_ASSIGN:
5757 case BAND_ASSIGN:
5758 case BXOR_ASSIGN:
5759 case BOR_ASSIGN:
5760 case LOR:
5761 case LAND:
5762 case BOR:
5763 case BXOR:
5764 case NOT_EQUAL:
5765 case EQUAL:
5766 case LE:
5767 case GE:
5768 {
5769 {
5770 _loop258:
5771 do {
5772 if ((_tokenSet_40.member(LA(1)))) {
5773 {
5774 switch ( LA(1)) {
5775 case LT:
5776 {
5777 AST tmp198_AST = null;
5778 tmp198_AST = astFactory.create(LT(1));
5779 astFactory.makeASTRoot(currentAST, tmp198_AST);
5780 match(LT);
5781 break;
5782 }
5783 case GT:
5784 {
5785 AST tmp199_AST = null;
5786 tmp199_AST = astFactory.create(LT(1));
5787 astFactory.makeASTRoot(currentAST, tmp199_AST);
5788 match(GT);
5789 break;
5790 }
5791 case LE:
5792 {
5793 AST tmp200_AST = null;
5794 tmp200_AST = astFactory.create(LT(1));
5795 astFactory.makeASTRoot(currentAST, tmp200_AST);
5796 match(LE);
5797 break;
5798 }
5799 case GE:
5800 {
5801 AST tmp201_AST = null;
5802 tmp201_AST = astFactory.create(LT(1));
5803 astFactory.makeASTRoot(currentAST, tmp201_AST);
5804 match(GE);
5805 break;
5806 }
5807 default:
5808 {
5809 throw new NoViableAltException(LT(1), getFilename());
5810 }
5811 }
5812 }
5813 shiftExpression();
5814 astFactory.addASTChild(currentAST, returnAST);
5815 }
5816 else {
5817 break _loop258;
5818 }
5819
5820 } while (true);
5821 }
5822 break;
5823 }
5824 case LITERAL_instanceof:
5825 {
5826 AST tmp202_AST = null;
5827 tmp202_AST = astFactory.create(LT(1));
5828 astFactory.makeASTRoot(currentAST, tmp202_AST);
5829 match(LITERAL_instanceof);
5830 typeSpec(true);
5831 astFactory.addASTChild(currentAST, returnAST);
5832 break;
5833 }
5834 default:
5835 {
5836 throw new NoViableAltException(LT(1), getFilename());
5837 }
5838 }
5839 }
5840 relationalExpression_AST = (AST)currentAST.root;
5841 returnAST = relationalExpression_AST;
5842 }
5843
5844 public final void shiftExpression() throws RecognitionException, TokenStreamException {
5845
5846 returnAST = null;
5847 ASTPair currentAST = new ASTPair();
5848 AST shiftExpression_AST = null;
5849
5850 additiveExpression();
5851 astFactory.addASTChild(currentAST, returnAST);
5852 {
5853 _loop262:
5854 do {
5855 if ((_tokenSet_41.member(LA(1)))) {
5856 {
5857 switch ( LA(1)) {
5858 case SL:
5859 {
5860 AST tmp203_AST = null;
5861 tmp203_AST = astFactory.create(LT(1));
5862 astFactory.makeASTRoot(currentAST, tmp203_AST);
5863 match(SL);
5864 break;
5865 }
5866 case SR:
5867 {
5868 AST tmp204_AST = null;
5869 tmp204_AST = astFactory.create(LT(1));
5870 astFactory.makeASTRoot(currentAST, tmp204_AST);
5871 match(SR);
5872 break;
5873 }
5874 case BSR:
5875 {
5876 AST tmp205_AST = null;
5877 tmp205_AST = astFactory.create(LT(1));
5878 astFactory.makeASTRoot(currentAST, tmp205_AST);
5879 match(BSR);
5880 break;
5881 }
5882 default:
5883 {
5884 throw new NoViableAltException(LT(1), getFilename());
5885 }
5886 }
5887 }
5888 additiveExpression();
5889 astFactory.addASTChild(currentAST, returnAST);
5890 }
5891 else {
5892 break _loop262;
5893 }
5894
5895 } while (true);
5896 }
5897 shiftExpression_AST = (AST)currentAST.root;
5898 returnAST = shiftExpression_AST;
5899 }
5900
5901 public final void additiveExpression() throws RecognitionException, TokenStreamException {
5902
5903 returnAST = null;
5904 ASTPair currentAST = new ASTPair();
5905 AST additiveExpression_AST = null;
5906
5907 multiplicativeExpression();
5908 astFactory.addASTChild(currentAST, returnAST);
5909 {
5910 _loop266:
5911 do {
5912 if ((LA(1)==PLUS||LA(1)==MINUS)) {
5913 {
5914 switch ( LA(1)) {
5915 case PLUS:
5916 {
5917 AST tmp206_AST = null;
5918 tmp206_AST = astFactory.create(LT(1));
5919 astFactory.makeASTRoot(currentAST, tmp206_AST);
5920 match(PLUS);
5921 break;
5922 }
5923 case MINUS:
5924 {
5925 AST tmp207_AST = null;
5926 tmp207_AST = astFactory.create(LT(1));
5927 astFactory.makeASTRoot(currentAST, tmp207_AST);
5928 match(MINUS);
5929 break;
5930 }
5931 default:
5932 {
5933 throw new NoViableAltException(LT(1), getFilename());
5934 }
5935 }
5936 }
5937 multiplicativeExpression();
5938 astFactory.addASTChild(currentAST, returnAST);
5939 }
5940 else {
5941 break _loop266;
5942 }
5943
5944 } while (true);
5945 }
5946 additiveExpression_AST = (AST)currentAST.root;
5947 returnAST = additiveExpression_AST;
5948 }
5949
5950 public final void multiplicativeExpression() throws RecognitionException, TokenStreamException {
5951
5952 returnAST = null;
5953 ASTPair currentAST = new ASTPair();
5954 AST multiplicativeExpression_AST = null;
5955
5956 unaryExpression();
5957 astFactory.addASTChild(currentAST, returnAST);
5958 {
5959 _loop270:
5960 do {
5961 if ((_tokenSet_42.member(LA(1)))) {
5962 {
5963 switch ( LA(1)) {
5964 case STAR:
5965 {
5966 AST tmp208_AST = null;
5967 tmp208_AST = astFactory.create(LT(1));
5968 astFactory.makeASTRoot(currentAST, tmp208_AST);
5969 match(STAR);
5970 break;
5971 }
5972 case DIV:
5973 {
5974 AST tmp209_AST = null;
5975 tmp209_AST = astFactory.create(LT(1));
5976 astFactory.makeASTRoot(currentAST, tmp209_AST);
5977 match(DIV);
5978 break;
5979 }
5980 case MOD:
5981 {
5982 AST tmp210_AST = null;
5983 tmp210_AST = astFactory.create(LT(1));
5984 astFactory.makeASTRoot(currentAST, tmp210_AST);
5985 match(MOD);
5986 break;
5987 }
5988 default:
5989 {
5990 throw new NoViableAltException(LT(1), getFilename());
5991 }
5992 }
5993 }
5994 unaryExpression();
5995 astFactory.addASTChild(currentAST, returnAST);
5996 }
5997 else {
5998 break _loop270;
5999 }
6000
6001 } while (true);
6002 }
6003 multiplicativeExpression_AST = (AST)currentAST.root;
6004 returnAST = multiplicativeExpression_AST;
6005 }
6006
6007 public final void unaryExpression() throws RecognitionException, TokenStreamException {
6008
6009 returnAST = null;
6010 ASTPair currentAST = new ASTPair();
6011 AST unaryExpression_AST = null;
6012
6013 switch ( LA(1)) {
6014 case INC:
6015 {
6016 AST tmp211_AST = null;
6017 tmp211_AST = astFactory.create(LT(1));
6018 astFactory.makeASTRoot(currentAST, tmp211_AST);
6019 match(INC);
6020 unaryExpression();
6021 astFactory.addASTChild(currentAST, returnAST);
6022 unaryExpression_AST = (AST)currentAST.root;
6023 break;
6024 }
6025 case DEC:
6026 {
6027 AST tmp212_AST = null;
6028 tmp212_AST = astFactory.create(LT(1));
6029 astFactory.makeASTRoot(currentAST, tmp212_AST);
6030 match(DEC);
6031 unaryExpression();
6032 astFactory.addASTChild(currentAST, returnAST);
6033 unaryExpression_AST = (AST)currentAST.root;
6034 break;
6035 }
6036 case MINUS:
6037 {
6038 AST tmp213_AST = null;
6039 tmp213_AST = astFactory.create(LT(1));
6040 astFactory.makeASTRoot(currentAST, tmp213_AST);
6041 match(MINUS);
6042 if ( inputState.guessing==0 ) {
6043 tmp213_AST.setType(UNARY_MINUS);
6044 }
6045 unaryExpression();
6046 astFactory.addASTChild(currentAST, returnAST);
6047 unaryExpression_AST = (AST)currentAST.root;
6048 break;
6049 }
6050 case PLUS:
6051 {
6052 AST tmp214_AST = null;
6053 tmp214_AST = astFactory.create(LT(1));
6054 astFactory.makeASTRoot(currentAST, tmp214_AST);
6055 match(PLUS);
6056 if ( inputState.guessing==0 ) {
6057 tmp214_AST.setType(UNARY_PLUS);
6058 }
6059 unaryExpression();
6060 astFactory.addASTChild(currentAST, returnAST);
6061 unaryExpression_AST = (AST)currentAST.root;
6062 break;
6063 }
6064 case IDENT:
6065 case LITERAL_super:
6066 case LT:
6067 case LITERAL_void:
6068 case LITERAL_boolean:
6069 case LITERAL_byte:
6070 case LITERAL_char:
6071 case LITERAL_short:
6072 case LITERAL_int:
6073 case LITERAL_float:
6074 case LITERAL_long:
6075 case LITERAL_double:
6076 case LPAREN:
6077 case LITERAL_this:
6078 case BNOT:
6079 case LNOT:
6080 case LITERAL_true:
6081 case LITERAL_false:
6082 case LITERAL_null:
6083 case LITERAL_new:
6084 case NUM_INT:
6085 case STRING_LITERAL:
6086 case NUM_FLOAT:
6087 case NUM_LONG:
6088 case NUM_DOUBLE:
6089 {
6090 unaryExpressionNotPlusMinus();
6091 astFactory.addASTChild(currentAST, returnAST);
6092 unaryExpression_AST = (AST)currentAST.root;
6093 break;
6094 }
6095 default:
6096 {
6097 throw new NoViableAltException(LT(1), getFilename());
6098 }
6099 }
6100 returnAST = unaryExpression_AST;
6101 }
6102
6103 public final void unaryExpressionNotPlusMinus() throws RecognitionException, TokenStreamException {
6104
6105 returnAST = null;
6106 ASTPair currentAST = new ASTPair();
6107 AST unaryExpressionNotPlusMinus_AST = null;
6108 Token lpb = null;
6109 AST lpb_AST = null;
6110 Token lp = null;
6111 AST lp_AST = null;
6112
6113 switch ( LA(1)) {
6114 case BNOT:
6115 {
6116 AST tmp215_AST = null;
6117 tmp215_AST = astFactory.create(LT(1));
6118 astFactory.makeASTRoot(currentAST, tmp215_AST);
6119 match(BNOT);
6120 unaryExpression();
6121 astFactory.addASTChild(currentAST, returnAST);
6122 unaryExpressionNotPlusMinus_AST = (AST)currentAST.root;
6123 break;
6124 }
6125 case LNOT:
6126 {
6127 AST tmp216_AST = null;
6128 tmp216_AST = astFactory.create(LT(1));
6129 astFactory.makeASTRoot(currentAST, tmp216_AST);
6130 match(LNOT);
6131 unaryExpression();
6132 astFactory.addASTChild(currentAST, returnAST);
6133 unaryExpressionNotPlusMinus_AST = (AST)currentAST.root;
6134 break;
6135 }
6136 case IDENT:
6137 case LITERAL_super:
6138 case LT:
6139 case LITERAL_void:
6140 case LITERAL_boolean:
6141 case LITERAL_byte:
6142 case LITERAL_char:
6143 case LITERAL_short:
6144 case LITERAL_int:
6145 case LITERAL_float:
6146 case LITERAL_long:
6147 case LITERAL_double:
6148 case LPAREN:
6149 case LITERAL_this:
6150 case LITERAL_true:
6151 case LITERAL_false:
6152 case LITERAL_null:
6153 case LITERAL_new:
6154 case NUM_INT:
6155 case STRING_LITERAL:
6156 case NUM_FLOAT:
6157 case NUM_LONG:
6158 case NUM_DOUBLE:
6159 {
6160 {
6161 boolean synPredMatched275 = false;
6162 if (((LA(1)==LPAREN) && ((LA(2) >= LITERAL_void && LA(2) <= LITERAL_double)))) {
6163 int _m275 = mark();
6164 synPredMatched275 = true;
6165 inputState.guessing++;
6166 try {
6167 {
6168 match(LPAREN);
6169 builtInTypeSpec(true);
6170 match(RPAREN);
6171 unaryExpression();
6172 }
6173 }
6174 catch (RecognitionException pe) {
6175 synPredMatched275 = false;
6176 }
6177 rewind(_m275);
6178 inputState.guessing--;
6179 }
6180 if ( synPredMatched275 ) {
6181 lpb = LT(1);
6182 lpb_AST = astFactory.create(lpb);
6183 astFactory.makeASTRoot(currentAST, lpb_AST);
6184 match(LPAREN);
6185 if ( inputState.guessing==0 ) {
6186 lpb_AST.setType(TYPECAST);
6187 }
6188 builtInTypeSpec(true);
6189 astFactory.addASTChild(currentAST, returnAST);
6190 match(RPAREN);
6191 unaryExpression();
6192 astFactory.addASTChild(currentAST, returnAST);
6193 }
6194 else {
6195 boolean synPredMatched277 = false;
6196 if (((LA(1)==LPAREN) && (LA(2)==IDENT))) {
6197 int _m277 = mark();
6198 synPredMatched277 = true;
6199 inputState.guessing++;
6200 try {
6201 {
6202 match(LPAREN);
6203 classTypeSpec(true);
6204 match(RPAREN);
6205 unaryExpressionNotPlusMinus();
6206 }
6207 }
6208 catch (RecognitionException pe) {
6209 synPredMatched277 = false;
6210 }
6211 rewind(_m277);
6212 inputState.guessing--;
6213 }
6214 if ( synPredMatched277 ) {
6215 lp = LT(1);
6216 lp_AST = astFactory.create(lp);
6217 astFactory.makeASTRoot(currentAST, lp_AST);
6218 match(LPAREN);
6219 if ( inputState.guessing==0 ) {
6220 lp_AST.setType(TYPECAST);
6221 }
6222 classTypeSpec(true);
6223 astFactory.addASTChild(currentAST, returnAST);
6224 match(RPAREN);
6225 unaryExpressionNotPlusMinus();
6226 astFactory.addASTChild(currentAST, returnAST);
6227 }
6228 else if ((_tokenSet_43.member(LA(1))) && (_tokenSet_44.member(LA(2)))) {
6229 postfixExpression();
6230 astFactory.addASTChild(currentAST, returnAST);
6231 }
6232 else {
6233 throw new NoViableAltException(LT(1), getFilename());
6234 }
6235 }
6236 }
6237 unaryExpressionNotPlusMinus_AST = (AST)currentAST.root;
6238 break;
6239 }
6240 default:
6241 {
6242 throw new NoViableAltException(LT(1), getFilename());
6243 }
6244 }
6245 returnAST = unaryExpressionNotPlusMinus_AST;
6246 }
6247
6248 public final void postfixExpression() throws RecognitionException, TokenStreamException {
6249
6250 returnAST = null;
6251 ASTPair currentAST = new ASTPair();
6252 AST postfixExpression_AST = null;
6253 Token lp = null;
6254 AST lp_AST = null;
6255 Token lp3 = null;
6256 AST lp3_AST = null;
6257 Token lps = null;
6258 AST lps_AST = null;
6259 Token lb = null;
6260 AST lb_AST = null;
6261 Token in = null;
6262 AST in_AST = null;
6263 Token de = null;
6264 AST de_AST = null;
6265
6266 primaryExpression();
6267 astFactory.addASTChild(currentAST, returnAST);
6268 {
6269 _loop286:
6270 do {
6271 if ((LA(1)==DOT) && (_tokenSet_45.member(LA(2)))) {
6272 AST tmp219_AST = null;
6273 tmp219_AST = astFactory.create(LT(1));
6274 astFactory.makeASTRoot(currentAST, tmp219_AST);
6275 match(DOT);
6276 {
6277 switch ( LA(1)) {
6278 case LT:
6279 {
6280 typeArguments();
6281 astFactory.addASTChild(currentAST, returnAST);
6282 break;
6283 }
6284 case IDENT:
6285 case LITERAL_super:
6286 {
6287 break;
6288 }
6289 default:
6290 {
6291 throw new NoViableAltException(LT(1), getFilename());
6292 }
6293 }
6294 }
6295 {
6296 switch ( LA(1)) {
6297 case IDENT:
6298 {
6299 AST tmp220_AST = null;
6300 tmp220_AST = astFactory.create(LT(1));
6301 astFactory.addASTChild(currentAST, tmp220_AST);
6302 match(IDENT);
6303 {
6304 switch ( LA(1)) {
6305 case LPAREN:
6306 {
6307 lp = LT(1);
6308 lp_AST = astFactory.create(lp);
6309 astFactory.makeASTRoot(currentAST, lp_AST);
6310 match(LPAREN);
6311 if ( inputState.guessing==0 ) {
6312 lp_AST.setType(METHOD_CALL);
6313 }
6314 argList();
6315 astFactory.addASTChild(currentAST, returnAST);
6316 match(RPAREN);
6317 break;
6318 }
6319 case SEMI:
6320 case LBRACK:
6321 case RBRACK:
6322 case DOT:
6323 case QUESTION:
6324 case LT:
6325 case COMMA:
6326 case GT:
6327 case SR:
6328 case BSR:
6329 case STAR:
6330 case RPAREN:
6331 case ASSIGN:
6332 case RCURLY:
6333 case BAND:
6334 case COLON:
6335 case PLUS_ASSIGN:
6336 case MINUS_ASSIGN:
6337 case STAR_ASSIGN:
6338 case DIV_ASSIGN:
6339 case MOD_ASSIGN:
6340 case SR_ASSIGN:
6341 case BSR_ASSIGN:
6342 case SL_ASSIGN:
6343 case BAND_ASSIGN:
6344 case BXOR_ASSIGN:
6345 case BOR_ASSIGN:
6346 case LOR:
6347 case LAND:
6348 case BOR:
6349 case BXOR:
6350 case NOT_EQUAL:
6351 case EQUAL:
6352 case LE:
6353 case GE:
6354 case LITERAL_instanceof:
6355 case SL:
6356 case PLUS:
6357 case MINUS:
6358 case DIV:
6359 case MOD:
6360 case INC:
6361 case DEC:
6362 {
6363 break;
6364 }
6365 default:
6366 {
6367 throw new NoViableAltException(LT(1), getFilename());
6368 }
6369 }
6370 }
6371 break;
6372 }
6373 case LITERAL_super:
6374 {
6375 AST tmp222_AST = null;
6376 tmp222_AST = astFactory.create(LT(1));
6377 astFactory.addASTChild(currentAST, tmp222_AST);
6378 match(LITERAL_super);
6379 {
6380 switch ( LA(1)) {
6381 case LPAREN:
6382 {
6383 lp3 = LT(1);
6384 lp3_AST = astFactory.create(lp3);
6385 astFactory.makeASTRoot(currentAST, lp3_AST);
6386 match(LPAREN);
6387 argList();
6388 astFactory.addASTChild(currentAST, returnAST);
6389 match(RPAREN);
6390 if ( inputState.guessing==0 ) {
6391 lp3_AST.setType(SUPER_CTOR_CALL);
6392 }
6393 break;
6394 }
6395 case DOT:
6396 {
6397 AST tmp224_AST = null;
6398 tmp224_AST = astFactory.create(LT(1));
6399 astFactory.makeASTRoot(currentAST, tmp224_AST);
6400 match(DOT);
6401 {
6402 switch ( LA(1)) {
6403 case LT:
6404 {
6405 typeArguments();
6406 astFactory.addASTChild(currentAST, returnAST);
6407 break;
6408 }
6409 case IDENT:
6410 {
6411 break;
6412 }
6413 default:
6414 {
6415 throw new NoViableAltException(LT(1), getFilename());
6416 }
6417 }
6418 }
6419 AST tmp225_AST = null;
6420 tmp225_AST = astFactory.create(LT(1));
6421 astFactory.addASTChild(currentAST, tmp225_AST);
6422 match(IDENT);
6423 {
6424 switch ( LA(1)) {
6425 case LPAREN:
6426 {
6427 lps = LT(1);
6428 lps_AST = astFactory.create(lps);
6429 astFactory.makeASTRoot(currentAST, lps_AST);
6430 match(LPAREN);
6431 if ( inputState.guessing==0 ) {
6432 lps_AST.setType(METHOD_CALL);
6433 }
6434 argList();
6435 astFactory.addASTChild(currentAST, returnAST);
6436 match(RPAREN);
6437 break;
6438 }
6439 case SEMI:
6440 case LBRACK:
6441 case RBRACK:
6442 case DOT:
6443 case QUESTION:
6444 case LT:
6445 case COMMA:
6446 case GT:
6447 case SR:
6448 case BSR:
6449 case STAR:
6450 case RPAREN:
6451 case ASSIGN:
6452 case RCURLY:
6453 case BAND:
6454 case COLON:
6455 case PLUS_ASSIGN:
6456 case MINUS_ASSIGN:
6457 case STAR_ASSIGN:
6458 case DIV_ASSIGN:
6459 case MOD_ASSIGN:
6460 case SR_ASSIGN:
6461 case BSR_ASSIGN:
6462 case SL_ASSIGN:
6463 case BAND_ASSIGN:
6464 case BXOR_ASSIGN:
6465 case BOR_ASSIGN:
6466 case LOR:
6467 case LAND:
6468 case BOR:
6469 case BXOR:
6470 case NOT_EQUAL:
6471 case EQUAL:
6472 case LE:
6473 case GE:
6474 case LITERAL_instanceof:
6475 case SL:
6476 case PLUS:
6477 case MINUS:
6478 case DIV:
6479 case MOD:
6480 case INC:
6481 case DEC:
6482 {
6483 break;
6484 }
6485 default:
6486 {
6487 throw new NoViableAltException(LT(1), getFilename());
6488 }
6489 }
6490 }
6491 break;
6492 }
6493 default:
6494 {
6495 throw new NoViableAltException(LT(1), getFilename());
6496 }
6497 }
6498 }
6499 break;
6500 }
6501 default:
6502 {
6503 throw new NoViableAltException(LT(1), getFilename());
6504 }
6505 }
6506 }
6507 }
6508 else if ((LA(1)==DOT) && (LA(2)==LITERAL_this)) {
6509 AST tmp227_AST = null;
6510 tmp227_AST = astFactory.create(LT(1));
6511 astFactory.makeASTRoot(currentAST, tmp227_AST);
6512 match(DOT);
6513 AST tmp228_AST = null;
6514 tmp228_AST = astFactory.create(LT(1));
6515 astFactory.addASTChild(currentAST, tmp228_AST);
6516 match(LITERAL_this);
6517 }
6518 else if ((LA(1)==DOT) && (LA(2)==LITERAL_new)) {
6519 AST tmp229_AST = null;
6520 tmp229_AST = astFactory.create(LT(1));
6521 astFactory.makeASTRoot(currentAST, tmp229_AST);
6522 match(DOT);
6523 newExpression();
6524 astFactory.addASTChild(currentAST, returnAST);
6525 }
6526 else if ((LA(1)==LBRACK)) {
6527 lb = LT(1);
6528 lb_AST = astFactory.create(lb);
6529 astFactory.makeASTRoot(currentAST, lb_AST);
6530 match(LBRACK);
6531 if ( inputState.guessing==0 ) {
6532 lb_AST.setType(INDEX_OP);
6533 }
6534 expression();
6535 astFactory.addASTChild(currentAST, returnAST);
6536 match(RBRACK);
6537 }
6538 else {
6539 break _loop286;
6540 }
6541
6542 } while (true);
6543 }
6544 {
6545 switch ( LA(1)) {
6546 case INC:
6547 {
6548 in = LT(1);
6549 in_AST = astFactory.create(in);
6550 astFactory.makeASTRoot(currentAST, in_AST);
6551 match(INC);
6552 if ( inputState.guessing==0 ) {
6553 in_AST.setType(POST_INC);
6554 }
6555 break;
6556 }
6557 case DEC:
6558 {
6559 de = LT(1);
6560 de_AST = astFactory.create(de);
6561 astFactory.makeASTRoot(currentAST, de_AST);
6562 match(DEC);
6563 if ( inputState.guessing==0 ) {
6564 de_AST.setType(POST_DEC);
6565 }
6566 break;
6567 }
6568 case SEMI:
6569 case RBRACK:
6570 case QUESTION:
6571 case LT:
6572 case COMMA:
6573 case GT:
6574 case SR:
6575 case BSR:
6576 case STAR:
6577 case RPAREN:
6578 case ASSIGN:
6579 case RCURLY:
6580 case BAND:
6581 case COLON:
6582 case PLUS_ASSIGN:
6583 case MINUS_ASSIGN:
6584 case STAR_ASSIGN:
6585 case DIV_ASSIGN:
6586 case MOD_ASSIGN:
6587 case SR_ASSIGN:
6588 case BSR_ASSIGN:
6589 case SL_ASSIGN:
6590 case BAND_ASSIGN:
6591 case BXOR_ASSIGN:
6592 case BOR_ASSIGN:
6593 case LOR:
6594 case LAND:
6595 case BOR:
6596 case BXOR:
6597 case NOT_EQUAL:
6598 case EQUAL:
6599 case LE:
6600 case GE:
6601 case LITERAL_instanceof:
6602 case SL:
6603 case PLUS:
6604 case MINUS:
6605 case DIV:
6606 case MOD:
6607 {
6608 break;
6609 }
6610 default:
6611 {
6612 throw new NoViableAltException(LT(1), getFilename());
6613 }
6614 }
6615 }
6616 postfixExpression_AST = (AST)currentAST.root;
6617 returnAST = postfixExpression_AST;
6618 }
6619
6620 public final void primaryExpression() throws RecognitionException, TokenStreamException {
6621
6622 returnAST = null;
6623 ASTPair currentAST = new ASTPair();
6624 AST primaryExpression_AST = null;
6625 Token lbt = null;
6626 AST lbt_AST = null;
6627
6628 switch ( LA(1)) {
6629 case IDENT:
6630 case LT:
6631 {
6632 identPrimary();
6633 astFactory.addASTChild(currentAST, returnAST);
6634 {
6635 if ((LA(1)==DOT) && (LA(2)==LITERAL_class)) {
6636 AST tmp231_AST = null;
6637 tmp231_AST = astFactory.create(LT(1));
6638 astFactory.makeASTRoot(currentAST, tmp231_AST);
6639 match(DOT);
6640 AST tmp232_AST = null;
6641 tmp232_AST = astFactory.create(LT(1));
6642 astFactory.addASTChild(currentAST, tmp232_AST);
6643 match(LITERAL_class);
6644 }
6645 else if ((_tokenSet_46.member(LA(1))) && (_tokenSet_47.member(LA(2)))) {
6646 }
6647 else {
6648 throw new NoViableAltException(LT(1), getFilename());
6649 }
6650
6651 }
6652 primaryExpression_AST = (AST)currentAST.root;
6653 break;
6654 }
6655 case NUM_INT:
6656 case STRING_LITERAL:
6657 case NUM_FLOAT:
6658 case NUM_LONG:
6659 case NUM_DOUBLE:
6660 {
6661 constant();
6662 astFactory.addASTChild(currentAST, returnAST);
6663 primaryExpression_AST = (AST)currentAST.root;
6664 break;
6665 }
6666 case LITERAL_true:
6667 {
6668 AST tmp233_AST = null;
6669 tmp233_AST = astFactory.create(LT(1));
6670 astFactory.addASTChild(currentAST, tmp233_AST);
6671 match(LITERAL_true);
6672 primaryExpression_AST = (AST)currentAST.root;
6673 break;
6674 }
6675 case LITERAL_false:
6676 {
6677 AST tmp234_AST = null;
6678 tmp234_AST = astFactory.create(LT(1));
6679 astFactory.addASTChild(currentAST, tmp234_AST);
6680 match(LITERAL_false);
6681 primaryExpression_AST = (AST)currentAST.root;
6682 break;
6683 }
6684 case LITERAL_null:
6685 {
6686 AST tmp235_AST = null;
6687 tmp235_AST = astFactory.create(LT(1));
6688 astFactory.addASTChild(currentAST, tmp235_AST);
6689 match(LITERAL_null);
6690 primaryExpression_AST = (AST)currentAST.root;
6691 break;
6692 }
6693 case LITERAL_new:
6694 {
6695 newExpression();
6696 astFactory.addASTChild(currentAST, returnAST);
6697 primaryExpression_AST = (AST)currentAST.root;
6698 break;
6699 }
6700 case LITERAL_this:
6701 {
6702 AST tmp236_AST = null;
6703 tmp236_AST = astFactory.create(LT(1));
6704 astFactory.addASTChild(currentAST, tmp236_AST);
6705 match(LITERAL_this);
6706 primaryExpression_AST = (AST)currentAST.root;
6707 break;
6708 }
6709 case LITERAL_super:
6710 {
6711 AST tmp237_AST = null;
6712 tmp237_AST = astFactory.create(LT(1));
6713 astFactory.addASTChild(currentAST, tmp237_AST);
6714 match(LITERAL_super);
6715 primaryExpression_AST = (AST)currentAST.root;
6716 break;
6717 }
6718 case LPAREN:
6719 {
6720 match(LPAREN);
6721 assignmentExpression();
6722 astFactory.addASTChild(currentAST, returnAST);
6723 match(RPAREN);
6724 primaryExpression_AST = (AST)currentAST.root;
6725 break;
6726 }
6727 case LITERAL_void:
6728 case LITERAL_boolean:
6729 case LITERAL_byte:
6730 case LITERAL_char:
6731 case LITERAL_short:
6732 case LITERAL_int:
6733 case LITERAL_float:
6734 case LITERAL_long:
6735 case LITERAL_double:
6736 {
6737 builtInType();
6738 astFactory.addASTChild(currentAST, returnAST);
6739 {
6740 _loop291:
6741 do {
6742 if ((LA(1)==LBRACK)) {
6743 lbt = LT(1);
6744 lbt_AST = astFactory.create(lbt);
6745 astFactory.makeASTRoot(currentAST, lbt_AST);
6746 match(LBRACK);
6747 if ( inputState.guessing==0 ) {
6748 lbt_AST.setType(ARRAY_DECLARATOR);
6749 }
6750 match(RBRACK);
6751 }
6752 else {
6753 break _loop291;
6754 }
6755
6756 } while (true);
6757 }
6758 AST tmp241_AST = null;
6759 tmp241_AST = astFactory.create(LT(1));
6760 astFactory.makeASTRoot(currentAST, tmp241_AST);
6761 match(DOT);
6762 AST tmp242_AST = null;
6763 tmp242_AST = astFactory.create(LT(1));
6764 astFactory.addASTChild(currentAST, tmp242_AST);
6765 match(LITERAL_class);
6766 primaryExpression_AST = (AST)currentAST.root;
6767 break;
6768 }
6769 default:
6770 {
6771 throw new NoViableAltException(LT(1), getFilename());
6772 }
6773 }
6774 returnAST = primaryExpression_AST;
6775 }
6776
6777 /*** object instantiation.
6778 * Trees are built as illustrated by the following input/tree pairs:
6779 *
6780 * new T()
6781 *
6782 * new
6783 * |
6784 * T -- ELIST
6785 * |
6786 * arg1 -- arg2 -- .. -- argn
6787 *
6788 * new int[]
6789 *
6790 * new
6791 * |
6792 * int -- ARRAY_DECLARATOR
6793 *
6794 * new int[] {1,2}
6795 *
6796 * new
6797 * |
6798 * int -- ARRAY_DECLARATOR -- ARRAY_INIT
6799 * |
6800 * EXPR -- EXPR
6801 * | |
6802 * 1 2
6803 *
6804 * new int[3]
6805 * new
6806 * |
6807 * int -- ARRAY_DECLARATOR
6808 * |
6809 * EXPR
6810 * |
6811 * 3
6812 *
6813 * new int[1][2]
6814 *
6815 * new
6816 * |
6817 * int -- ARRAY_DECLARATOR
6818 * |
6819 * ARRAY_DECLARATOR -- EXPR
6820 * | |
6821 * EXPR 1
6822 * |
6823 * 2
6824 *
6825 */
6826 public final void newExpression() throws RecognitionException, TokenStreamException {
6827
6828 returnAST = null;
6829 ASTPair currentAST = new ASTPair();
6830 AST newExpression_AST = null;
6831
6832 AST tmp243_AST = null;
6833 tmp243_AST = astFactory.create(LT(1));
6834 astFactory.makeASTRoot(currentAST, tmp243_AST);
6835 match(LITERAL_new);
6836 {
6837 switch ( LA(1)) {
6838 case LT:
6839 {
6840 typeArguments();
6841 astFactory.addASTChild(currentAST, returnAST);
6842 break;
6843 }
6844 case IDENT:
6845 case LITERAL_void:
6846 case LITERAL_boolean:
6847 case LITERAL_byte:
6848 case LITERAL_char:
6849 case LITERAL_short:
6850 case LITERAL_int:
6851 case LITERAL_float:
6852 case LITERAL_long:
6853 case LITERAL_double:
6854 {
6855 break;
6856 }
6857 default:
6858 {
6859 throw new NoViableAltException(LT(1), getFilename());
6860 }
6861 }
6862 }
6863 type();
6864 astFactory.addASTChild(currentAST, returnAST);
6865 {
6866 switch ( LA(1)) {
6867 case LPAREN:
6868 {
6869 match(LPAREN);
6870 argList();
6871 astFactory.addASTChild(currentAST, returnAST);
6872 match(RPAREN);
6873 {
6874 switch ( LA(1)) {
6875 case LCURLY:
6876 {
6877 classBlock();
6878 astFactory.addASTChild(currentAST, returnAST);
6879 break;
6880 }
6881 case SEMI:
6882 case LBRACK:
6883 case RBRACK:
6884 case DOT:
6885 case QUESTION:
6886 case LT:
6887 case COMMA:
6888 case GT:
6889 case SR:
6890 case BSR:
6891 case STAR:
6892 case RPAREN:
6893 case ASSIGN:
6894 case RCURLY:
6895 case BAND:
6896 case COLON:
6897 case PLUS_ASSIGN:
6898 case MINUS_ASSIGN:
6899 case STAR_ASSIGN:
6900 case DIV_ASSIGN:
6901 case MOD_ASSIGN:
6902 case SR_ASSIGN:
6903 case BSR_ASSIGN:
6904 case SL_ASSIGN:
6905 case BAND_ASSIGN:
6906 case BXOR_ASSIGN:
6907 case BOR_ASSIGN:
6908 case LOR:
6909 case LAND:
6910 case BOR:
6911 case BXOR:
6912 case NOT_EQUAL:
6913 case EQUAL:
6914 case LE:
6915 case GE:
6916 case LITERAL_instanceof:
6917 case SL:
6918 case PLUS:
6919 case MINUS:
6920 case DIV:
6921 case MOD:
6922 case INC:
6923 case DEC:
6924 {
6925 break;
6926 }
6927 default:
6928 {
6929 throw new NoViableAltException(LT(1), getFilename());
6930 }
6931 }
6932 }
6933 break;
6934 }
6935 case LBRACK:
6936 {
6937 newArrayDeclarator();
6938 astFactory.addASTChild(currentAST, returnAST);
6939 break;
6940 }
6941 default:
6942 {
6943 throw new NoViableAltException(LT(1), getFilename());
6944 }
6945 }
6946 }
6947 newExpression_AST = (AST)currentAST.root;
6948 returnAST = newExpression_AST;
6949 }
6950
6951 /*** Match a, a.b.c refs, a.b.c(...) refs, a.b.c[], a.b.c[].class,
6952 * and a.b.c.class refs. Also this(...) and super(...). Match
6953 * this or super.
6954 */
6955 public final void identPrimary() throws RecognitionException, TokenStreamException {
6956
6957 returnAST = null;
6958 ASTPair currentAST = new ASTPair();
6959 AST identPrimary_AST = null;
6960 AST ta1_AST = null;
6961 AST ta2_AST = null;
6962 Token lp = null;
6963 AST lp_AST = null;
6964 Token lbc = null;
6965 AST lbc_AST = null;
6966
6967 {
6968 switch ( LA(1)) {
6969 case LT:
6970 {
6971 typeArguments();
6972 ta1_AST = (AST)returnAST;
6973 break;
6974 }
6975 case IDENT:
6976 {
6977 break;
6978 }
6979 default:
6980 {
6981 throw new NoViableAltException(LT(1), getFilename());
6982 }
6983 }
6984 }
6985 AST tmp246_AST = null;
6986 tmp246_AST = astFactory.create(LT(1));
6987 astFactory.addASTChild(currentAST, tmp246_AST);
6988 match(IDENT);
6989 {
6990 _loop299:
6991 do {
6992 boolean synPredMatched297 = false;
6993 if (((LA(1)==DOT) && (LA(2)==IDENT||LA(2)==LT))) {
6994 int _m297 = mark();
6995 synPredMatched297 = true;
6996 inputState.guessing++;
6997 try {
6998 {
6999 match(DOT);
7000 {
7001 switch ( LA(1)) {
7002 case LT:
7003 {
7004 typeArguments();
7005 break;
7006 }
7007 case IDENT:
7008 {
7009 break;
7010 }
7011 default:
7012 {
7013 throw new NoViableAltException(LT(1), getFilename());
7014 }
7015 }
7016 }
7017 match(IDENT);
7018 }
7019 }
7020 catch (RecognitionException pe) {
7021 synPredMatched297 = false;
7022 }
7023 rewind(_m297);
7024 inputState.guessing--;
7025 }
7026 if ( synPredMatched297 ) {
7027 AST tmp247_AST = null;
7028 tmp247_AST = astFactory.create(LT(1));
7029 astFactory.makeASTRoot(currentAST, tmp247_AST);
7030 match(DOT);
7031 {
7032 switch ( LA(1)) {
7033 case LT:
7034 {
7035 typeArguments();
7036 ta2_AST = (AST)returnAST;
7037 break;
7038 }
7039 case IDENT:
7040 {
7041 break;
7042 }
7043 default:
7044 {
7045 throw new NoViableAltException(LT(1), getFilename());
7046 }
7047 }
7048 }
7049 AST tmp248_AST = null;
7050 tmp248_AST = astFactory.create(LT(1));
7051 astFactory.addASTChild(currentAST, tmp248_AST);
7052 match(IDENT);
7053 }
7054 else if (((_tokenSet_48.member(LA(1))) && (_tokenSet_47.member(LA(2))))&&(false)) {
7055 }
7056 else {
7057 break _loop299;
7058 }
7059
7060 } while (true);
7061 }
7062 {
7063 if ((LA(1)==LPAREN)) {
7064 {
7065 lp = LT(1);
7066 lp_AST = astFactory.create(lp);
7067 astFactory.makeASTRoot(currentAST, lp_AST);
7068 match(LPAREN);
7069 if ( inputState.guessing==0 ) {
7070 lp_AST.setType(METHOD_CALL);
7071 }
7072 if ( inputState.guessing==0 ) {
7073 if (ta2_AST != null) astFactory.addASTChild(currentAST, ta2_AST);
7074 }
7075 if ( inputState.guessing==0 ) {
7076 if (ta2_AST == null) astFactory.addASTChild(currentAST, ta1_AST);
7077 }
7078 argList();
7079 astFactory.addASTChild(currentAST, returnAST);
7080 match(RPAREN);
7081 }
7082 }
7083 else if ((LA(1)==LBRACK) && (LA(2)==RBRACK)) {
7084 {
7085 int _cnt303=0;
7086 _loop303:
7087 do {
7088 if ((LA(1)==LBRACK) && (LA(2)==RBRACK)) {
7089 lbc = LT(1);
7090 lbc_AST = astFactory.create(lbc);
7091 astFactory.makeASTRoot(currentAST, lbc_AST);
7092 match(LBRACK);
7093 if ( inputState.guessing==0 ) {
7094 lbc_AST.setType(ARRAY_DECLARATOR);
7095 }
7096 match(RBRACK);
7097 }
7098 else {
7099 if ( _cnt303>=1 ) { break _loop303; } else {throw new NoViableAltException(LT(1), getFilename());}
7100 }
7101
7102 _cnt303++;
7103 } while (true);
7104 }
7105 }
7106 else if ((_tokenSet_46.member(LA(1))) && (_tokenSet_47.member(LA(2)))) {
7107 }
7108 else {
7109 throw new NoViableAltException(LT(1), getFilename());
7110 }
7111
7112 }
7113 identPrimary_AST = (AST)currentAST.root;
7114 returnAST = identPrimary_AST;
7115 }
7116
7117 public final void constant() throws RecognitionException, TokenStreamException {
7118
7119 returnAST = null;
7120 ASTPair currentAST = new ASTPair();
7121 AST constant_AST = null;
7122
7123 switch ( LA(1)) {
7124 case NUM_INT:
7125 {
7126 AST tmp251_AST = null;
7127 tmp251_AST = astFactory.create(LT(1));
7128 astFactory.addASTChild(currentAST, tmp251_AST);
7129 match(NUM_INT);
7130 constant_AST = (AST)currentAST.root;
7131 break;
7132 }
7133 case STRING_LITERAL:
7134 {
7135 AST tmp252_AST = null;
7136 tmp252_AST = astFactory.create(LT(1));
7137 astFactory.addASTChild(currentAST, tmp252_AST);
7138 match(STRING_LITERAL);
7139 constant_AST = (AST)currentAST.root;
7140 break;
7141 }
7142 case NUM_FLOAT:
7143 {
7144 AST tmp253_AST = null;
7145 tmp253_AST = astFactory.create(LT(1));
7146 astFactory.addASTChild(currentAST, tmp253_AST);
7147 match(NUM_FLOAT);
7148 constant_AST = (AST)currentAST.root;
7149 break;
7150 }
7151 case NUM_LONG:
7152 {
7153 AST tmp254_AST = null;
7154 tmp254_AST = astFactory.create(LT(1));
7155 astFactory.addASTChild(currentAST, tmp254_AST);
7156 match(NUM_LONG);
7157 constant_AST = (AST)currentAST.root;
7158 break;
7159 }
7160 case NUM_DOUBLE:
7161 {
7162 AST tmp255_AST = null;
7163 tmp255_AST = astFactory.create(LT(1));
7164 astFactory.addASTChild(currentAST, tmp255_AST);
7165 match(NUM_DOUBLE);
7166 constant_AST = (AST)currentAST.root;
7167 break;
7168 }
7169 default:
7170 {
7171 throw new NoViableAltException(LT(1), getFilename());
7172 }
7173 }
7174 returnAST = constant_AST;
7175 }
7176
7177 public final void newArrayDeclarator() throws RecognitionException, TokenStreamException {
7178
7179 returnAST = null;
7180 ASTPair currentAST = new ASTPair();
7181 AST newArrayDeclarator_AST = null;
7182 Token lb = null;
7183 AST lb_AST = null;
7184
7185 {
7186 int _cnt313=0;
7187 _loop313:
7188 do {
7189 if ((LA(1)==LBRACK) && (_tokenSet_49.member(LA(2)))) {
7190 lb = LT(1);
7191 lb_AST = astFactory.create(lb);
7192 astFactory.makeASTRoot(currentAST, lb_AST);
7193 match(LBRACK);
7194 if ( inputState.guessing==0 ) {
7195 lb_AST.setType(ARRAY_DECLARATOR);
7196 }
7197 {
7198 switch ( LA(1)) {
7199 case IDENT:
7200 case LITERAL_super:
7201 case LT:
7202 case LITERAL_void:
7203 case LITERAL_boolean:
7204 case LITERAL_byte:
7205 case LITERAL_char:
7206 case LITERAL_short:
7207 case LITERAL_int:
7208 case LITERAL_float:
7209 case LITERAL_long:
7210 case LITERAL_double:
7211 case LPAREN:
7212 case LITERAL_this:
7213 case PLUS:
7214 case MINUS:
7215 case INC:
7216 case DEC:
7217 case BNOT:
7218 case LNOT:
7219 case LITERAL_true:
7220 case LITERAL_false:
7221 case LITERAL_null:
7222 case LITERAL_new:
7223 case NUM_INT:
7224 case STRING_LITERAL:
7225 case NUM_FLOAT:
7226 case NUM_LONG:
7227 case NUM_DOUBLE:
7228 {
7229 expression();
7230 astFactory.addASTChild(currentAST, returnAST);
7231 break;
7232 }
7233 case RBRACK:
7234 {
7235 break;
7236 }
7237 default:
7238 {
7239 throw new NoViableAltException(LT(1), getFilename());
7240 }
7241 }
7242 }
7243 match(RBRACK);
7244 }
7245 else {
7246 if ( _cnt313>=1 ) { break _loop313; } else {throw new NoViableAltException(LT(1), getFilename());}
7247 }
7248
7249 _cnt313++;
7250 } while (true);
7251 }
7252 newArrayDeclarator_AST = (AST)currentAST.root;
7253 returnAST = newArrayDeclarator_AST;
7254 }
7255
7256
7257 public static final String[] _tokenNames = {
7258 "<0>",
7259 "EOF",
7260 "<2>",
7261 "NULL_TREE_LOOKAHEAD",
7262 "BLOCK",
7263 "MODIFIERS",
7264 "OBJBLOCK",
7265 "SLIST",
7266 "METHOD_DEF",
7267 "VARIABLE_DEF",
7268 "INSTANCE_INIT",
7269 "STATIC_INIT",
7270 "TYPE",
7271 "CLASS_DEF",
7272 "INTERFACE_DEF",
7273 "PACKAGE_DEF",
7274 "ARRAY_DECLARATOR",
7275 "EXTENDS_CLAUSE",
7276 "IMPLEMENTS_CLAUSE",
7277 "PARAMETERS",
7278 "PARAMETER_DEF",
7279 "LABELED_STAT",
7280 "TYPECAST",
7281 "INDEX_OP",
7282 "POST_INC",
7283 "POST_DEC",
7284 "METHOD_CALL",
7285 "EXPR",
7286 "ARRAY_INIT",
7287 "IMPORT",
7288 "UNARY_MINUS",
7289 "UNARY_PLUS",
7290 "CASE_GROUP",
7291 "ELIST",
7292 "FOR_INIT",
7293 "FOR_CONDITION",
7294 "FOR_ITERATOR",
7295 "EMPTY_STAT",
7296 "\"final\"",
7297 "\"abstract\"",
7298 "\"strictfp\"",
7299 "SUPER_CTOR_CALL",
7300 "CTOR_CALL",
7301 "VARIABLE_PARAMETER_DEF",
7302 "STATIC_IMPORT",
7303 "ENUM_DEF",
7304 "ENUM_CONSTANT_DEF",
7305 "FOR_EACH_CLAUSE",
7306 "ANNOTATION_DEF",
7307 "ANNOTATIONS",
7308 "ANNOTATION",
7309 "ANNOTATION_MEMBER_VALUE_PAIR",
7310 "ANNOTATION_FIELD_DEF",
7311 "ANNOTATION_ARRAY_INIT",
7312 "TYPE_ARGUMENTS",
7313 "TYPE_ARGUMENT",
7314 "TYPE_PARAMETERS",
7315 "TYPE_PARAMETER",
7316 "WILDCARD_TYPE",
7317 "TYPE_UPPER_BOUNDS",
7318 "TYPE_LOWER_BOUNDS",
7319 "\"package\"",
7320 "SEMI",
7321 "\"import\"",
7322 "\"static\"",
7323 "LBRACK",
7324 "RBRACK",
7325 "IDENT",
7326 "DOT",
7327 "QUESTION",
7328 "\"extends\"",
7329 "\"super\"",
7330 "LT",
7331 "COMMA",
7332 "GT",
7333 "SR",
7334 "BSR",
7335 "\"void\"",
7336 "\"boolean\"",
7337 "\"byte\"",
7338 "\"char\"",
7339 "\"short\"",
7340 "\"int\"",
7341 "\"float\"",
7342 "\"long\"",
7343 "\"double\"",
7344 "STAR",
7345 "\"private\"",
7346 "\"public\"",
7347 "\"protected\"",
7348 "\"transient\"",
7349 "\"native\"",
7350 "\"threadsafe\"",
7351 "\"synchronized\"",
7352 "\"volatile\"",
7353 "AT",
7354 "LPAREN",
7355 "RPAREN",
7356 "ASSIGN",
7357 "LCURLY",
7358 "RCURLY",
7359 "\"class\"",
7360 "\"interface\"",
7361 "\"enum\"",
7362 "BAND",
7363 "\"default\"",
7364 "\"implements\"",
7365 "\"this\"",
7366 "\"throws\"",
7367 "TRIPLE_DOT",
7368 "COLON",
7369 "\"if\"",
7370 "\"else\"",
7371 "\"while\"",
7372 "\"break\"",
7373 "\"continue\"",
7374 "\"return\"",
7375 "\"switch\"",
7376 "\"throw\"",
7377 "\"assert\"",
7378 "\"for\"",
7379 "\"case\"",
7380 "\"try\"",
7381 "\"finally\"",
7382 "\"catch\"",
7383 "PLUS_ASSIGN",
7384 "MINUS_ASSIGN",
7385 "STAR_ASSIGN",
7386 "DIV_ASSIGN",
7387 "MOD_ASSIGN",
7388 "SR_ASSIGN",
7389 "BSR_ASSIGN",
7390 "SL_ASSIGN",
7391 "BAND_ASSIGN",
7392 "BXOR_ASSIGN",
7393 "BOR_ASSIGN",
7394 "LOR",
7395 "LAND",
7396 "BOR",
7397 "BXOR",
7398 "NOT_EQUAL",
7399 "EQUAL",
7400 "LE",
7401 "GE",
7402 "\"instanceof\"",
7403 "SL",
7404 "PLUS",
7405 "MINUS",
7406 "DIV",
7407 "MOD",
7408 "INC",
7409 "DEC",
7410 "BNOT",
7411 "LNOT",
7412 "\"true\"",
7413 "\"false\"",
7414 "\"null\"",
7415 "\"new\"",
7416 "NUM_INT",
7417 "STRING_LITERAL",
7418 "NUM_FLOAT",
7419 "NUM_LONG",
7420 "NUM_DOUBLE",
7421 "WS",
7422 "SL_COMMENT",
7423 "ML_COMMENT",
7424 "ESC",
7425 "HEX_DIGIT",
7426 "VOCAB",
7427 "EXPONENT",
7428 "FLOAT_SUFFIX"
7429 };
7430
7431 protected void buildTokenTypeASTClassMap() {
7432 tokenTypeToASTClassMap=null;
7433 };
7434
7435 private static final long[] mk_tokenSet_0() {
7436 long[] data = { -4611684094282039294L, 966359252993L, 0L, 0L};
7437 return data;
7438 }
7439 public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
7440 private static final long[] mk_tokenSet_1() {
7441 long[] data = { 4611687942572736514L, 966359253001L, 0L, 0L};
7442 return data;
7443 }
7444 public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
7445 private static final long[] mk_tokenSet_2() {
7446 long[] data = { 4611687942572736512L, 966359252993L, 0L, 0L};
7447 return data;
7448 }
7449 public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
7450 private static final long[] mk_tokenSet_3() {
7451 long[] data = { 4611687942572736514L, 966359252993L, 0L, 0L};
7452 return data;
7453 }
7454 public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
7455 private static final long[] mk_tokenSet_4() {
7456 long[] data = { 1924145348608L, 2139095041L, 0L, 0L};
7457 return data;
7458 }
7459 public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
7460 private static final long[] mk_tokenSet_5() {
7461 long[] data = { 0L, 4186152L, 0L, 0L};
7462 return data;
7463 }
7464 public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
7465 private static final long[] mk_tokenSet_6() {
7466 long[] data = { 4611686018427387904L, -2305723029298086146L, 16383L, 0L, 0L, 0L};
7467 return data;
7468 }
7469 public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
7470 private static final long[] mk_tokenSet_7() {
7471 long[] data = { 6917530951786430464L, -1729399849096314881L, 34359738367L, 0L, 0L, 0L};
7472 return data;
7473 }
7474 public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
7475 private static final long[] mk_tokenSet_8() {
7476 long[] data = { 0L, 14332310060762L, 0L, 0L};
7477 return data;
7478 }
7479 public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
7480 private static final long[] mk_tokenSet_9() {
7481 long[] data = { 4611687942572736512L, -2305722062934638593L, 34359738367L, 0L, 0L, 0L};
7482 return data;
7483 }
7484 public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
7485 private static final long[] mk_tokenSet_10() {
7486 long[] data = { 0L, 8836899398024L, 34356330496L, 0L, 0L, 0L};
7487 return data;
7488 }
7489 public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());
7490 private static final long[] mk_tokenSet_11() {
7491 long[] data = { 0L, 9979364900282L, 34359738112L, 0L, 0L, 0L};
7492 return data;
7493 }
7494 public static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11());
7495 private static final long[] mk_tokenSet_12() {
7496 long[] data = { 0L, 8802539659656L, 34356330496L, 0L, 0L, 0L};
7497 return data;
7498 }
7499 public static final BitSet _tokenSet_12 = new BitSet(mk_tokenSet_12());
7500 private static final long[] mk_tokenSet_13() {
7501 long[] data = { 0L, 4432410443336L, 0L, 0L};
7502 return data;
7503 }
7504 public static final BitSet _tokenSet_13 = new BitSet(mk_tokenSet_13());
7505 private static final long[] mk_tokenSet_14() {
7506 long[] data = { 4611687942572736512L, 5471784132955L, 0L, 0L};
7507 return data;
7508 }
7509 public static final BitSet _tokenSet_14 = new BitSet(mk_tokenSet_14());
7510 private static final long[] mk_tokenSet_15() {
7511 long[] data = { 1924145348608L, 966363439369L, 0L, 0L};
7512 return data;
7513 }
7514 public static final BitSet _tokenSet_15 = new BitSet(mk_tokenSet_15());
7515 private static final long[] mk_tokenSet_16() {
7516 long[] data = { 1924145348608L, 970658406683L, 0L, 0L};
7517 return data;
7518 }
7519 public static final BitSet _tokenSet_16 = new BitSet(mk_tokenSet_16());
7520 private static final long[] mk_tokenSet_17() {
7521 long[] data = { 0L, 4186120L, 0L, 0L};
7522 return data;
7523 }
7524 public static final BitSet _tokenSet_17 = new BitSet(mk_tokenSet_17());
7525 private static final long[] mk_tokenSet_18() {
7526 long[] data = { 0L, 282L, 0L, 0L};
7527 return data;
7528 }
7529 public static final BitSet _tokenSet_18 = new BitSet(mk_tokenSet_18());
7530 private static final long[] mk_tokenSet_19() {
7531 long[] data = { 4611686018427387904L, 17179869698L, 0L, 0L};
7532 return data;
7533 }
7534 public static final BitSet _tokenSet_19 = new BitSet(mk_tokenSet_19());
7535 private static final long[] mk_tokenSet_20() {
7536 long[] data = { 274877906944L, 2151669768L, 0L, 0L};
7537 return data;
7538 }
7539 public static final BitSet _tokenSet_20 = new BitSet(mk_tokenSet_20());
7540 private static final long[] mk_tokenSet_21() {
7541 long[] data = { 0L, 2151670042L, 0L, 0L};
7542 return data;
7543 }
7544 public static final BitSet _tokenSet_21 = new BitSet(mk_tokenSet_21());
7545 private static final long[] mk_tokenSet_22() {
7546 long[] data = { 0L, 35186523758874L, 0L, 0L};
7547 return data;
7548 }
7549 public static final BitSet _tokenSet_22 = new BitSet(mk_tokenSet_22());
7550 private static final long[] mk_tokenSet_23() {
7551 long[] data = { 4611687942572736512L, 431932328239948169L, 34356330496L, 0L, 0L, 0L};
7552 return data;
7553 }
7554 public static final BitSet _tokenSet_23 = new BitSet(mk_tokenSet_23());
7555 private static final long[] mk_tokenSet_24() {
7556 long[] data = { 0L, 8796093022592L, 0L, 0L};
7557 return data;
7558 }
7559 public static final BitSet _tokenSet_24 = new BitSet(mk_tokenSet_24());
7560 private static final long[] mk_tokenSet_25() {
7561 long[] data = { 0L, 4299153448L, 0L, 0L};
7562 return data;
7563 }
7564 public static final BitSet _tokenSet_25 = new BitSet(mk_tokenSet_25());
7565 private static final long[] mk_tokenSet_26() {
7566 long[] data = { 4611687942572736512L, 431932396959424905L, 34356330496L, 0L, 0L, 0L};
7567 return data;
7568 }
7569 public static final BitSet _tokenSet_26 = new BitSet(mk_tokenSet_26());
7570 private static final long[] mk_tokenSet_27() {
7571 long[] data = { 4611687942572736512L, -1873838302180672069L, 34359738367L, 0L, 0L, 0L};
7572 return data;
7573 }
7574 public static final BitSet _tokenSet_27 = new BitSet(mk_tokenSet_27());
7575 private static final long[] mk_tokenSet_28() {
7576 long[] data = { 4611687942572736512L, 576331259035246985L, 34356330496L, 0L, 0L, 0L};
7577 return data;
7578 }
7579 public static final BitSet _tokenSet_28 = new BitSet(mk_tokenSet_28());
7580 private static final long[] mk_tokenSet_29() {
7581 long[] data = { 4611687942572736512L, -57183194579525L, 34359738367L, 0L, 0L, 0L};
7582 return data;
7583 }
7584 public static final BitSet _tokenSet_29 = new BitSet(mk_tokenSet_29());
7585 private static final long[] mk_tokenSet_30() {
7586 long[] data = { 1924145348608L, 4290764809L, 0L, 0L};
7587 return data;
7588 }
7589 public static final BitSet _tokenSet_30 = new BitSet(mk_tokenSet_30());
7590 private static final long[] mk_tokenSet_31() {
7591 long[] data = { 1924145348608L, 4290765083L, 0L, 0L};
7592 return data;
7593 }
7594 public static final BitSet _tokenSet_31 = new BitSet(mk_tokenSet_31());
7595 private static final long[] mk_tokenSet_32() {
7596 long[] data = { 0L, 8800392176008L, 34356330496L, 0L, 0L, 0L};
7597 return data;
7598 }
7599 public static final BitSet _tokenSet_32 = new BitSet(mk_tokenSet_32());
7600 private static final long[] mk_tokenSet_33() {
7601 long[] data = { 4611686018427387904L, -2305833092125819462L, 34359738367L, 0L, 0L, 0L};
7602 return data;
7603 }
7604 public static final BitSet _tokenSet_33 = new BitSet(mk_tokenSet_33());
7605 private static final long[] mk_tokenSet_34() {
7606 long[] data = { 1924145348608L, 141725532161L, 0L, 0L};
7607 return data;
7608 }
7609 public static final BitSet _tokenSet_34 = new BitSet(mk_tokenSet_34());
7610 private static final long[] mk_tokenSet_35() {
7611 long[] data = { 1924145348608L, 141725532169L, 0L, 0L};
7612 return data;
7613 }
7614 public static final BitSet _tokenSet_35 = new BitSet(mk_tokenSet_35());
7615 private static final long[] mk_tokenSet_36() {
7616 long[] data = { 4611687942572736512L, 8804678754697L, 34356330496L, 0L, 0L, 0L};
7617 return data;
7618 }
7619 public static final BitSet _tokenSet_36 = new BitSet(mk_tokenSet_36());
7620 private static final long[] mk_tokenSet_37() {
7621 long[] data = { 4611687942572736512L, -2305833087839240261L, 34359738367L, 0L, 0L, 0L};
7622 return data;
7623 }
7624 public static final BitSet _tokenSet_37 = new BitSet(mk_tokenSet_37());
7625 private static final long[] mk_tokenSet_38() {
7626 long[] data = { 0L, 79169136353672L, 34356330496L, 0L, 0L, 0L};
7627 return data;
7628 }
7629 public static final BitSet _tokenSet_38 = new BitSet(mk_tokenSet_38());
7630 private static final long[] mk_tokenSet_39() {
7631 long[] data = { 4611686018427387904L, -2305833092125818950L, 34359738367L, 0L, 0L, 0L};
7632 return data;
7633 }
7634 public static final BitSet _tokenSet_39 = new BitSet(mk_tokenSet_39());
7635 private static final long[] mk_tokenSet_40() {
7636 long[] data = { 0L, 1280L, 49152L, 0L, 0L, 0L};
7637 return data;
7638 }
7639 public static final BitSet _tokenSet_40 = new BitSet(mk_tokenSet_40());
7640 private static final long[] mk_tokenSet_41() {
7641 long[] data = { 0L, 6144L, 131072L, 0L, 0L, 0L};
7642 return data;
7643 }
7644 public static final BitSet _tokenSet_41 = new BitSet(mk_tokenSet_41());
7645 private static final long[] mk_tokenSet_42() {
7646 long[] data = { 0L, 4194304L, 3145728L, 0L, 0L, 0L};
7647 return data;
7648 }
7649 public static final BitSet _tokenSet_42 = new BitSet(mk_tokenSet_42());
7650 private static final long[] mk_tokenSet_43() {
7651 long[] data = { 0L, 8800392176008L, 34292629504L, 0L, 0L, 0L};
7652 return data;
7653 }
7654 public static final BitSet _tokenSet_43 = new BitSet(mk_tokenSet_43());
7655 private static final long[] mk_tokenSet_44() {
7656 long[] data = { 4611686018427387904L, -2305762646072229954L, 34359738367L, 0L, 0L, 0L};
7657 return data;
7658 }
7659 public static final BitSet _tokenSet_44 = new BitSet(mk_tokenSet_44());
7660 private static final long[] mk_tokenSet_45() {
7661 long[] data = { 0L, 392L, 0L, 0L};
7662 return data;
7663 }
7664 public static final BitSet _tokenSet_45 = new BitSet(mk_tokenSet_45());
7665 private static final long[] mk_tokenSet_46() {
7666 long[] data = { 4611686018427387904L, -2305771446464405706L, 16777215L, 0L, 0L, 0L};
7667 return data;
7668 }
7669 public static final BitSet _tokenSet_46 = new BitSet(mk_tokenSet_46());
7670 private static final long[] mk_tokenSet_47() {
7671 long[] data = { 6917530951786430464L, -1729439431514914881L, 34359738367L, 0L, 0L, 0L};
7672 return data;
7673 }
7674 public static final BitSet _tokenSet_47 = new BitSet(mk_tokenSet_47());
7675 private static final long[] mk_tokenSet_48() {
7676 long[] data = { 4611686018427387904L, -2305771442169438410L, 16777215L, 0L, 0L, 0L};
7677 return data;
7678 }
7679 public static final BitSet _tokenSet_48 = new BitSet(mk_tokenSet_48());
7680 private static final long[] mk_tokenSet_49() {
7681 long[] data = { 0L, 8800392176012L, 34356330496L, 0L, 0L, 0L};
7682 return data;
7683 }
7684 public static final BitSet _tokenSet_49 = new BitSet(mk_tokenSet_49());
7685
7686 }