GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java™ (public API).
JavaParser.java
Go to the documentation of this file.
1// $ANTLR 2.7.7 (2006-11-01): "JavaParser.g" -> "JavaParser.java"$
2
3 package com.jogamp.gluegen.jgram;
4
5 import java.util.*;
6
7 import antlr.CommonAST;
8
9import antlr.TokenBuffer;
10import antlr.TokenStreamException;
11import antlr.TokenStreamIOException;
12import antlr.ANTLRException;
13import antlr.LLkParser;
14import antlr.Token;
15import antlr.TokenStream;
16import antlr.RecognitionException;
17import antlr.NoViableAltException;
18import antlr.MismatchedTokenException;
19import antlr.SemanticException;
20import antlr.ParserSharedInputState;
21import antlr.collections.impl.BitSet;
22import antlr.collections.AST;
23import java.util.Hashtable;
24import antlr.ASTFactory;
25import antlr.ASTPair;
26import antlr.collections.impl.ASTArray;
27
28public class JavaParser extends antlr.LLkParser implements JavaTokenTypes
29 {
30
31 public void clearParsedEnumNames() {
32 enumNames.clear();
33 }
34
35 /** Returns the EnumTypes this HeaderParser processed. */
36 public Set<String> getParsedEnumNames() {
37 return enumNames;
38 }
39
40 /** Clears the list of functions this HeaderParser has parsed.
41 Useful when reusing the same HeaderParser for more than one
42 header file. */
44 functionNames.clear();
45 }
46
47 /** Returns the list of FunctionSymbols this HeaderParser has parsed. */
48 public Set<String> getParsedFunctionNames() {
49 return functionNames;
50 }
51
52 /** Clears the list of inner interfaces this HeaderParser has parsed.
53 Useful when reusing the same HeaderParser for more than one
54 header file. */
56 innerInterfacesNames.clear();
57 }
58
59 /** Returns the list of inner interfaces this HeaderParser has parsed. */
60 public Set<String> getParsedInnerInterfacesNames() {
61 return innerInterfacesNames;
62 }
63
64 /** Clears the list of inner classes this HeaderParser has parsed.
65 Useful when reusing the same HeaderParser for more than one
66 header file. */
68 innerClassesNames.clear();
69 }
70
71 /** Returns the list of inner classes this HeaderParser has parsed. */
72 public Set<String> getParsedInnerClassesNames() {
73 return innerClassesNames;
74 }
75
76 private Set<String> functionNames = new HashSet<String>();
77 // hash from name of an enumerated value to the EnumType to which it belongs
78 private Set<String> enumNames = new HashSet<String>();
79 private Set<String> innerInterfacesNames = new HashSet<String>();
80 private Set<String> innerClassesNames = new HashSet<String>();
81
82 private int blockDepth = 0;
83
84protected JavaParser(TokenBuffer tokenBuf, int k) {
85 super(tokenBuf,k);
86 tokenNames = _tokenNames;
88 astFactory = new ASTFactory(getTokenTypeToASTClassMap());
89}
90
91public JavaParser(TokenBuffer tokenBuf) {
92 this(tokenBuf,2);
93}
94
95protected JavaParser(TokenStream lexer, int k) {
96 super(lexer,k);
97 tokenNames = _tokenNames;
99 astFactory = new ASTFactory(getTokenTypeToASTClassMap());
100}
101
102public JavaParser(TokenStream lexer) {
103 this(lexer,2);
104}
105
106public JavaParser(ParserSharedInputState state) {
107 super(state,2);
108 tokenNames = _tokenNames;
110 astFactory = new ASTFactory(getTokenTypeToASTClassMap());
111}
112
113 public final void compilationUnit() throws RecognitionException, TokenStreamException {
114
115 returnAST = null;
116 ASTPair currentAST = new ASTPair();
117 AST compilationUnit_AST = null;
118
119 {
120 switch ( LA(1)) {
121 case LITERAL_package:
122 {
124 astFactory.addASTChild(currentAST, returnAST);
125 break;
126 }
127 case EOF:
128 case FINAL:
129 case ABSTRACT:
130 case STRICTFP:
131 case SEMI:
132 case LITERAL_import:
133 case LITERAL_private:
134 case LITERAL_public:
136 case LITERAL_static:
138 case LITERAL_native:
141 case LITERAL_volatile:
142 case LITERAL_class:
144 case AT:
145 {
146 break;
147 }
148 default:
149 {
150 throw new NoViableAltException(LT(1), getFilename());
151 }
152 }
153 }
154 {
155 _loop4:
156 do {
157 if ((LA(1)==LITERAL_import)) {
159 astFactory.addASTChild(currentAST, returnAST);
160 }
161 else {
162 break _loop4;
163 }
164
165 } while (true);
166 }
167 {
168 _loop6:
169 do {
170 if ((_tokenSet_0.member(LA(1)))) {
172 astFactory.addASTChild(currentAST, returnAST);
173 }
174 else {
175 break _loop6;
176 }
177
178 } while (true);
179 }
180 match(Token.EOF_TYPE);
181 compilationUnit_AST = (AST)currentAST.root;
182 returnAST = compilationUnit_AST;
183 }
184
185 public final void packageDefinition() throws RecognitionException, TokenStreamException {
186
187 returnAST = null;
188 ASTPair currentAST = new ASTPair();
189 AST packageDefinition_AST = null;
190 Token p = null;
191 AST p_AST = null;
192
193 try { // for error handling
194 p = LT(1);
195 p_AST = astFactory.create(p);
196 astFactory.makeASTRoot(currentAST, p_AST);
197 match(LITERAL_package);
198 if ( inputState.guessing==0 ) {
199 p_AST.setType(PACKAGE_DEF);
200 }
201 identifier();
202 astFactory.addASTChild(currentAST, returnAST);
203 match(SEMI);
204 packageDefinition_AST = (AST)currentAST.root;
205 }
206 catch (RecognitionException ex) {
207 if (inputState.guessing==0) {
208 reportError(ex);
209 recover(ex,_tokenSet_1);
210 } else {
211 throw ex;
212 }
213 }
214 returnAST = packageDefinition_AST;
215 }
216
217 public final void importDefinition() throws RecognitionException, TokenStreamException {
218
219 returnAST = null;
220 ASTPair currentAST = new ASTPair();
221 AST importDefinition_AST = null;
222 Token i = null;
223 AST i_AST = null;
224
225 try { // for error handling
226 i = LT(1);
227 i_AST = astFactory.create(i);
228 astFactory.makeASTRoot(currentAST, i_AST);
229 match(LITERAL_import);
230 if ( inputState.guessing==0 ) {
231 i_AST.setType(IMPORT);
232 }
234 astFactory.addASTChild(currentAST, returnAST);
235 match(SEMI);
236 importDefinition_AST = (AST)currentAST.root;
237 }
238 catch (RecognitionException ex) {
239 if (inputState.guessing==0) {
240 reportError(ex);
241 recover(ex,_tokenSet_1);
242 } else {
243 throw ex;
244 }
245 }
246 returnAST = importDefinition_AST;
247 }
248
249 public final void typeDefinition() throws RecognitionException, TokenStreamException {
250
251 returnAST = null;
252 ASTPair currentAST = new ASTPair();
253 AST typeDefinition_AST = null;
254 AST antsBefore_AST = null;
255 AST m_AST = null;
256 AST antsAfter_AST = null;
257
258 try { // for error handling
259 switch ( LA(1)) {
260 case FINAL:
261 case ABSTRACT:
262 case STRICTFP:
263 case LITERAL_private:
264 case LITERAL_public:
266 case LITERAL_static:
268 case LITERAL_native:
271 case LITERAL_volatile:
272 case LITERAL_class:
274 case AT:
275 {
276 annotations();
277 antsBefore_AST = (AST)returnAST;
278 astFactory.addASTChild(currentAST, returnAST);
279 modifiers();
280 m_AST = (AST)returnAST;
281 annotations();
282 antsAfter_AST = (AST)returnAST;
283 astFactory.addASTChild(currentAST, returnAST);
284 {
285 switch ( LA(1)) {
286 case LITERAL_class:
287 {
288 classDefinition(antsBefore_AST,m_AST,antsAfter_AST);
289 astFactory.addASTChild(currentAST, returnAST);
290 break;
291 }
293 {
294 interfaceDefinition(antsBefore_AST,m_AST,antsAfter_AST);
295 astFactory.addASTChild(currentAST, returnAST);
296 break;
297 }
298 default:
299 {
300 throw new NoViableAltException(LT(1), getFilename());
301 }
302 }
303 }
304 typeDefinition_AST = (AST)currentAST.root;
305 break;
306 }
307 case SEMI:
308 {
309 match(SEMI);
310 typeDefinition_AST = (AST)currentAST.root;
311 break;
312 }
313 default:
314 {
315 throw new NoViableAltException(LT(1), getFilename());
316 }
317 }
318 }
319 catch (RecognitionException ex) {
320 if (inputState.guessing==0) {
321 reportError(ex);
322 recover(ex,_tokenSet_2);
323 } else {
324 throw ex;
325 }
326 }
327 returnAST = typeDefinition_AST;
328 }
329
330 public final void identifier() throws RecognitionException, TokenStreamException {
331
332 returnAST = null;
333 ASTPair currentAST = new ASTPair();
334 AST identifier_AST = null;
335
336 AST tmp5_AST = null;
337 tmp5_AST = astFactory.create(LT(1));
338 astFactory.addASTChild(currentAST, tmp5_AST);
339 match(IDENT);
340 {
341 _loop28:
342 do {
343 if ((LA(1)==DOT)) {
344 AST tmp6_AST = null;
345 tmp6_AST = astFactory.create(LT(1));
346 astFactory.makeASTRoot(currentAST, tmp6_AST);
347 match(DOT);
348 AST tmp7_AST = null;
349 tmp7_AST = astFactory.create(LT(1));
350 astFactory.addASTChild(currentAST, tmp7_AST);
351 match(IDENT);
352 }
353 else {
354 break _loop28;
355 }
356
357 } while (true);
358 }
359 identifier_AST = (AST)currentAST.root;
360 returnAST = identifier_AST;
361 }
362
363 public final void identifierStar() throws RecognitionException, TokenStreamException {
364
365 returnAST = null;
366 ASTPair currentAST = new ASTPair();
367 AST identifierStar_AST = null;
368
369 AST tmp8_AST = null;
370 tmp8_AST = astFactory.create(LT(1));
371 astFactory.addASTChild(currentAST, tmp8_AST);
372 match(IDENT);
373 {
374 _loop31:
375 do {
376 if ((LA(1)==DOT) && (LA(2)==IDENT)) {
377 AST tmp9_AST = null;
378 tmp9_AST = astFactory.create(LT(1));
379 astFactory.makeASTRoot(currentAST, tmp9_AST);
380 match(DOT);
381 AST tmp10_AST = null;
382 tmp10_AST = astFactory.create(LT(1));
383 astFactory.addASTChild(currentAST, tmp10_AST);
384 match(IDENT);
385 }
386 else {
387 break _loop31;
388 }
389
390 } while (true);
391 }
392 {
393 switch ( LA(1)) {
394 case DOT:
395 {
396 AST tmp11_AST = null;
397 tmp11_AST = astFactory.create(LT(1));
398 astFactory.makeASTRoot(currentAST, tmp11_AST);
399 match(DOT);
400 AST tmp12_AST = null;
401 tmp12_AST = astFactory.create(LT(1));
402 astFactory.addASTChild(currentAST, tmp12_AST);
403 match(STAR);
404 break;
405 }
406 case SEMI:
407 {
408 break;
409 }
410 default:
411 {
412 throw new NoViableAltException(LT(1), getFilename());
413 }
414 }
415 }
416 identifierStar_AST = (AST)currentAST.root;
417 returnAST = identifierStar_AST;
418 }
419
420 public final void annotations() throws RecognitionException, TokenStreamException {
421
422 returnAST = null;
423 ASTPair currentAST = new ASTPair();
424 AST annotations_AST = null;
425
426 {
427 _loop125:
428 do {
429 if ((LA(1)==AT) && ((LA(2) >= LITERAL_void && LA(2) <= IDENT))) {
430 annotation();
431 astFactory.addASTChild(currentAST, returnAST);
432 }
433 else {
434 break _loop125;
435 }
436
437 } while (true);
438 }
439 annotations_AST = (AST)currentAST.root;
440 returnAST = annotations_AST;
441 }
442
443 public final void modifiers() throws RecognitionException, TokenStreamException {
444
445 returnAST = null;
446 ASTPair currentAST = new ASTPair();
447 AST modifiers_AST = null;
448
449 {
450 _loop35:
451 do {
452 if ((_tokenSet_3.member(LA(1)))) {
453 modifier();
454 astFactory.addASTChild(currentAST, returnAST);
455 }
456 else {
457 break _loop35;
458 }
459
460 } while (true);
461 }
462 if ( inputState.guessing==0 ) {
463 modifiers_AST = (AST)currentAST.root;
464 modifiers_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(MODIFIERS,"MODIFIERS")).add(modifiers_AST));
465 currentAST.root = modifiers_AST;
466 currentAST.child = modifiers_AST!=null &&modifiers_AST.getFirstChild()!=null ?
467 modifiers_AST.getFirstChild() : modifiers_AST;
468 currentAST.advanceChildToEnd();
469 }
470 modifiers_AST = (AST)currentAST.root;
471 returnAST = modifiers_AST;
472 }
473
474 public final void classDefinition(
475 AST antsBefore, AST modifiers, AST antsAfter
476 ) throws RecognitionException, TokenStreamException {
477
478 returnAST = null;
479 ASTPair currentAST = new ASTPair();
480 AST classDefinition_AST = null;
481 Token cn = null;
482 AST cn_AST = null;
483 AST sc_AST = null;
484 AST ic_AST = null;
485 AST cb_AST = null;
486
487 match(LITERAL_class);
488 cn = LT(1);
489 cn_AST = astFactory.create(cn);
490 match(IDENT);
492 sc_AST = (AST)returnAST;
494 ic_AST = (AST)returnAST;
495 classBlock();
496 cb_AST = (AST)returnAST;
497 if ( inputState.guessing==0 ) {
498 classDefinition_AST = (AST)currentAST.root;
499 classDefinition_AST = (AST)astFactory.make( (new ASTArray(8)).add(astFactory.create(CLASS_DEF,"CLASS_DEF")).add(antsBefore).add(modifiers).add(antsAfter).add(cn_AST).add(sc_AST).add(ic_AST).add(cb_AST));
500 if(blockDepth==1) {
501 innerClassesNames.add(cn.getText()); }
502 currentAST.root = classDefinition_AST;
503 currentAST.child = classDefinition_AST!=null &&classDefinition_AST.getFirstChild()!=null ?
504 classDefinition_AST.getFirstChild() : classDefinition_AST;
505 currentAST.advanceChildToEnd();
506 }
507 returnAST = classDefinition_AST;
508 }
509
510 public final void interfaceDefinition(
511 AST antsBefore, AST modifiers, AST antsAfter
512 ) throws RecognitionException, TokenStreamException {
513
514 returnAST = null;
515 ASTPair currentAST = new ASTPair();
516 AST interfaceDefinition_AST = null;
517 Token in = null;
518 AST in_AST = null;
519 AST ie_AST = null;
520 AST cb_AST = null;
521
522 match(LITERAL_interface);
523 in = LT(1);
524 in_AST = astFactory.create(in);
525 match(IDENT);
527 ie_AST = (AST)returnAST;
528 classBlock();
529 cb_AST = (AST)returnAST;
530 if ( inputState.guessing==0 ) {
531 interfaceDefinition_AST = (AST)currentAST.root;
532 interfaceDefinition_AST = (AST)astFactory.make( (new ASTArray(7)).add(astFactory.create(INTERFACE_DEF,"INTERFACE_DEF")).add(antsBefore).add(modifiers).add(antsAfter).add(in_AST).add(ie_AST).add(cb_AST));
533 if(blockDepth==1) {
534 innerInterfacesNames.add(in.getText()); }
535 currentAST.root = interfaceDefinition_AST;
536 currentAST.child = interfaceDefinition_AST!=null &&interfaceDefinition_AST.getFirstChild()!=null ?
537 interfaceDefinition_AST.getFirstChild() : interfaceDefinition_AST;
538 currentAST.advanceChildToEnd();
539 }
540 returnAST = interfaceDefinition_AST;
541 }
542
543/** A declaration is the creation of a reference or primitive-type variable
544 * Create a separate Type/Var tree for each var in the var list.
545 */
546 public final void declaration() throws RecognitionException, TokenStreamException {
547
548 returnAST = null;
549 ASTPair currentAST = new ASTPair();
550 AST declaration_AST = null;
551 AST antsBefore_AST = null;
552 AST m_AST = null;
553 AST antsAfter_AST = null;
554 AST t_AST = null;
555 AST v_AST = null;
556
557 annotations();
558 antsBefore_AST = (AST)returnAST;
559 modifiers();
560 m_AST = (AST)returnAST;
561 annotations();
562 antsAfter_AST = (AST)returnAST;
563 typeSpec(false);
564 t_AST = (AST)returnAST;
565 variableDefinitions(antsBefore_AST,m_AST,antsAfter_AST,t_AST);
566 v_AST = (AST)returnAST;
567 if ( inputState.guessing==0 ) {
568 declaration_AST = (AST)currentAST.root;
569 declaration_AST = v_AST;
570 currentAST.root = declaration_AST;
571 currentAST.child = declaration_AST!=null &&declaration_AST.getFirstChild()!=null ?
572 declaration_AST.getFirstChild() : declaration_AST;
573 currentAST.advanceChildToEnd();
574 }
575 returnAST = declaration_AST;
576 }
577
578 public final void typeSpec(
579 boolean addImagNode
580 ) throws RecognitionException, TokenStreamException {
581
582 returnAST = null;
583 ASTPair currentAST = new ASTPair();
584 AST typeSpec_AST = null;
585
586 switch ( LA(1)) {
587 case IDENT:
588 {
589 classTypeSpec(addImagNode);
590 astFactory.addASTChild(currentAST, returnAST);
591 typeSpec_AST = (AST)currentAST.root;
592 break;
593 }
594 case LITERAL_void:
595 case LITERAL_boolean:
596 case LITERAL_byte:
597 case LITERAL_char:
598 case LITERAL_short:
599 case LITERAL_int:
600 case LITERAL_float:
601 case LITERAL_long:
602 case LITERAL_double:
603 {
604 builtInTypeSpec(addImagNode);
605 astFactory.addASTChild(currentAST, returnAST);
606 typeSpec_AST = (AST)currentAST.root;
607 break;
608 }
609 default:
610 {
611 throw new NoViableAltException(LT(1), getFilename());
612 }
613 }
614 returnAST = typeSpec_AST;
615 }
616
617 public final void variableDefinitions(
618 AST antsBefore, AST mods, AST antsAfter, AST t
619 ) throws RecognitionException, TokenStreamException {
620
621 returnAST = null;
622 ASTPair currentAST = new ASTPair();
623 AST variableDefinitions_AST = null;
624
625 variableDeclarator(getASTFactory().dupTree(antsBefore),
626 getASTFactory().dupTree(mods),
627 getASTFactory().dupTree(antsAfter),
628 getASTFactory().dupTree(t));
629 astFactory.addASTChild(currentAST, returnAST);
630 {
631 _loop64:
632 do {
633 if ((LA(1)==COMMA)) {
634 match(COMMA);
635 variableDeclarator(getASTFactory().dupTree(antsBefore),
636 getASTFactory().dupTree(mods),
637 getASTFactory().dupTree(antsAfter),
638 getASTFactory().dupTree(t));
639 astFactory.addASTChild(currentAST, returnAST);
640 }
641 else {
642 break _loop64;
643 }
644
645 } while (true);
646 }
647 variableDefinitions_AST = (AST)currentAST.root;
648 returnAST = variableDefinitions_AST;
649 }
650
651 public final void classTypeSpec(
652 boolean addImagNode
653 ) throws RecognitionException, TokenStreamException {
654
655 returnAST = null;
656 ASTPair currentAST = new ASTPair();
657 AST classTypeSpec_AST = null;
658 Token lb = null;
659 AST lb_AST = null;
660
661 identifier();
662 astFactory.addASTChild(currentAST, returnAST);
663 {
664 switch ( LA(1)) {
665 case LT:
666 {
667 AST tmp16_AST = null;
668 tmp16_AST = astFactory.create(LT(1));
669 astFactory.addASTChild(currentAST, tmp16_AST);
670 match(LT);
671 {
672 switch ( LA(1)) {
673 case IDENT:
674 {
675 classTypeSpec(false);
676 astFactory.addASTChild(currentAST, returnAST);
677 break;
678 }
679 case QUESTION:
680 {
681 AST tmp17_AST = null;
682 tmp17_AST = astFactory.create(LT(1));
683 astFactory.addASTChild(currentAST, tmp17_AST);
684 match(QUESTION);
685 {
686 switch ( LA(1)) {
687 case LITERAL_extends:
688 {
689 AST tmp18_AST = null;
690 tmp18_AST = astFactory.create(LT(1));
691 astFactory.addASTChild(currentAST, tmp18_AST);
692 match(LITERAL_extends);
693 classTypeSpec(false);
694 astFactory.addASTChild(currentAST, returnAST);
695 {
696 _loop18:
697 do {
698 if ((LA(1)==BAND)) {
699 AST tmp19_AST = null;
700 tmp19_AST = astFactory.create(LT(1));
701 astFactory.addASTChild(currentAST, tmp19_AST);
702 match(BAND);
703 classTypeSpec(false);
704 astFactory.addASTChild(currentAST, returnAST);
705 }
706 else {
707 break _loop18;
708 }
709
710 } while (true);
711 }
712 break;
713 }
714 case GT:
715 {
716 break;
717 }
718 default:
719 {
720 throw new NoViableAltException(LT(1), getFilename());
721 }
722 }
723 }
724 break;
725 }
726 default:
727 {
728 throw new NoViableAltException(LT(1), getFilename());
729 }
730 }
731 }
732 AST tmp20_AST = null;
733 tmp20_AST = astFactory.create(LT(1));
734 astFactory.addASTChild(currentAST, tmp20_AST);
735 match(GT);
736 break;
737 }
738 case FINAL:
739 case ABSTRACT:
740 case STRICTFP:
741 case SEMI:
742 case QUESTION:
743 case BAND:
744 case GT:
745 case LBRACK:
746 case RBRACK:
747 case LITERAL_void:
748 case LITERAL_boolean:
749 case LITERAL_byte:
750 case LITERAL_char:
751 case LITERAL_short:
752 case LITERAL_int:
753 case LITERAL_float:
754 case LITERAL_long:
755 case LITERAL_double:
756 case IDENT:
757 case LITERAL_private:
758 case LITERAL_public:
760 case LITERAL_static:
762 case LITERAL_native:
765 case LITERAL_volatile:
766 case LITERAL_class:
768 case RCURLY:
769 case COMMA:
770 case LPAREN:
771 case RPAREN:
772 case ASSIGN:
773 case COLON:
774 case AT:
775 case PLUS_ASSIGN:
776 case MINUS_ASSIGN:
777 case STAR_ASSIGN:
778 case DIV_ASSIGN:
779 case MOD_ASSIGN:
780 case SR_ASSIGN:
781 case BSR_ASSIGN:
782 case SL_ASSIGN:
783 case BAND_ASSIGN:
784 case BXOR_ASSIGN:
785 case BOR_ASSIGN:
786 case LOR:
787 case LAND:
788 case BOR:
789 case BXOR:
790 case NOT_EQUAL:
791 case EQUAL:
792 {
793 break;
794 }
795 default:
796 {
797 throw new NoViableAltException(LT(1), getFilename());
798 }
799 }
800 }
801 {
802 _loop20:
803 do {
804 if ((LA(1)==LBRACK)) {
805 lb = LT(1);
806 lb_AST = astFactory.create(lb);
807 astFactory.makeASTRoot(currentAST, lb_AST);
808 match(LBRACK);
809 if ( inputState.guessing==0 ) {
810 lb_AST.setType(ARRAY_DECLARATOR);
811 }
812 match(RBRACK);
813 }
814 else {
815 break _loop20;
816 }
817
818 } while (true);
819 }
820 if ( inputState.guessing==0 ) {
821 classTypeSpec_AST = (AST)currentAST.root;
822
823 if ( addImagNode ) {
824 classTypeSpec_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE,"TYPE")).add(classTypeSpec_AST));
825 }
826
827 currentAST.root = classTypeSpec_AST;
828 currentAST.child = classTypeSpec_AST!=null &&classTypeSpec_AST.getFirstChild()!=null ?
829 classTypeSpec_AST.getFirstChild() : classTypeSpec_AST;
830 currentAST.advanceChildToEnd();
831 }
832 classTypeSpec_AST = (AST)currentAST.root;
833 returnAST = classTypeSpec_AST;
834 }
835
836 public final void builtInTypeSpec(
837 boolean addImagNode
838 ) throws RecognitionException, TokenStreamException {
839
840 returnAST = null;
841 ASTPair currentAST = new ASTPair();
842 AST builtInTypeSpec_AST = null;
843 Token lb = null;
844 AST lb_AST = null;
845
846 builtInType();
847 astFactory.addASTChild(currentAST, returnAST);
848 {
849 _loop23:
850 do {
851 if ((LA(1)==LBRACK)) {
852 lb = LT(1);
853 lb_AST = astFactory.create(lb);
854 astFactory.makeASTRoot(currentAST, lb_AST);
855 match(LBRACK);
856 if ( inputState.guessing==0 ) {
857 lb_AST.setType(ARRAY_DECLARATOR);
858 }
859 match(RBRACK);
860 }
861 else {
862 break _loop23;
863 }
864
865 } while (true);
866 }
867 if ( inputState.guessing==0 ) {
868 builtInTypeSpec_AST = (AST)currentAST.root;
869
870 if ( addImagNode ) {
871 builtInTypeSpec_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE,"TYPE")).add(builtInTypeSpec_AST));
872 }
873
874 currentAST.root = builtInTypeSpec_AST;
875 currentAST.child = builtInTypeSpec_AST!=null &&builtInTypeSpec_AST.getFirstChild()!=null ?
876 builtInTypeSpec_AST.getFirstChild() : builtInTypeSpec_AST;
877 currentAST.advanceChildToEnd();
878 }
879 builtInTypeSpec_AST = (AST)currentAST.root;
880 returnAST = builtInTypeSpec_AST;
881 }
882
883 public final void builtInType() throws RecognitionException, TokenStreamException {
884
885 returnAST = null;
886 ASTPair currentAST = new ASTPair();
887 AST builtInType_AST = null;
888
889 switch ( LA(1)) {
890 case LITERAL_void:
891 {
892 AST tmp23_AST = null;
893 tmp23_AST = astFactory.create(LT(1));
894 astFactory.addASTChild(currentAST, tmp23_AST);
895 match(LITERAL_void);
896 builtInType_AST = (AST)currentAST.root;
897 break;
898 }
899 case LITERAL_boolean:
900 {
901 AST tmp24_AST = null;
902 tmp24_AST = astFactory.create(LT(1));
903 astFactory.addASTChild(currentAST, tmp24_AST);
904 match(LITERAL_boolean);
905 builtInType_AST = (AST)currentAST.root;
906 break;
907 }
908 case LITERAL_byte:
909 {
910 AST tmp25_AST = null;
911 tmp25_AST = astFactory.create(LT(1));
912 astFactory.addASTChild(currentAST, tmp25_AST);
913 match(LITERAL_byte);
914 builtInType_AST = (AST)currentAST.root;
915 break;
916 }
917 case LITERAL_char:
918 {
919 AST tmp26_AST = null;
920 tmp26_AST = astFactory.create(LT(1));
921 astFactory.addASTChild(currentAST, tmp26_AST);
922 match(LITERAL_char);
923 builtInType_AST = (AST)currentAST.root;
924 break;
925 }
926 case LITERAL_short:
927 {
928 AST tmp27_AST = null;
929 tmp27_AST = astFactory.create(LT(1));
930 astFactory.addASTChild(currentAST, tmp27_AST);
931 match(LITERAL_short);
932 builtInType_AST = (AST)currentAST.root;
933 break;
934 }
935 case LITERAL_int:
936 {
937 AST tmp28_AST = null;
938 tmp28_AST = astFactory.create(LT(1));
939 astFactory.addASTChild(currentAST, tmp28_AST);
940 match(LITERAL_int);
941 builtInType_AST = (AST)currentAST.root;
942 break;
943 }
944 case LITERAL_float:
945 {
946 AST tmp29_AST = null;
947 tmp29_AST = astFactory.create(LT(1));
948 astFactory.addASTChild(currentAST, tmp29_AST);
949 match(LITERAL_float);
950 builtInType_AST = (AST)currentAST.root;
951 break;
952 }
953 case LITERAL_long:
954 {
955 AST tmp30_AST = null;
956 tmp30_AST = astFactory.create(LT(1));
957 astFactory.addASTChild(currentAST, tmp30_AST);
958 match(LITERAL_long);
959 builtInType_AST = (AST)currentAST.root;
960 break;
961 }
962 case LITERAL_double:
963 {
964 AST tmp31_AST = null;
965 tmp31_AST = astFactory.create(LT(1));
966 astFactory.addASTChild(currentAST, tmp31_AST);
967 match(LITERAL_double);
968 builtInType_AST = (AST)currentAST.root;
969 break;
970 }
971 default:
972 {
973 throw new NoViableAltException(LT(1), getFilename());
974 }
975 }
976 returnAST = builtInType_AST;
977 }
978
979 public final void type() throws RecognitionException, TokenStreamException {
980
981 returnAST = null;
982 ASTPair currentAST = new ASTPair();
983 AST type_AST = null;
984
985 switch ( LA(1)) {
986 case IDENT:
987 {
988 identifier();
989 astFactory.addASTChild(currentAST, returnAST);
990 type_AST = (AST)currentAST.root;
991 break;
992 }
993 case LITERAL_void:
994 case LITERAL_boolean:
995 case LITERAL_byte:
996 case LITERAL_char:
997 case LITERAL_short:
998 case LITERAL_int:
999 case LITERAL_float:
1000 case LITERAL_long:
1001 case LITERAL_double:
1002 {
1003 builtInType();
1004 astFactory.addASTChild(currentAST, returnAST);
1005 type_AST = (AST)currentAST.root;
1006 break;
1007 }
1008 default:
1009 {
1010 throw new NoViableAltException(LT(1), getFilename());
1011 }
1012 }
1013 returnAST = type_AST;
1014 }
1015
1016 public final void modifier() throws RecognitionException, TokenStreamException {
1017
1018 returnAST = null;
1019 ASTPair currentAST = new ASTPair();
1020 AST modifier_AST = null;
1021
1022 switch ( LA(1)) {
1023 case LITERAL_private:
1024 {
1025 AST tmp32_AST = null;
1026 tmp32_AST = astFactory.create(LT(1));
1027 astFactory.addASTChild(currentAST, tmp32_AST);
1028 match(LITERAL_private);
1029 modifier_AST = (AST)currentAST.root;
1030 break;
1031 }
1032 case LITERAL_public:
1033 {
1034 AST tmp33_AST = null;
1035 tmp33_AST = astFactory.create(LT(1));
1036 astFactory.addASTChild(currentAST, tmp33_AST);
1037 match(LITERAL_public);
1038 modifier_AST = (AST)currentAST.root;
1039 break;
1040 }
1041 case LITERAL_protected:
1042 {
1043 AST tmp34_AST = null;
1044 tmp34_AST = astFactory.create(LT(1));
1045 astFactory.addASTChild(currentAST, tmp34_AST);
1046 match(LITERAL_protected);
1047 modifier_AST = (AST)currentAST.root;
1048 break;
1049 }
1050 case LITERAL_static:
1051 {
1052 AST tmp35_AST = null;
1053 tmp35_AST = astFactory.create(LT(1));
1054 astFactory.addASTChild(currentAST, tmp35_AST);
1055 match(LITERAL_static);
1056 modifier_AST = (AST)currentAST.root;
1057 break;
1058 }
1059 case LITERAL_transient:
1060 {
1061 AST tmp36_AST = null;
1062 tmp36_AST = astFactory.create(LT(1));
1063 astFactory.addASTChild(currentAST, tmp36_AST);
1064 match(LITERAL_transient);
1065 modifier_AST = (AST)currentAST.root;
1066 break;
1067 }
1068 case FINAL:
1069 {
1070 AST tmp37_AST = null;
1071 tmp37_AST = astFactory.create(LT(1));
1072 astFactory.addASTChild(currentAST, tmp37_AST);
1073 match(FINAL);
1074 modifier_AST = (AST)currentAST.root;
1075 break;
1076 }
1077 case ABSTRACT:
1078 {
1079 AST tmp38_AST = null;
1080 tmp38_AST = astFactory.create(LT(1));
1081 astFactory.addASTChild(currentAST, tmp38_AST);
1082 match(ABSTRACT);
1083 modifier_AST = (AST)currentAST.root;
1084 break;
1085 }
1086 case LITERAL_native:
1087 {
1088 AST tmp39_AST = null;
1089 tmp39_AST = astFactory.create(LT(1));
1090 astFactory.addASTChild(currentAST, tmp39_AST);
1091 match(LITERAL_native);
1092 modifier_AST = (AST)currentAST.root;
1093 break;
1094 }
1095 case LITERAL_threadsafe:
1096 {
1097 AST tmp40_AST = null;
1098 tmp40_AST = astFactory.create(LT(1));
1099 astFactory.addASTChild(currentAST, tmp40_AST);
1100 match(LITERAL_threadsafe);
1101 modifier_AST = (AST)currentAST.root;
1102 break;
1103 }
1105 {
1106 AST tmp41_AST = null;
1107 tmp41_AST = astFactory.create(LT(1));
1108 astFactory.addASTChild(currentAST, tmp41_AST);
1109 match(LITERAL_synchronized);
1110 modifier_AST = (AST)currentAST.root;
1111 break;
1112 }
1113 case LITERAL_volatile:
1114 {
1115 AST tmp42_AST = null;
1116 tmp42_AST = astFactory.create(LT(1));
1117 astFactory.addASTChild(currentAST, tmp42_AST);
1118 match(LITERAL_volatile);
1119 modifier_AST = (AST)currentAST.root;
1120 break;
1121 }
1122 case STRICTFP:
1123 {
1124 AST tmp43_AST = null;
1125 tmp43_AST = astFactory.create(LT(1));
1126 astFactory.addASTChild(currentAST, tmp43_AST);
1127 match(STRICTFP);
1128 modifier_AST = (AST)currentAST.root;
1129 break;
1130 }
1131 default:
1132 {
1133 throw new NoViableAltException(LT(1), getFilename());
1134 }
1135 }
1136 returnAST = modifier_AST;
1137 }
1138
1139 public final void superClassClause() throws RecognitionException, TokenStreamException {
1140
1141 returnAST = null;
1142 ASTPair currentAST = new ASTPair();
1143 AST superClassClause_AST = null;
1144 AST id_AST = null;
1145
1146 {
1147 switch ( LA(1)) {
1148 case LITERAL_extends:
1149 {
1150 match(LITERAL_extends);
1151 identifier();
1152 id_AST = (AST)returnAST;
1153 break;
1154 }
1155 case LCURLY:
1156 case LITERAL_implements:
1157 {
1158 break;
1159 }
1160 default:
1161 {
1162 throw new NoViableAltException(LT(1), getFilename());
1163 }
1164 }
1165 }
1166 if ( inputState.guessing==0 ) {
1167 superClassClause_AST = (AST)currentAST.root;
1168 superClassClause_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(EXTENDS_CLAUSE,"EXTENDS_CLAUSE")).add(id_AST));
1169 currentAST.root = superClassClause_AST;
1170 currentAST.child = superClassClause_AST!=null &&superClassClause_AST.getFirstChild()!=null ?
1171 superClassClause_AST.getFirstChild() : superClassClause_AST;
1172 currentAST.advanceChildToEnd();
1173 }
1174 returnAST = superClassClause_AST;
1175 }
1176
1177 public final void implementsClause() throws RecognitionException, TokenStreamException {
1178
1179 returnAST = null;
1180 ASTPair currentAST = new ASTPair();
1181 AST implementsClause_AST = null;
1182 Token i = null;
1183 AST i_AST = null;
1184
1185 {
1186 switch ( LA(1)) {
1187 case LITERAL_implements:
1188 {
1189 i = LT(1);
1190 i_AST = astFactory.create(i);
1191 match(LITERAL_implements);
1192 identifier();
1193 astFactory.addASTChild(currentAST, returnAST);
1194 {
1195 _loop51:
1196 do {
1197 if ((LA(1)==COMMA)) {
1198 match(COMMA);
1199 identifier();
1200 astFactory.addASTChild(currentAST, returnAST);
1201 }
1202 else {
1203 break _loop51;
1204 }
1205
1206 } while (true);
1207 }
1208 break;
1209 }
1210 case LCURLY:
1211 {
1212 break;
1213 }
1214 default:
1215 {
1216 throw new NoViableAltException(LT(1), getFilename());
1217 }
1218 }
1219 }
1220 if ( inputState.guessing==0 ) {
1221 implementsClause_AST = (AST)currentAST.root;
1222 implementsClause_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(IMPLEMENTS_CLAUSE,"IMPLEMENTS_CLAUSE")).add(implementsClause_AST));
1223 currentAST.root = implementsClause_AST;
1224 currentAST.child = implementsClause_AST!=null &&implementsClause_AST.getFirstChild()!=null ?
1225 implementsClause_AST.getFirstChild() : implementsClause_AST;
1226 currentAST.advanceChildToEnd();
1227 }
1228 implementsClause_AST = (AST)currentAST.root;
1229 returnAST = implementsClause_AST;
1230 }
1231
1232 public final void classBlock() throws RecognitionException, TokenStreamException {
1233
1234 returnAST = null;
1235 ASTPair currentAST = new ASTPair();
1236 AST classBlock_AST = null;
1237
1238 match(LCURLY);
1239 if ( inputState.guessing==0 ) {
1240 blockDepth++;
1241 }
1242 {
1243 _loop43:
1244 do {
1245 switch ( LA(1)) {
1246 case FINAL:
1247 case ABSTRACT:
1248 case STRICTFP:
1249 case LITERAL_void:
1250 case LITERAL_boolean:
1251 case LITERAL_byte:
1252 case LITERAL_char:
1253 case LITERAL_short:
1254 case LITERAL_int:
1255 case LITERAL_float:
1256 case LITERAL_long:
1257 case LITERAL_double:
1258 case IDENT:
1259 case LITERAL_private:
1260 case LITERAL_public:
1261 case LITERAL_protected:
1262 case LITERAL_static:
1263 case LITERAL_transient:
1264 case LITERAL_native:
1265 case LITERAL_threadsafe:
1267 case LITERAL_volatile:
1268 case LITERAL_class:
1269 case LITERAL_interface:
1270 case LCURLY:
1271 case AT:
1272 {
1273 field();
1274 astFactory.addASTChild(currentAST, returnAST);
1275 break;
1276 }
1277 case SEMI:
1278 {
1279 match(SEMI);
1280 break;
1281 }
1282 default:
1283 {
1284 break _loop43;
1285 }
1286 }
1287 } while (true);
1288 }
1289 match(RCURLY);
1290 if ( inputState.guessing==0 ) {
1291 blockDepth--;
1292 }
1293 if ( inputState.guessing==0 ) {
1294 classBlock_AST = (AST)currentAST.root;
1295 classBlock_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(OBJBLOCK,"OBJBLOCK")).add(classBlock_AST));
1296 currentAST.root = classBlock_AST;
1297 currentAST.child = classBlock_AST!=null &&classBlock_AST.getFirstChild()!=null ?
1298 classBlock_AST.getFirstChild() : classBlock_AST;
1299 currentAST.advanceChildToEnd();
1300 }
1301 classBlock_AST = (AST)currentAST.root;
1302 returnAST = classBlock_AST;
1303 }
1304
1305 public final void interfaceExtends() throws RecognitionException, TokenStreamException {
1306
1307 returnAST = null;
1308 ASTPair currentAST = new ASTPair();
1309 AST interfaceExtends_AST = null;
1310 Token e = null;
1311 AST e_AST = null;
1312
1313 {
1314 switch ( LA(1)) {
1315 case LITERAL_extends:
1316 {
1317 e = LT(1);
1318 e_AST = astFactory.create(e);
1319 match(LITERAL_extends);
1320 identifier();
1321 astFactory.addASTChild(currentAST, returnAST);
1322 {
1323 _loop47:
1324 do {
1325 if ((LA(1)==COMMA)) {
1326 match(COMMA);
1327 identifier();
1328 astFactory.addASTChild(currentAST, returnAST);
1329 }
1330 else {
1331 break _loop47;
1332 }
1333
1334 } while (true);
1335 }
1336 break;
1337 }
1338 case LCURLY:
1339 {
1340 break;
1341 }
1342 default:
1343 {
1344 throw new NoViableAltException(LT(1), getFilename());
1345 }
1346 }
1347 }
1348 if ( inputState.guessing==0 ) {
1349 interfaceExtends_AST = (AST)currentAST.root;
1350 interfaceExtends_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(EXTENDS_CLAUSE,"EXTENDS_CLAUSE")).add(interfaceExtends_AST));
1351 currentAST.root = interfaceExtends_AST;
1352 currentAST.child = interfaceExtends_AST!=null &&interfaceExtends_AST.getFirstChild()!=null ?
1353 interfaceExtends_AST.getFirstChild() : interfaceExtends_AST;
1354 currentAST.advanceChildToEnd();
1355 }
1356 interfaceExtends_AST = (AST)currentAST.root;
1357 returnAST = interfaceExtends_AST;
1358 }
1359
1360 public final void field() throws RecognitionException, TokenStreamException {
1361
1362 returnAST = null;
1363 ASTPair currentAST = new ASTPair();
1364 AST field_AST = null;
1365 AST antsBefore_AST = null;
1366 AST mods_AST = null;
1367 AST antsAfter_AST = null;
1368 AST h_AST = null;
1369 AST s_AST = null;
1370 AST cd_AST = null;
1371 AST id_AST = null;
1372 AST t_AST = null;
1373 Token fn = null;
1374 AST fn_AST = null;
1375 AST param_AST = null;
1376 AST rt_AST = null;
1377 AST tc_AST = null;
1378 AST s2_AST = null;
1379 AST v_AST = null;
1380 AST s3_AST = null;
1381 AST s4_AST = null;
1382
1383 if ((_tokenSet_4.member(LA(1))) && (_tokenSet_5.member(LA(2)))) {
1384 annotations();
1385 antsBefore_AST = (AST)returnAST;
1386 modifiers();
1387 mods_AST = (AST)returnAST;
1388 annotations();
1389 antsAfter_AST = (AST)returnAST;
1390 {
1391 switch ( LA(1)) {
1392 case LITERAL_class:
1393 {
1394 classDefinition(antsBefore_AST,mods_AST,antsAfter_AST);
1395 cd_AST = (AST)returnAST;
1396 if ( inputState.guessing==0 ) {
1397 field_AST = (AST)currentAST.root;
1398 field_AST = cd_AST;
1399 currentAST.root = field_AST;
1400 currentAST.child = field_AST!=null &&field_AST.getFirstChild()!=null ?
1401 field_AST.getFirstChild() : field_AST;
1402 currentAST.advanceChildToEnd();
1403 }
1404 break;
1405 }
1406 case LITERAL_interface:
1407 {
1408 interfaceDefinition(antsBefore_AST,mods_AST,antsAfter_AST);
1409 id_AST = (AST)returnAST;
1410 if ( inputState.guessing==0 ) {
1411 field_AST = (AST)currentAST.root;
1412 field_AST = id_AST;
1413 currentAST.root = field_AST;
1414 currentAST.child = field_AST!=null &&field_AST.getFirstChild()!=null ?
1415 field_AST.getFirstChild() : field_AST;
1416 currentAST.advanceChildToEnd();
1417 }
1418 break;
1419 }
1420 default:
1421 if ((LA(1)==IDENT) && (LA(2)==LPAREN)) {
1422 ctorHead();
1423 h_AST = (AST)returnAST;
1425 s_AST = (AST)returnAST;
1426 if ( inputState.guessing==0 ) {
1427 field_AST = (AST)currentAST.root;
1428 field_AST = (AST)astFactory.make( (new ASTArray(6)).add(astFactory.create(CTOR_DEF,"CTOR_DEF")).add(antsBefore_AST).add(mods_AST).add(antsAfter_AST).add(h_AST).add(s_AST));
1429 currentAST.root = field_AST;
1430 currentAST.child = field_AST!=null &&field_AST.getFirstChild()!=null ?
1431 field_AST.getFirstChild() : field_AST;
1432 currentAST.advanceChildToEnd();
1433 }
1434 }
1435 else if (((LA(1) >= LITERAL_void && LA(1) <= IDENT)) && (_tokenSet_6.member(LA(2)))) {
1436 typeSpec(false);
1437 t_AST = (AST)returnAST;
1438 {
1439 if ((LA(1)==IDENT) && (LA(2)==LPAREN)) {
1440 fn = LT(1);
1441 fn_AST = astFactory.create(fn);
1442 match(IDENT);
1443 match(LPAREN);
1445 param_AST = (AST)returnAST;
1446 match(RPAREN);
1447 declaratorBrackets(t_AST);
1448 rt_AST = (AST)returnAST;
1449 {
1450 switch ( LA(1)) {
1451 case LITERAL_throws:
1452 {
1453 throwsClause();
1454 tc_AST = (AST)returnAST;
1455 break;
1456 }
1457 case SEMI:
1458 case LCURLY:
1459 {
1460 break;
1461 }
1462 default:
1463 {
1464 throw new NoViableAltException(LT(1), getFilename());
1465 }
1466 }
1467 }
1468 {
1469 switch ( LA(1)) {
1470 case LCURLY:
1471 {
1473 s2_AST = (AST)returnAST;
1474 break;
1475 }
1476 case SEMI:
1477 {
1478 AST tmp52_AST = null;
1479 tmp52_AST = astFactory.create(LT(1));
1480 match(SEMI);
1481 break;
1482 }
1483 default:
1484 {
1485 throw new NoViableAltException(LT(1), getFilename());
1486 }
1487 }
1488 }
1489 if ( inputState.guessing==0 ) {
1490 field_AST = (AST)currentAST.root;
1491 field_AST = (AST)astFactory.make( (new ASTArray(9)).add(astFactory.create(METHOD_DEF,"METHOD_DEF")).add(antsBefore_AST).add(mods_AST).add(antsAfter_AST).add((AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE,"TYPE")).add(rt_AST))).add(fn_AST).add(param_AST).add(tc_AST).add(s2_AST));
1492 if(blockDepth==1) {
1493 functionNames.add(fn.getText()); }
1494 currentAST.root = field_AST;
1495 currentAST.child = field_AST!=null &&field_AST.getFirstChild()!=null ?
1496 field_AST.getFirstChild() : field_AST;
1497 currentAST.advanceChildToEnd();
1498 }
1499 }
1500 else if ((LA(1)==IDENT) && (_tokenSet_7.member(LA(2)))) {
1501 variableDefinitions(antsBefore_AST,mods_AST,antsAfter_AST,t_AST);
1502 v_AST = (AST)returnAST;
1503 AST tmp53_AST = null;
1504 tmp53_AST = astFactory.create(LT(1));
1505 match(SEMI);
1506 if ( inputState.guessing==0 ) {
1507 field_AST = (AST)currentAST.root;
1508 field_AST = v_AST;
1509 currentAST.root = field_AST;
1510 currentAST.child = field_AST!=null &&field_AST.getFirstChild()!=null ?
1511 field_AST.getFirstChild() : field_AST;
1512 currentAST.advanceChildToEnd();
1513 }
1514 }
1515 else {
1516 throw new NoViableAltException(LT(1), getFilename());
1517 }
1518
1519 }
1520 }
1521 else {
1522 throw new NoViableAltException(LT(1), getFilename());
1523 }
1524 }
1525 }
1526 }
1527 else if ((LA(1)==LITERAL_static) && (LA(2)==LCURLY)) {
1528 match(LITERAL_static);
1530 s3_AST = (AST)returnAST;
1531 if ( inputState.guessing==0 ) {
1532 field_AST = (AST)currentAST.root;
1533 field_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(STATIC_INIT,"STATIC_INIT")).add(s3_AST));
1534 currentAST.root = field_AST;
1535 currentAST.child = field_AST!=null &&field_AST.getFirstChild()!=null ?
1536 field_AST.getFirstChild() : field_AST;
1537 currentAST.advanceChildToEnd();
1538 }
1539 }
1540 else if ((LA(1)==LCURLY)) {
1542 s4_AST = (AST)returnAST;
1543 if ( inputState.guessing==0 ) {
1544 field_AST = (AST)currentAST.root;
1545 field_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(INSTANCE_INIT,"INSTANCE_INIT")).add(s4_AST));
1546 currentAST.root = field_AST;
1547 currentAST.child = field_AST!=null &&field_AST.getFirstChild()!=null ?
1548 field_AST.getFirstChild() : field_AST;
1549 currentAST.advanceChildToEnd();
1550 }
1551 }
1552 else {
1553 throw new NoViableAltException(LT(1), getFilename());
1554 }
1555
1556 returnAST = field_AST;
1557 }
1558
1559 public final void ctorHead() throws RecognitionException, TokenStreamException {
1560
1561 returnAST = null;
1562 ASTPair currentAST = new ASTPair();
1563 AST ctorHead_AST = null;
1564
1565 AST tmp55_AST = null;
1566 tmp55_AST = astFactory.create(LT(1));
1567 astFactory.addASTChild(currentAST, tmp55_AST);
1568 match(IDENT);
1569 match(LPAREN);
1571 astFactory.addASTChild(currentAST, returnAST);
1572 match(RPAREN);
1573 {
1574 switch ( LA(1)) {
1575 case LITERAL_throws:
1576 {
1577 throwsClause();
1578 astFactory.addASTChild(currentAST, returnAST);
1579 break;
1580 }
1581 case LCURLY:
1582 {
1583 break;
1584 }
1585 default:
1586 {
1587 throw new NoViableAltException(LT(1), getFilename());
1588 }
1589 }
1590 }
1591 ctorHead_AST = (AST)currentAST.root;
1592 returnAST = ctorHead_AST;
1593 }
1594
1595 public final void constructorBody() throws RecognitionException, TokenStreamException {
1596
1597 returnAST = null;
1598 ASTPair currentAST = new ASTPair();
1599 AST constructorBody_AST = null;
1600 Token lc = null;
1601 AST lc_AST = null;
1602
1603 lc = LT(1);
1604 lc_AST = astFactory.create(lc);
1605 astFactory.makeASTRoot(currentAST, lc_AST);
1606 match(LCURLY);
1607 if ( inputState.guessing==0 ) {
1608 lc_AST.setType(SLIST); blockDepth++;
1609 }
1610 {
1611 if ((LA(1)==LITERAL_this||LA(1)==LITERAL_super) && (LA(2)==LPAREN)) {
1613 astFactory.addASTChild(currentAST, returnAST);
1614 }
1615 else if ((_tokenSet_8.member(LA(1))) && (_tokenSet_9.member(LA(2)))) {
1616 }
1617 else {
1618 throw new NoViableAltException(LT(1), getFilename());
1619 }
1620
1621 }
1622 {
1623 _loop60:
1624 do {
1625 if ((_tokenSet_10.member(LA(1)))) {
1626 statement();
1627 astFactory.addASTChild(currentAST, returnAST);
1628 }
1629 else {
1630 break _loop60;
1631 }
1632
1633 } while (true);
1634 }
1635 match(RCURLY);
1636 if ( inputState.guessing==0 ) {
1637 blockDepth--;
1638 }
1639 constructorBody_AST = (AST)currentAST.root;
1640 returnAST = constructorBody_AST;
1641 }
1642
1643 public final void parameterDeclarationList() throws RecognitionException, TokenStreamException {
1644
1645 returnAST = null;
1646 ASTPair currentAST = new ASTPair();
1647 AST parameterDeclarationList_AST = null;
1648
1649 {
1650 switch ( LA(1)) {
1651 case FINAL:
1652 case LITERAL_void:
1653 case LITERAL_boolean:
1654 case LITERAL_byte:
1655 case LITERAL_char:
1656 case LITERAL_short:
1657 case LITERAL_int:
1658 case LITERAL_float:
1659 case LITERAL_long:
1660 case LITERAL_double:
1661 case IDENT:
1662 case AT:
1663 {
1665 astFactory.addASTChild(currentAST, returnAST);
1666 {
1667 _loop85:
1668 do {
1669 if ((LA(1)==COMMA)) {
1670 match(COMMA);
1672 astFactory.addASTChild(currentAST, returnAST);
1673 }
1674 else {
1675 break _loop85;
1676 }
1677
1678 } while (true);
1679 }
1680 break;
1681 }
1682 case RPAREN:
1683 {
1684 break;
1685 }
1686 default:
1687 {
1688 throw new NoViableAltException(LT(1), getFilename());
1689 }
1690 }
1691 }
1692 if ( inputState.guessing==0 ) {
1693 parameterDeclarationList_AST = (AST)currentAST.root;
1694 parameterDeclarationList_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(PARAMETERS,"PARAMETERS")).add(parameterDeclarationList_AST));
1695 currentAST.root = parameterDeclarationList_AST;
1696 currentAST.child = parameterDeclarationList_AST!=null &&parameterDeclarationList_AST.getFirstChild()!=null ?
1697 parameterDeclarationList_AST.getFirstChild() : parameterDeclarationList_AST;
1698 currentAST.advanceChildToEnd();
1699 }
1700 parameterDeclarationList_AST = (AST)currentAST.root;
1701 returnAST = parameterDeclarationList_AST;
1702 }
1703
1704 public final void declaratorBrackets(
1705 AST typ
1706 ) throws RecognitionException, TokenStreamException {
1707
1708 returnAST = null;
1709 ASTPair currentAST = new ASTPair();
1710 AST declaratorBrackets_AST = null;
1711 Token lb = null;
1712 AST lb_AST = null;
1713
1714 if ( inputState.guessing==0 ) {
1715 declaratorBrackets_AST = (AST)currentAST.root;
1716 declaratorBrackets_AST=typ;
1717 currentAST.root = declaratorBrackets_AST;
1718 currentAST.child = declaratorBrackets_AST!=null &&declaratorBrackets_AST.getFirstChild()!=null ?
1719 declaratorBrackets_AST.getFirstChild() : declaratorBrackets_AST;
1720 currentAST.advanceChildToEnd();
1721 }
1722 {
1723 _loop68:
1724 do {
1725 if ((LA(1)==LBRACK)) {
1726 lb = LT(1);
1727 lb_AST = astFactory.create(lb);
1728 astFactory.makeASTRoot(currentAST, lb_AST);
1729 match(LBRACK);
1730 if ( inputState.guessing==0 ) {
1731 lb_AST.setType(ARRAY_DECLARATOR);
1732 }
1733 match(RBRACK);
1734 }
1735 else {
1736 break _loop68;
1737 }
1738
1739 } while (true);
1740 }
1741 declaratorBrackets_AST = (AST)currentAST.root;
1742 returnAST = declaratorBrackets_AST;
1743 }
1744
1745 public final void throwsClause() throws RecognitionException, TokenStreamException {
1746
1747 returnAST = null;
1748 ASTPair currentAST = new ASTPair();
1749 AST throwsClause_AST = null;
1750
1751 AST tmp61_AST = null;
1752 tmp61_AST = astFactory.create(LT(1));
1753 astFactory.makeASTRoot(currentAST, tmp61_AST);
1754 match(LITERAL_throws);
1755 identifier();
1756 astFactory.addASTChild(currentAST, returnAST);
1757 {
1758 _loop81:
1759 do {
1760 if ((LA(1)==COMMA)) {
1761 match(COMMA);
1762 identifier();
1763 astFactory.addASTChild(currentAST, returnAST);
1764 }
1765 else {
1766 break _loop81;
1767 }
1768
1769 } while (true);
1770 }
1771 throwsClause_AST = (AST)currentAST.root;
1772 returnAST = throwsClause_AST;
1773 }
1774
1775 public final void compoundStatement() throws RecognitionException, TokenStreamException {
1776
1777 returnAST = null;
1778 ASTPair currentAST = new ASTPair();
1779 AST compoundStatement_AST = null;
1780 Token lc = null;
1781 AST lc_AST = null;
1782
1783 lc = LT(1);
1784 lc_AST = astFactory.create(lc);
1785 astFactory.makeASTRoot(currentAST, lc_AST);
1786 match(LCURLY);
1787 if ( inputState.guessing==0 ) {
1788 lc_AST.setType(SLIST); blockDepth++;
1789 }
1790 {
1791 _loop91:
1792 do {
1793 if ((_tokenSet_10.member(LA(1)))) {
1794 statement();
1795 astFactory.addASTChild(currentAST, returnAST);
1796 }
1797 else {
1798 break _loop91;
1799 }
1800
1801 } while (true);
1802 }
1803 match(RCURLY);
1804 if ( inputState.guessing==0 ) {
1805 blockDepth--;
1806 }
1807 compoundStatement_AST = (AST)currentAST.root;
1808 returnAST = compoundStatement_AST;
1809 }
1810
1811/** Catch obvious constructor calls, but not the expr.super(...) calls */
1812 public final void explicitConstructorInvocation() throws RecognitionException, TokenStreamException {
1813
1814 returnAST = null;
1815 ASTPair currentAST = new ASTPair();
1816 AST explicitConstructorInvocation_AST = null;
1817 Token lp1 = null;
1818 AST lp1_AST = null;
1819 Token lp2 = null;
1820 AST lp2_AST = null;
1821
1822 switch ( LA(1)) {
1823 case LITERAL_this:
1824 {
1825 match(LITERAL_this);
1826 lp1 = LT(1);
1827 lp1_AST = astFactory.create(lp1);
1828 astFactory.makeASTRoot(currentAST, lp1_AST);
1829 match(LPAREN);
1830 argList();
1831 astFactory.addASTChild(currentAST, returnAST);
1832 match(RPAREN);
1833 match(SEMI);
1834 if ( inputState.guessing==0 ) {
1835 lp1_AST.setType(CTOR_CALL);
1836 }
1837 explicitConstructorInvocation_AST = (AST)currentAST.root;
1838 break;
1839 }
1840 case LITERAL_super:
1841 {
1842 match(LITERAL_super);
1843 lp2 = LT(1);
1844 lp2_AST = astFactory.create(lp2);
1845 astFactory.makeASTRoot(currentAST, lp2_AST);
1846 match(LPAREN);
1847 argList();
1848 astFactory.addASTChild(currentAST, returnAST);
1849 match(RPAREN);
1850 match(SEMI);
1851 if ( inputState.guessing==0 ) {
1852 lp2_AST.setType(SUPER_CTOR_CALL);
1853 }
1854 explicitConstructorInvocation_AST = (AST)currentAST.root;
1855 break;
1856 }
1857 default:
1858 {
1859 throw new NoViableAltException(LT(1), getFilename());
1860 }
1861 }
1862 returnAST = explicitConstructorInvocation_AST;
1863 }
1864
1865 public final void statement() throws RecognitionException, TokenStreamException {
1866
1867 returnAST = null;
1868 ASTPair currentAST = new ASTPair();
1869 AST statement_AST = null;
1870 AST antsBefore_AST = null;
1871 AST m_AST = null;
1872 AST antsAfter_AST = null;
1873 Token c = null;
1874 AST c_AST = null;
1875 Token s = null;
1876 AST s_AST = null;
1877
1878 switch ( LA(1)) {
1879 case LCURLY:
1880 {
1882 astFactory.addASTChild(currentAST, returnAST);
1883 statement_AST = (AST)currentAST.root;
1884 break;
1885 }
1886 case LITERAL_if:
1887 {
1888 AST tmp70_AST = null;
1889 tmp70_AST = astFactory.create(LT(1));
1890 astFactory.makeASTRoot(currentAST, tmp70_AST);
1891 match(LITERAL_if);
1892 match(LPAREN);
1893 expression();
1894 astFactory.addASTChild(currentAST, returnAST);
1895 match(RPAREN);
1896 statement();
1897 astFactory.addASTChild(currentAST, returnAST);
1898 {
1899 if ((LA(1)==LITERAL_else) && (_tokenSet_10.member(LA(2)))) {
1900 match(LITERAL_else);
1901 statement();
1902 astFactory.addASTChild(currentAST, returnAST);
1903 }
1904 else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_12.member(LA(2)))) {
1905 }
1906 else {
1907 throw new NoViableAltException(LT(1), getFilename());
1908 }
1909
1910 }
1911 statement_AST = (AST)currentAST.root;
1912 break;
1913 }
1914 case LITERAL_for:
1915 {
1916 AST tmp74_AST = null;
1917 tmp74_AST = astFactory.create(LT(1));
1918 astFactory.makeASTRoot(currentAST, tmp74_AST);
1919 match(LITERAL_for);
1920 match(LPAREN);
1921 forInit();
1922 astFactory.addASTChild(currentAST, returnAST);
1923 match(SEMI);
1924 forCond();
1925 astFactory.addASTChild(currentAST, returnAST);
1926 match(SEMI);
1927 forIter();
1928 astFactory.addASTChild(currentAST, returnAST);
1929 match(RPAREN);
1930 statement();
1931 astFactory.addASTChild(currentAST, returnAST);
1932 statement_AST = (AST)currentAST.root;
1933 break;
1934 }
1935 case LITERAL_while:
1936 {
1937 AST tmp79_AST = null;
1938 tmp79_AST = astFactory.create(LT(1));
1939 astFactory.makeASTRoot(currentAST, tmp79_AST);
1940 match(LITERAL_while);
1941 match(LPAREN);
1942 expression();
1943 astFactory.addASTChild(currentAST, returnAST);
1944 match(RPAREN);
1945 statement();
1946 astFactory.addASTChild(currentAST, returnAST);
1947 statement_AST = (AST)currentAST.root;
1948 break;
1949 }
1950 case LITERAL_do:
1951 {
1952 AST tmp82_AST = null;
1953 tmp82_AST = astFactory.create(LT(1));
1954 astFactory.makeASTRoot(currentAST, tmp82_AST);
1955 match(LITERAL_do);
1956 statement();
1957 astFactory.addASTChild(currentAST, returnAST);
1958 match(LITERAL_while);
1959 match(LPAREN);
1960 expression();
1961 astFactory.addASTChild(currentAST, returnAST);
1962 match(RPAREN);
1963 match(SEMI);
1964 statement_AST = (AST)currentAST.root;
1965 break;
1966 }
1967 case LITERAL_break:
1968 {
1969 AST tmp87_AST = null;
1970 tmp87_AST = astFactory.create(LT(1));
1971 astFactory.makeASTRoot(currentAST, tmp87_AST);
1972 match(LITERAL_break);
1973 {
1974 switch ( LA(1)) {
1975 case IDENT:
1976 {
1977 AST tmp88_AST = null;
1978 tmp88_AST = astFactory.create(LT(1));
1979 astFactory.addASTChild(currentAST, tmp88_AST);
1980 match(IDENT);
1981 break;
1982 }
1983 case SEMI:
1984 {
1985 break;
1986 }
1987 default:
1988 {
1989 throw new NoViableAltException(LT(1), getFilename());
1990 }
1991 }
1992 }
1993 match(SEMI);
1994 statement_AST = (AST)currentAST.root;
1995 break;
1996 }
1997 case LITERAL_continue:
1998 {
1999 AST tmp90_AST = null;
2000 tmp90_AST = astFactory.create(LT(1));
2001 astFactory.makeASTRoot(currentAST, tmp90_AST);
2002 match(LITERAL_continue);
2003 {
2004 switch ( LA(1)) {
2005 case IDENT:
2006 {
2007 AST tmp91_AST = null;
2008 tmp91_AST = astFactory.create(LT(1));
2009 astFactory.addASTChild(currentAST, tmp91_AST);
2010 match(IDENT);
2011 break;
2012 }
2013 case SEMI:
2014 {
2015 break;
2016 }
2017 default:
2018 {
2019 throw new NoViableAltException(LT(1), getFilename());
2020 }
2021 }
2022 }
2023 match(SEMI);
2024 statement_AST = (AST)currentAST.root;
2025 break;
2026 }
2027 case LITERAL_return:
2028 {
2029 AST tmp93_AST = null;
2030 tmp93_AST = astFactory.create(LT(1));
2031 astFactory.makeASTRoot(currentAST, tmp93_AST);
2032 match(LITERAL_return);
2033 {
2034 switch ( LA(1)) {
2035 case LITERAL_void:
2036 case LITERAL_boolean:
2037 case LITERAL_byte:
2038 case LITERAL_char:
2039 case LITERAL_short:
2040 case LITERAL_int:
2041 case LITERAL_float:
2042 case LITERAL_long:
2043 case LITERAL_double:
2044 case IDENT:
2045 case LPAREN:
2046 case LITERAL_this:
2047 case LITERAL_super:
2048 case PLUS:
2049 case MINUS:
2050 case INC:
2051 case DEC:
2052 case BNOT:
2053 case LNOT:
2054 case LITERAL_true:
2055 case LITERAL_false:
2056 case LITERAL_null:
2057 case LITERAL_new:
2058 case NUM_INT:
2059 case CHAR_LITERAL:
2060 case STRING_LITERAL:
2061 case NUM_FLOAT:
2062 case NUM_LONG:
2063 case NUM_DOUBLE:
2064 {
2065 expression();
2066 astFactory.addASTChild(currentAST, returnAST);
2067 break;
2068 }
2069 case SEMI:
2070 {
2071 break;
2072 }
2073 default:
2074 {
2075 throw new NoViableAltException(LT(1), getFilename());
2076 }
2077 }
2078 }
2079 match(SEMI);
2080 statement_AST = (AST)currentAST.root;
2081 break;
2082 }
2083 case LITERAL_switch:
2084 {
2085 AST tmp95_AST = null;
2086 tmp95_AST = astFactory.create(LT(1));
2087 astFactory.makeASTRoot(currentAST, tmp95_AST);
2088 match(LITERAL_switch);
2089 match(LPAREN);
2090 expression();
2091 astFactory.addASTChild(currentAST, returnAST);
2092 match(RPAREN);
2093 match(LCURLY);
2094 if ( inputState.guessing==0 ) {
2095 blockDepth++;
2096 }
2097 {
2098 _loop100:
2099 do {
2100 if ((LA(1)==LITERAL_case||LA(1)==LITERAL_default)) {
2101 casesGroup();
2102 astFactory.addASTChild(currentAST, returnAST);
2103 }
2104 else {
2105 break _loop100;
2106 }
2107
2108 } while (true);
2109 }
2110 match(RCURLY);
2111 if ( inputState.guessing==0 ) {
2112 blockDepth--;
2113 }
2114 statement_AST = (AST)currentAST.root;
2115 break;
2116 }
2117 case LITERAL_try:
2118 {
2119 tryBlock();
2120 astFactory.addASTChild(currentAST, returnAST);
2121 statement_AST = (AST)currentAST.root;
2122 break;
2123 }
2124 case LITERAL_throw:
2125 {
2126 AST tmp100_AST = null;
2127 tmp100_AST = astFactory.create(LT(1));
2128 astFactory.makeASTRoot(currentAST, tmp100_AST);
2129 match(LITERAL_throw);
2130 expression();
2131 astFactory.addASTChild(currentAST, returnAST);
2132 match(SEMI);
2133 statement_AST = (AST)currentAST.root;
2134 break;
2135 }
2136 case SEMI:
2137 {
2138 s = LT(1);
2139 s_AST = astFactory.create(s);
2140 astFactory.addASTChild(currentAST, s_AST);
2141 match(SEMI);
2142 if ( inputState.guessing==0 ) {
2143 s_AST.setType(EMPTY_STAT);
2144 }
2145 statement_AST = (AST)currentAST.root;
2146 break;
2147 }
2148 default:
2149 boolean synPredMatched94 = false;
2150 if (((_tokenSet_13.member(LA(1))) && (_tokenSet_14.member(LA(2))))) {
2151 int _m94 = mark();
2152 synPredMatched94 = true;
2153 inputState.guessing++;
2154 try {
2155 {
2156 declaration();
2157 }
2158 }
2159 catch (RecognitionException pe) {
2160 synPredMatched94 = false;
2161 }
2162 rewind(_m94);
2163inputState.guessing--;
2164 }
2165 if ( synPredMatched94 ) {
2166 declaration();
2167 astFactory.addASTChild(currentAST, returnAST);
2168 match(SEMI);
2169 statement_AST = (AST)currentAST.root;
2170 }
2171 else if ((_tokenSet_15.member(LA(1))) && (_tokenSet_16.member(LA(2)))) {
2172 expression();
2173 astFactory.addASTChild(currentAST, returnAST);
2174 match(SEMI);
2175 statement_AST = (AST)currentAST.root;
2176 }
2177 else if ((_tokenSet_17.member(LA(1))) && (_tokenSet_18.member(LA(2)))) {
2178 annotations();
2179 antsBefore_AST = (AST)returnAST;
2180 astFactory.addASTChild(currentAST, returnAST);
2181 modifiers();
2182 m_AST = (AST)returnAST;
2183 annotations();
2184 antsAfter_AST = (AST)returnAST;
2185 astFactory.addASTChild(currentAST, returnAST);
2186 classDefinition(antsBefore_AST,m_AST,antsAfter_AST);
2187 astFactory.addASTChild(currentAST, returnAST);
2188 statement_AST = (AST)currentAST.root;
2189 }
2190 else if ((LA(1)==IDENT) && (LA(2)==COLON)) {
2191 AST tmp104_AST = null;
2192 tmp104_AST = astFactory.create(LT(1));
2193 astFactory.addASTChild(currentAST, tmp104_AST);
2194 match(IDENT);
2195 c = LT(1);
2196 c_AST = astFactory.create(c);
2197 astFactory.makeASTRoot(currentAST, c_AST);
2198 match(COLON);
2199 if ( inputState.guessing==0 ) {
2200 c_AST.setType(LABELED_STAT);
2201 }
2202 statement();
2203 astFactory.addASTChild(currentAST, returnAST);
2204 statement_AST = (AST)currentAST.root;
2205 }
2206 else if ((LA(1)==LITERAL_synchronized) && (LA(2)==LPAREN)) {
2207 AST tmp105_AST = null;
2208 tmp105_AST = astFactory.create(LT(1));
2209 astFactory.makeASTRoot(currentAST, tmp105_AST);
2210 match(LITERAL_synchronized);
2211 match(LPAREN);
2212 expression();
2213 astFactory.addASTChild(currentAST, returnAST);
2214 match(RPAREN);
2216 astFactory.addASTChild(currentAST, returnAST);
2217 statement_AST = (AST)currentAST.root;
2218 }
2219 else {
2220 throw new NoViableAltException(LT(1), getFilename());
2221 }
2222 }
2223 returnAST = statement_AST;
2224 }
2225
2226 public final void argList() throws RecognitionException, TokenStreamException {
2227
2228 returnAST = null;
2229 ASTPair currentAST = new ASTPair();
2230 AST argList_AST = null;
2231
2232 {
2233 switch ( LA(1)) {
2234 case LITERAL_void:
2235 case LITERAL_boolean:
2236 case LITERAL_byte:
2237 case LITERAL_char:
2238 case LITERAL_short:
2239 case LITERAL_int:
2240 case LITERAL_float:
2241 case LITERAL_long:
2242 case LITERAL_double:
2243 case IDENT:
2244 case LPAREN:
2245 case LITERAL_this:
2246 case LITERAL_super:
2247 case PLUS:
2248 case MINUS:
2249 case INC:
2250 case DEC:
2251 case BNOT:
2252 case LNOT:
2253 case LITERAL_true:
2254 case LITERAL_false:
2255 case LITERAL_null:
2256 case LITERAL_new:
2257 case NUM_INT:
2258 case CHAR_LITERAL:
2259 case STRING_LITERAL:
2260 case NUM_FLOAT:
2261 case NUM_LONG:
2262 case NUM_DOUBLE:
2263 {
2265 astFactory.addASTChild(currentAST, returnAST);
2266 break;
2267 }
2268 case RPAREN:
2269 {
2270 if ( inputState.guessing==0 ) {
2271 argList_AST = (AST)currentAST.root;
2272 argList_AST = astFactory.create(ELIST,"ELIST");
2273 currentAST.root = argList_AST;
2274 currentAST.child = argList_AST!=null &&argList_AST.getFirstChild()!=null ?
2275 argList_AST.getFirstChild() : argList_AST;
2276 currentAST.advanceChildToEnd();
2277 }
2278 break;
2279 }
2280 default:
2281 {
2282 throw new NoViableAltException(LT(1), getFilename());
2283 }
2284 }
2285 }
2286 argList_AST = (AST)currentAST.root;
2287 returnAST = argList_AST;
2288 }
2289
2290/** Declaration of a variable. This can be a class/instance variable,
2291 * or a local variable in a method
2292 * It can also include possible initialization.
2293 */
2294 public final void variableDeclarator(
2295 AST antsBefore, AST mods, AST antsAfter, AST t
2296 ) throws RecognitionException, TokenStreamException {
2297
2298 returnAST = null;
2299 ASTPair currentAST = new ASTPair();
2300 AST variableDeclarator_AST = null;
2301 Token id = null;
2302 AST id_AST = null;
2303 AST d_AST = null;
2304 AST v_AST = null;
2305
2306 id = LT(1);
2307 id_AST = astFactory.create(id);
2308 match(IDENT);
2310 d_AST = (AST)returnAST;
2312 v_AST = (AST)returnAST;
2313 if ( inputState.guessing==0 ) {
2314 variableDeclarator_AST = (AST)currentAST.root;
2315 variableDeclarator_AST = (AST)astFactory.make( (new ASTArray(7)).add(astFactory.create(VARIABLE_DEF,"VARIABLE_DEF")).add(antsBefore).add(mods).add(antsAfter).add((AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE,"TYPE")).add(d_AST))).add(id_AST).add(v_AST));
2316 if(blockDepth==1) {
2317 enumNames.add(id.getText());
2318 }
2319
2320 currentAST.root = variableDeclarator_AST;
2321 currentAST.child = variableDeclarator_AST!=null &&variableDeclarator_AST.getFirstChild()!=null ?
2322 variableDeclarator_AST.getFirstChild() : variableDeclarator_AST;
2323 currentAST.advanceChildToEnd();
2324 }
2325 returnAST = variableDeclarator_AST;
2326 }
2327
2328 public final void varInitializer() throws RecognitionException, TokenStreamException {
2329
2330 returnAST = null;
2331 ASTPair currentAST = new ASTPair();
2332 AST varInitializer_AST = null;
2333
2334 {
2335 switch ( LA(1)) {
2336 case ASSIGN:
2337 {
2338 AST tmp108_AST = null;
2339 tmp108_AST = astFactory.create(LT(1));
2340 astFactory.makeASTRoot(currentAST, tmp108_AST);
2341 match(ASSIGN);
2342 initializer();
2343 astFactory.addASTChild(currentAST, returnAST);
2344 break;
2345 }
2346 case SEMI:
2347 case COMMA:
2348 {
2349 break;
2350 }
2351 default:
2352 {
2353 throw new NoViableAltException(LT(1), getFilename());
2354 }
2355 }
2356 }
2357 varInitializer_AST = (AST)currentAST.root;
2358 returnAST = varInitializer_AST;
2359 }
2360
2361 public final void initializer() throws RecognitionException, TokenStreamException {
2362
2363 returnAST = null;
2364 ASTPair currentAST = new ASTPair();
2365 AST initializer_AST = null;
2366
2367 switch ( LA(1)) {
2368 case LITERAL_void:
2369 case LITERAL_boolean:
2370 case LITERAL_byte:
2371 case LITERAL_char:
2372 case LITERAL_short:
2373 case LITERAL_int:
2374 case LITERAL_float:
2375 case LITERAL_long:
2376 case LITERAL_double:
2377 case IDENT:
2378 case LPAREN:
2379 case LITERAL_this:
2380 case LITERAL_super:
2381 case PLUS:
2382 case MINUS:
2383 case INC:
2384 case DEC:
2385 case BNOT:
2386 case LNOT:
2387 case LITERAL_true:
2388 case LITERAL_false:
2389 case LITERAL_null:
2390 case LITERAL_new:
2391 case NUM_INT:
2392 case CHAR_LITERAL:
2393 case STRING_LITERAL:
2394 case NUM_FLOAT:
2395 case NUM_LONG:
2396 case NUM_DOUBLE:
2397 {
2398 expression();
2399 astFactory.addASTChild(currentAST, returnAST);
2400 initializer_AST = (AST)currentAST.root;
2401 break;
2402 }
2403 case LCURLY:
2404 {
2406 astFactory.addASTChild(currentAST, returnAST);
2407 initializer_AST = (AST)currentAST.root;
2408 break;
2409 }
2410 default:
2411 {
2412 throw new NoViableAltException(LT(1), getFilename());
2413 }
2414 }
2415 returnAST = initializer_AST;
2416 }
2417
2418 public final void arrayInitializer() throws RecognitionException, TokenStreamException {
2419
2420 returnAST = null;
2421 ASTPair currentAST = new ASTPair();
2422 AST arrayInitializer_AST = null;
2423 Token lc = null;
2424 AST lc_AST = null;
2425
2426 lc = LT(1);
2427 lc_AST = astFactory.create(lc);
2428 astFactory.makeASTRoot(currentAST, lc_AST);
2429 match(LCURLY);
2430 if ( inputState.guessing==0 ) {
2431 lc_AST.setType(ARRAY_INIT); blockDepth++;
2432 }
2433 {
2434 switch ( LA(1)) {
2435 case LITERAL_void:
2436 case LITERAL_boolean:
2437 case LITERAL_byte:
2438 case LITERAL_char:
2439 case LITERAL_short:
2440 case LITERAL_int:
2441 case LITERAL_float:
2442 case LITERAL_long:
2443 case LITERAL_double:
2444 case IDENT:
2445 case LCURLY:
2446 case LPAREN:
2447 case LITERAL_this:
2448 case LITERAL_super:
2449 case PLUS:
2450 case MINUS:
2451 case INC:
2452 case DEC:
2453 case BNOT:
2454 case LNOT:
2455 case LITERAL_true:
2456 case LITERAL_false:
2457 case LITERAL_null:
2458 case LITERAL_new:
2459 case NUM_INT:
2460 case CHAR_LITERAL:
2461 case STRING_LITERAL:
2462 case NUM_FLOAT:
2463 case NUM_LONG:
2464 case NUM_DOUBLE:
2465 {
2466 initializer();
2467 astFactory.addASTChild(currentAST, returnAST);
2468 {
2469 _loop74:
2470 do {
2471 if ((LA(1)==COMMA) && (_tokenSet_19.member(LA(2)))) {
2472 match(COMMA);
2473 initializer();
2474 astFactory.addASTChild(currentAST, returnAST);
2475 }
2476 else {
2477 break _loop74;
2478 }
2479
2480 } while (true);
2481 }
2482 {
2483 switch ( LA(1)) {
2484 case COMMA:
2485 {
2486 match(COMMA);
2487 break;
2488 }
2489 case RCURLY:
2490 {
2491 break;
2492 }
2493 default:
2494 {
2495 throw new NoViableAltException(LT(1), getFilename());
2496 }
2497 }
2498 }
2499 break;
2500 }
2501 case RCURLY:
2502 {
2503 break;
2504 }
2505 default:
2506 {
2507 throw new NoViableAltException(LT(1), getFilename());
2508 }
2509 }
2510 }
2511 match(RCURLY);
2512 if ( inputState.guessing==0 ) {
2513 blockDepth--;
2514 }
2515 arrayInitializer_AST = (AST)currentAST.root;
2516 returnAST = arrayInitializer_AST;
2517 }
2518
2519 public final void expression() throws RecognitionException, TokenStreamException {
2520
2521 returnAST = null;
2522 ASTPair currentAST = new ASTPair();
2523 AST expression_AST = null;
2524
2526 astFactory.addASTChild(currentAST, returnAST);
2527 if ( inputState.guessing==0 ) {
2528 expression_AST = (AST)currentAST.root;
2529 expression_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(EXPR,"EXPR")).add(expression_AST));
2530 currentAST.root = expression_AST;
2531 currentAST.child = expression_AST!=null &&expression_AST.getFirstChild()!=null ?
2532 expression_AST.getFirstChild() : expression_AST;
2533 currentAST.advanceChildToEnd();
2534 }
2535 expression_AST = (AST)currentAST.root;
2536 returnAST = expression_AST;
2537 }
2538
2539 public final void parameterDeclaration() throws RecognitionException, TokenStreamException {
2540
2541 returnAST = null;
2542 ASTPair currentAST = new ASTPair();
2543 AST parameterDeclaration_AST = null;
2544 AST antsBefore_AST = null;
2545 AST pm_AST = null;
2546 AST antsAfter_AST = null;
2547 AST t_AST = null;
2548 Token id = null;
2549 AST id_AST = null;
2550 AST pd_AST = null;
2551
2552 annotations();
2553 antsBefore_AST = (AST)returnAST;
2555 pm_AST = (AST)returnAST;
2556 annotations();
2557 antsAfter_AST = (AST)returnAST;
2558 typeSpec(false);
2559 t_AST = (AST)returnAST;
2560 id = LT(1);
2561 id_AST = astFactory.create(id);
2562 match(IDENT);
2563 declaratorBrackets(t_AST);
2564 pd_AST = (AST)returnAST;
2565 if ( inputState.guessing==0 ) {
2566 parameterDeclaration_AST = (AST)currentAST.root;
2567 parameterDeclaration_AST = (AST)astFactory.make( (new ASTArray(6)).add(astFactory.create(PARAMETER_DEF,"PARAMETER_DEF")).add(antsBefore_AST).add(pm_AST).add(antsAfter_AST).add((AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(TYPE,"TYPE")).add(pd_AST))).add(id_AST));
2568 currentAST.root = parameterDeclaration_AST;
2569 currentAST.child = parameterDeclaration_AST!=null &&parameterDeclaration_AST.getFirstChild()!=null ?
2570 parameterDeclaration_AST.getFirstChild() : parameterDeclaration_AST;
2571 currentAST.advanceChildToEnd();
2572 }
2573 returnAST = parameterDeclaration_AST;
2574 }
2575
2576 public final void parameterModifier() throws RecognitionException, TokenStreamException {
2577
2578 returnAST = null;
2579 ASTPair currentAST = new ASTPair();
2580 AST parameterModifier_AST = null;
2581 Token f = null;
2582 AST f_AST = null;
2583
2584 {
2585 switch ( LA(1)) {
2586 case FINAL:
2587 {
2588 f = LT(1);
2589 f_AST = astFactory.create(f);
2590 astFactory.addASTChild(currentAST, f_AST);
2591 match(FINAL);
2592 break;
2593 }
2594 case LITERAL_void:
2595 case LITERAL_boolean:
2596 case LITERAL_byte:
2597 case LITERAL_char:
2598 case LITERAL_short:
2599 case LITERAL_int:
2600 case LITERAL_float:
2601 case LITERAL_long:
2602 case LITERAL_double:
2603 case IDENT:
2604 case AT:
2605 {
2606 break;
2607 }
2608 default:
2609 {
2610 throw new NoViableAltException(LT(1), getFilename());
2611 }
2612 }
2613 }
2614 if ( inputState.guessing==0 ) {
2615 parameterModifier_AST = (AST)currentAST.root;
2616 parameterModifier_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(MODIFIERS,"MODIFIERS")).add(f_AST));
2617 currentAST.root = parameterModifier_AST;
2618 currentAST.child = parameterModifier_AST!=null &&parameterModifier_AST.getFirstChild()!=null ?
2619 parameterModifier_AST.getFirstChild() : parameterModifier_AST;
2620 currentAST.advanceChildToEnd();
2621 }
2622 parameterModifier_AST = (AST)currentAST.root;
2623 returnAST = parameterModifier_AST;
2624 }
2625
2626 public final void forInit() throws RecognitionException, TokenStreamException {
2627
2628 returnAST = null;
2629 ASTPair currentAST = new ASTPair();
2630 AST forInit_AST = null;
2631
2632 {
2633 boolean synPredMatched112 = false;
2634 if (((_tokenSet_13.member(LA(1))) && (_tokenSet_14.member(LA(2))))) {
2635 int _m112 = mark();
2636 synPredMatched112 = true;
2637 inputState.guessing++;
2638 try {
2639 {
2640 declaration();
2641 }
2642 }
2643 catch (RecognitionException pe) {
2644 synPredMatched112 = false;
2645 }
2646 rewind(_m112);
2647inputState.guessing--;
2648 }
2649 if ( synPredMatched112 ) {
2650 declaration();
2651 astFactory.addASTChild(currentAST, returnAST);
2652 }
2653 else if ((_tokenSet_15.member(LA(1))) && (_tokenSet_20.member(LA(2)))) {
2655 astFactory.addASTChild(currentAST, returnAST);
2656 }
2657 else if ((LA(1)==SEMI)) {
2658 }
2659 else {
2660 throw new NoViableAltException(LT(1), getFilename());
2661 }
2662
2663 }
2664 if ( inputState.guessing==0 ) {
2665 forInit_AST = (AST)currentAST.root;
2666 forInit_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(FOR_INIT,"FOR_INIT")).add(forInit_AST));
2667 currentAST.root = forInit_AST;
2668 currentAST.child = forInit_AST!=null &&forInit_AST.getFirstChild()!=null ?
2669 forInit_AST.getFirstChild() : forInit_AST;
2670 currentAST.advanceChildToEnd();
2671 }
2672 forInit_AST = (AST)currentAST.root;
2673 returnAST = forInit_AST;
2674 }
2675
2676 public final void forCond() throws RecognitionException, TokenStreamException {
2677
2678 returnAST = null;
2679 ASTPair currentAST = new ASTPair();
2680 AST forCond_AST = null;
2681
2682 {
2683 switch ( LA(1)) {
2684 case LITERAL_void:
2685 case LITERAL_boolean:
2686 case LITERAL_byte:
2687 case LITERAL_char:
2688 case LITERAL_short:
2689 case LITERAL_int:
2690 case LITERAL_float:
2691 case LITERAL_long:
2692 case LITERAL_double:
2693 case IDENT:
2694 case LPAREN:
2695 case LITERAL_this:
2696 case LITERAL_super:
2697 case PLUS:
2698 case MINUS:
2699 case INC:
2700 case DEC:
2701 case BNOT:
2702 case LNOT:
2703 case LITERAL_true:
2704 case LITERAL_false:
2705 case LITERAL_null:
2706 case LITERAL_new:
2707 case NUM_INT:
2708 case CHAR_LITERAL:
2709 case STRING_LITERAL:
2710 case NUM_FLOAT:
2711 case NUM_LONG:
2712 case NUM_DOUBLE:
2713 {
2714 expression();
2715 astFactory.addASTChild(currentAST, returnAST);
2716 break;
2717 }
2718 case SEMI:
2719 {
2720 break;
2721 }
2722 default:
2723 {
2724 throw new NoViableAltException(LT(1), getFilename());
2725 }
2726 }
2727 }
2728 if ( inputState.guessing==0 ) {
2729 forCond_AST = (AST)currentAST.root;
2730 forCond_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(FOR_CONDITION,"FOR_CONDITION")).add(forCond_AST));
2731 currentAST.root = forCond_AST;
2732 currentAST.child = forCond_AST!=null &&forCond_AST.getFirstChild()!=null ?
2733 forCond_AST.getFirstChild() : forCond_AST;
2734 currentAST.advanceChildToEnd();
2735 }
2736 forCond_AST = (AST)currentAST.root;
2737 returnAST = forCond_AST;
2738 }
2739
2740 public final void forIter() throws RecognitionException, TokenStreamException {
2741
2742 returnAST = null;
2743 ASTPair currentAST = new ASTPair();
2744 AST forIter_AST = null;
2745
2746 {
2747 switch ( LA(1)) {
2748 case LITERAL_void:
2749 case LITERAL_boolean:
2750 case LITERAL_byte:
2751 case LITERAL_char:
2752 case LITERAL_short:
2753 case LITERAL_int:
2754 case LITERAL_float:
2755 case LITERAL_long:
2756 case LITERAL_double:
2757 case IDENT:
2758 case LPAREN:
2759 case LITERAL_this:
2760 case LITERAL_super:
2761 case PLUS:
2762 case MINUS:
2763 case INC:
2764 case DEC:
2765 case BNOT:
2766 case LNOT:
2767 case LITERAL_true:
2768 case LITERAL_false:
2769 case LITERAL_null:
2770 case LITERAL_new:
2771 case NUM_INT:
2772 case CHAR_LITERAL:
2773 case STRING_LITERAL:
2774 case NUM_FLOAT:
2775 case NUM_LONG:
2776 case NUM_DOUBLE:
2777 {
2779 astFactory.addASTChild(currentAST, returnAST);
2780 break;
2781 }
2782 case RPAREN:
2783 {
2784 break;
2785 }
2786 default:
2787 {
2788 throw new NoViableAltException(LT(1), getFilename());
2789 }
2790 }
2791 }
2792 if ( inputState.guessing==0 ) {
2793 forIter_AST = (AST)currentAST.root;
2794 forIter_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(FOR_ITERATOR,"FOR_ITERATOR")).add(forIter_AST));
2795 currentAST.root = forIter_AST;
2796 currentAST.child = forIter_AST!=null &&forIter_AST.getFirstChild()!=null ?
2797 forIter_AST.getFirstChild() : forIter_AST;
2798 currentAST.advanceChildToEnd();
2799 }
2800 forIter_AST = (AST)currentAST.root;
2801 returnAST = forIter_AST;
2802 }
2803
2804 public final void casesGroup() throws RecognitionException, TokenStreamException {
2805
2806 returnAST = null;
2807 ASTPair currentAST = new ASTPair();
2808 AST casesGroup_AST = null;
2809
2810 {
2811 int _cnt103=0;
2812 _loop103:
2813 do {
2814 if ((LA(1)==LITERAL_case||LA(1)==LITERAL_default) && (_tokenSet_21.member(LA(2)))) {
2815 aCase();
2816 astFactory.addASTChild(currentAST, returnAST);
2817 }
2818 else {
2819 if ( _cnt103>=1 ) { break _loop103; } else {throw new NoViableAltException(LT(1), getFilename());}
2820 }
2821
2822 _cnt103++;
2823 } while (true);
2824 }
2825 caseSList();
2826 astFactory.addASTChild(currentAST, returnAST);
2827 if ( inputState.guessing==0 ) {
2828 casesGroup_AST = (AST)currentAST.root;
2829 casesGroup_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(CASE_GROUP,"CASE_GROUP")).add(casesGroup_AST));
2830 currentAST.root = casesGroup_AST;
2831 currentAST.child = casesGroup_AST!=null &&casesGroup_AST.getFirstChild()!=null ?
2832 casesGroup_AST.getFirstChild() : casesGroup_AST;
2833 currentAST.advanceChildToEnd();
2834 }
2835 casesGroup_AST = (AST)currentAST.root;
2836 returnAST = casesGroup_AST;
2837 }
2838
2839 public final void tryBlock() throws RecognitionException, TokenStreamException {
2840
2841 returnAST = null;
2842 ASTPair currentAST = new ASTPair();
2843 AST tryBlock_AST = null;
2844
2845 AST tmp112_AST = null;
2846 tmp112_AST = astFactory.create(LT(1));
2847 astFactory.makeASTRoot(currentAST, tmp112_AST);
2848 match(LITERAL_try);
2850 astFactory.addASTChild(currentAST, returnAST);
2851 {
2852 _loop119:
2853 do {
2854 if ((LA(1)==LITERAL_catch)) {
2855 handler();
2856 astFactory.addASTChild(currentAST, returnAST);
2857 }
2858 else {
2859 break _loop119;
2860 }
2861
2862 } while (true);
2863 }
2864 {
2865 switch ( LA(1)) {
2866 case LITERAL_finally:
2867 {
2868 finallyClause();
2869 astFactory.addASTChild(currentAST, returnAST);
2870 break;
2871 }
2872 case FINAL:
2873 case ABSTRACT:
2874 case STRICTFP:
2875 case SEMI:
2876 case LITERAL_void:
2877 case LITERAL_boolean:
2878 case LITERAL_byte:
2879 case LITERAL_char:
2880 case LITERAL_short:
2881 case LITERAL_int:
2882 case LITERAL_float:
2883 case LITERAL_long:
2884 case LITERAL_double:
2885 case IDENT:
2886 case LITERAL_private:
2887 case LITERAL_public:
2888 case LITERAL_protected:
2889 case LITERAL_static:
2890 case LITERAL_transient:
2891 case LITERAL_native:
2892 case LITERAL_threadsafe:
2894 case LITERAL_volatile:
2895 case LITERAL_class:
2896 case LCURLY:
2897 case RCURLY:
2898 case LPAREN:
2899 case LITERAL_this:
2900 case LITERAL_super:
2901 case LITERAL_if:
2902 case LITERAL_else:
2903 case LITERAL_for:
2904 case LITERAL_while:
2905 case LITERAL_do:
2906 case LITERAL_break:
2907 case LITERAL_continue:
2908 case LITERAL_return:
2909 case LITERAL_switch:
2910 case LITERAL_throw:
2911 case LITERAL_case:
2912 case LITERAL_default:
2913 case LITERAL_try:
2914 case AT:
2915 case PLUS:
2916 case MINUS:
2917 case INC:
2918 case DEC:
2919 case BNOT:
2920 case LNOT:
2921 case LITERAL_true:
2922 case LITERAL_false:
2923 case LITERAL_null:
2924 case LITERAL_new:
2925 case NUM_INT:
2926 case CHAR_LITERAL:
2927 case STRING_LITERAL:
2928 case NUM_FLOAT:
2929 case NUM_LONG:
2930 case NUM_DOUBLE:
2931 {
2932 break;
2933 }
2934 default:
2935 {
2936 throw new NoViableAltException(LT(1), getFilename());
2937 }
2938 }
2939 }
2940 tryBlock_AST = (AST)currentAST.root;
2941 returnAST = tryBlock_AST;
2942 }
2943
2944 public final void aCase() throws RecognitionException, TokenStreamException {
2945
2946 returnAST = null;
2947 ASTPair currentAST = new ASTPair();
2948 AST aCase_AST = null;
2949
2950 {
2951 switch ( LA(1)) {
2952 case LITERAL_case:
2953 {
2954 AST tmp113_AST = null;
2955 tmp113_AST = astFactory.create(LT(1));
2956 astFactory.makeASTRoot(currentAST, tmp113_AST);
2957 match(LITERAL_case);
2958 expression();
2959 astFactory.addASTChild(currentAST, returnAST);
2960 break;
2961 }
2962 case LITERAL_default:
2963 {
2964 AST tmp114_AST = null;
2965 tmp114_AST = astFactory.create(LT(1));
2966 astFactory.addASTChild(currentAST, tmp114_AST);
2967 match(LITERAL_default);
2968 break;
2969 }
2970 default:
2971 {
2972 throw new NoViableAltException(LT(1), getFilename());
2973 }
2974 }
2975 }
2976 match(COLON);
2977 aCase_AST = (AST)currentAST.root;
2978 returnAST = aCase_AST;
2979 }
2980
2981 public final void caseSList() throws RecognitionException, TokenStreamException {
2982
2983 returnAST = null;
2984 ASTPair currentAST = new ASTPair();
2985 AST caseSList_AST = null;
2986
2987 {
2988 _loop108:
2989 do {
2990 if ((_tokenSet_10.member(LA(1)))) {
2991 statement();
2992 astFactory.addASTChild(currentAST, returnAST);
2993 }
2994 else {
2995 break _loop108;
2996 }
2997
2998 } while (true);
2999 }
3000 if ( inputState.guessing==0 ) {
3001 caseSList_AST = (AST)currentAST.root;
3002 caseSList_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(SLIST,"SLIST")).add(caseSList_AST));
3003 currentAST.root = caseSList_AST;
3004 currentAST.child = caseSList_AST!=null &&caseSList_AST.getFirstChild()!=null ?
3005 caseSList_AST.getFirstChild() : caseSList_AST;
3006 currentAST.advanceChildToEnd();
3007 }
3008 caseSList_AST = (AST)currentAST.root;
3009 returnAST = caseSList_AST;
3010 }
3011
3012 public final void expressionList() throws RecognitionException, TokenStreamException {
3013
3014 returnAST = null;
3015 ASTPair currentAST = new ASTPair();
3016 AST expressionList_AST = null;
3017
3018 expression();
3019 astFactory.addASTChild(currentAST, returnAST);
3020 {
3021 _loop135:
3022 do {
3023 if ((LA(1)==COMMA)) {
3024 match(COMMA);
3025 expression();
3026 astFactory.addASTChild(currentAST, returnAST);
3027 }
3028 else {
3029 break _loop135;
3030 }
3031
3032 } while (true);
3033 }
3034 if ( inputState.guessing==0 ) {
3035 expressionList_AST = (AST)currentAST.root;
3036 expressionList_AST = (AST)astFactory.make( (new ASTArray(2)).add(astFactory.create(ELIST,"ELIST")).add(expressionList_AST));
3037 currentAST.root = expressionList_AST;
3038 currentAST.child = expressionList_AST!=null &&expressionList_AST.getFirstChild()!=null ?
3039 expressionList_AST.getFirstChild() : expressionList_AST;
3040 currentAST.advanceChildToEnd();
3041 }
3042 expressionList_AST = (AST)currentAST.root;
3043 returnAST = expressionList_AST;
3044 }
3045
3046 public final void handler() throws RecognitionException, TokenStreamException {
3047
3048 returnAST = null;
3049 ASTPair currentAST = new ASTPair();
3050 AST handler_AST = null;
3051
3052 AST tmp117_AST = null;
3053 tmp117_AST = astFactory.create(LT(1));
3054 astFactory.makeASTRoot(currentAST, tmp117_AST);
3055 match(LITERAL_catch);
3056 match(LPAREN);
3058 astFactory.addASTChild(currentAST, returnAST);
3059 match(RPAREN);
3061 astFactory.addASTChild(currentAST, returnAST);
3062 handler_AST = (AST)currentAST.root;
3063 returnAST = handler_AST;
3064 }
3065
3066 public final void finallyClause() throws RecognitionException, TokenStreamException {
3067
3068 returnAST = null;
3069 ASTPair currentAST = new ASTPair();
3070 AST finallyClause_AST = null;
3071
3072 AST tmp120_AST = null;
3073 tmp120_AST = astFactory.create(LT(1));
3074 astFactory.makeASTRoot(currentAST, tmp120_AST);
3075 match(LITERAL_finally);
3077 astFactory.addASTChild(currentAST, returnAST);
3078 finallyClause_AST = (AST)currentAST.root;
3079 returnAST = finallyClause_AST;
3080 }
3081
3082 public final void annotation() throws RecognitionException, TokenStreamException {
3083
3084 returnAST = null;
3085 ASTPair currentAST = new ASTPair();
3086 AST annotation_AST = null;
3087 AST type_AST = null;
3088 AST content_AST = null;
3089
3090 {
3091 AST tmp121_AST = null;
3092 tmp121_AST = astFactory.create(LT(1));
3093 astFactory.addASTChild(currentAST, tmp121_AST);
3094 match(AT);
3095 typeSpec(false);
3096 type_AST = (AST)returnAST;
3097 astFactory.addASTChild(currentAST, returnAST);
3098 {
3099 switch ( LA(1)) {
3100 case LPAREN:
3101 {
3102 AST tmp122_AST = null;
3103 tmp122_AST = astFactory.create(LT(1));
3104 astFactory.addASTChild(currentAST, tmp122_AST);
3105 match(LPAREN);
3106 {
3107 if ((_tokenSet_22.member(LA(1))) && (_tokenSet_23.member(LA(2)))) {
3109 content_AST = (AST)returnAST;
3110 astFactory.addASTChild(currentAST, returnAST);
3111 }
3112 else if ((LA(1)==IDENT) && (_tokenSet_24.member(LA(2)))) {
3113 identPrimary();
3114 astFactory.addASTChild(currentAST, returnAST);
3115 AST tmp123_AST = null;
3116 tmp123_AST = astFactory.create(LT(1));
3117 astFactory.addASTChild(currentAST, tmp123_AST);
3118 match(ASSIGN);
3120 astFactory.addASTChild(currentAST, returnAST);
3121 {
3122 _loop131:
3123 do {
3124 if ((LA(1)==COMMA)) {
3125 AST tmp124_AST = null;
3126 tmp124_AST = astFactory.create(LT(1));
3127 astFactory.addASTChild(currentAST, tmp124_AST);
3128 match(COMMA);
3129 identPrimary();
3130 astFactory.addASTChild(currentAST, returnAST);
3131 AST tmp125_AST = null;
3132 tmp125_AST = astFactory.create(LT(1));
3133 astFactory.addASTChild(currentAST, tmp125_AST);
3134 match(ASSIGN);
3136 astFactory.addASTChild(currentAST, returnAST);
3137 }
3138 else {
3139 break _loop131;
3140 }
3141
3142 } while (true);
3143 }
3144 }
3145 else {
3146 throw new NoViableAltException(LT(1), getFilename());
3147 }
3148
3149 }
3150 AST tmp126_AST = null;
3151 tmp126_AST = astFactory.create(LT(1));
3152 astFactory.addASTChild(currentAST, tmp126_AST);
3153 match(RPAREN);
3154 break;
3155 }
3156 case FINAL:
3157 case ABSTRACT:
3158 case STRICTFP:
3159 case LITERAL_void:
3160 case LITERAL_boolean:
3161 case LITERAL_byte:
3162 case LITERAL_char:
3163 case LITERAL_short:
3164 case LITERAL_int:
3165 case LITERAL_float:
3166 case LITERAL_long:
3167 case LITERAL_double:
3168 case IDENT:
3169 case LITERAL_private:
3170 case LITERAL_public:
3171 case LITERAL_protected:
3172 case LITERAL_static:
3173 case LITERAL_transient:
3174 case LITERAL_native:
3175 case LITERAL_threadsafe:
3177 case LITERAL_volatile:
3178 case LITERAL_class:
3179 case LITERAL_interface:
3180 case AT:
3181 {
3182 break;
3183 }
3184 default:
3185 {
3186 throw new NoViableAltException(LT(1), getFilename());
3187 }
3188 }
3189 }
3190 }
3191 annotation_AST = (AST)currentAST.root;
3192 returnAST = annotation_AST;
3193 }
3194
3195 public final void primaryExpression() throws RecognitionException, TokenStreamException {
3196
3197 returnAST = null;
3198 ASTPair currentAST = new ASTPair();
3199 AST primaryExpression_AST = null;
3200 Token lbt = null;
3201 AST lbt_AST = null;
3202
3203 switch ( LA(1)) {
3204 case IDENT:
3205 {
3206 identPrimary();
3207 astFactory.addASTChild(currentAST, returnAST);
3208 {
3209 if ((LA(1)==DOT) && (LA(2)==LITERAL_class)) {
3210 AST tmp127_AST = null;
3211 tmp127_AST = astFactory.create(LT(1));
3212 astFactory.makeASTRoot(currentAST, tmp127_AST);
3213 match(DOT);
3214 AST tmp128_AST = null;
3215 tmp128_AST = astFactory.create(LT(1));
3216 astFactory.addASTChild(currentAST, tmp128_AST);
3217 match(LITERAL_class);
3218 }
3219 else if ((_tokenSet_25.member(LA(1))) && (_tokenSet_26.member(LA(2)))) {
3220 }
3221 else {
3222 throw new NoViableAltException(LT(1), getFilename());
3223 }
3224
3225 }
3226 primaryExpression_AST = (AST)currentAST.root;
3227 break;
3228 }
3229 case NUM_INT:
3230 case CHAR_LITERAL:
3231 case STRING_LITERAL:
3232 case NUM_FLOAT:
3233 case NUM_LONG:
3234 case NUM_DOUBLE:
3235 {
3236 constant();
3237 astFactory.addASTChild(currentAST, returnAST);
3238 primaryExpression_AST = (AST)currentAST.root;
3239 break;
3240 }
3241 case LITERAL_true:
3242 {
3243 AST tmp129_AST = null;
3244 tmp129_AST = astFactory.create(LT(1));
3245 astFactory.addASTChild(currentAST, tmp129_AST);
3246 match(LITERAL_true);
3247 primaryExpression_AST = (AST)currentAST.root;
3248 break;
3249 }
3250 case LITERAL_false:
3251 {
3252 AST tmp130_AST = null;
3253 tmp130_AST = astFactory.create(LT(1));
3254 astFactory.addASTChild(currentAST, tmp130_AST);
3255 match(LITERAL_false);
3256 primaryExpression_AST = (AST)currentAST.root;
3257 break;
3258 }
3259 case LITERAL_null:
3260 {
3261 AST tmp131_AST = null;
3262 tmp131_AST = astFactory.create(LT(1));
3263 astFactory.addASTChild(currentAST, tmp131_AST);
3264 match(LITERAL_null);
3265 primaryExpression_AST = (AST)currentAST.root;
3266 break;
3267 }
3268 case LITERAL_new:
3269 {
3270 newExpression();
3271 astFactory.addASTChild(currentAST, returnAST);
3272 primaryExpression_AST = (AST)currentAST.root;
3273 break;
3274 }
3275 case LITERAL_this:
3276 {
3277 AST tmp132_AST = null;
3278 tmp132_AST = astFactory.create(LT(1));
3279 astFactory.addASTChild(currentAST, tmp132_AST);
3280 match(LITERAL_this);
3281 primaryExpression_AST = (AST)currentAST.root;
3282 break;
3283 }
3284 case LITERAL_super:
3285 {
3286 AST tmp133_AST = null;
3287 tmp133_AST = astFactory.create(LT(1));
3288 astFactory.addASTChild(currentAST, tmp133_AST);
3289 match(LITERAL_super);
3290 primaryExpression_AST = (AST)currentAST.root;
3291 break;
3292 }
3293 case LPAREN:
3294 {
3295 match(LPAREN);
3297 astFactory.addASTChild(currentAST, returnAST);
3298 match(RPAREN);
3299 primaryExpression_AST = (AST)currentAST.root;
3300 break;
3301 }
3302 case LITERAL_void:
3303 case LITERAL_boolean:
3304 case LITERAL_byte:
3305 case LITERAL_char:
3306 case LITERAL_short:
3307 case LITERAL_int:
3308 case LITERAL_float:
3309 case LITERAL_long:
3310 case LITERAL_double:
3311 {
3312 builtInType();
3313 astFactory.addASTChild(currentAST, returnAST);
3314 {
3315 _loop193:
3316 do {
3317 if ((LA(1)==LBRACK)) {
3318 lbt = LT(1);
3319 lbt_AST = astFactory.create(lbt);
3320 astFactory.makeASTRoot(currentAST, lbt_AST);
3321 match(LBRACK);
3322 if ( inputState.guessing==0 ) {
3323 lbt_AST.setType(ARRAY_DECLARATOR);
3324 }
3325 match(RBRACK);
3326 }
3327 else {
3328 break _loop193;
3329 }
3330
3331 } while (true);
3332 }
3333 AST tmp137_AST = null;
3334 tmp137_AST = astFactory.create(LT(1));
3335 astFactory.makeASTRoot(currentAST, tmp137_AST);
3336 match(DOT);
3337 AST tmp138_AST = null;
3338 tmp138_AST = astFactory.create(LT(1));
3339 astFactory.addASTChild(currentAST, tmp138_AST);
3340 match(LITERAL_class);
3341 primaryExpression_AST = (AST)currentAST.root;
3342 break;
3343 }
3344 default:
3345 {
3346 throw new NoViableAltException(LT(1), getFilename());
3347 }
3348 }
3349 returnAST = primaryExpression_AST;
3350 }
3351
3352/** Match a, a.b.c refs, a.b.c(...) refs, a.b.c[], a.b.c[].class,
3353 * and a.b.c.class refs. Also this(...) and super(...). Match
3354 * this or super.
3355 */
3356 public final void identPrimary() throws RecognitionException, TokenStreamException {
3357
3358 returnAST = null;
3359 ASTPair currentAST = new ASTPair();
3360 AST identPrimary_AST = null;
3361 Token lp = null;
3362 AST lp_AST = null;
3363 Token lbc = null;
3364 AST lbc_AST = null;
3365
3366 AST tmp139_AST = null;
3367 tmp139_AST = astFactory.create(LT(1));
3368 astFactory.addASTChild(currentAST, tmp139_AST);
3369 match(IDENT);
3370 {
3371 _loop196:
3372 do {
3373 if ((LA(1)==DOT) && (LA(2)==IDENT)) {
3374 AST tmp140_AST = null;
3375 tmp140_AST = astFactory.create(LT(1));
3376 astFactory.makeASTRoot(currentAST, tmp140_AST);
3377 match(DOT);
3378 AST tmp141_AST = null;
3379 tmp141_AST = astFactory.create(LT(1));
3380 astFactory.addASTChild(currentAST, tmp141_AST);
3381 match(IDENT);
3382 }
3383 else {
3384 break _loop196;
3385 }
3386
3387 } while (true);
3388 }
3389 {
3390 if ((LA(1)==LPAREN)) {
3391 {
3392 lp = LT(1);
3393 lp_AST = astFactory.create(lp);
3394 astFactory.makeASTRoot(currentAST, lp_AST);
3395 match(LPAREN);
3396 if ( inputState.guessing==0 ) {
3397 lp_AST.setType(METHOD_CALL);
3398 }
3399 argList();
3400 astFactory.addASTChild(currentAST, returnAST);
3401 match(RPAREN);
3402 }
3403 }
3404 else if ((LA(1)==LBRACK) && (LA(2)==RBRACK)) {
3405 {
3406 int _cnt200=0;
3407 _loop200:
3408 do {
3409 if ((LA(1)==LBRACK) && (LA(2)==RBRACK)) {
3410 lbc = LT(1);
3411 lbc_AST = astFactory.create(lbc);
3412 astFactory.makeASTRoot(currentAST, lbc_AST);
3413 match(LBRACK);
3414 if ( inputState.guessing==0 ) {
3415 lbc_AST.setType(ARRAY_DECLARATOR);
3416 }
3417 match(RBRACK);
3418 }
3419 else {
3420 if ( _cnt200>=1 ) { break _loop200; } else {throw new NoViableAltException(LT(1), getFilename());}
3421 }
3422
3423 _cnt200++;
3424 } while (true);
3425 }
3426 }
3427 else if ((_tokenSet_25.member(LA(1))) && (_tokenSet_26.member(LA(2)))) {
3428 }
3429 else {
3430 throw new NoViableAltException(LT(1), getFilename());
3431 }
3432
3433 }
3434 identPrimary_AST = (AST)currentAST.root;
3435 returnAST = identPrimary_AST;
3436 }
3437
3438 public final void assignmentExpression() throws RecognitionException, TokenStreamException {
3439
3440 returnAST = null;
3441 ASTPair currentAST = new ASTPair();
3442 AST assignmentExpression_AST = null;
3443
3445 astFactory.addASTChild(currentAST, returnAST);
3446 {
3447 switch ( LA(1)) {
3448 case ASSIGN:
3449 case PLUS_ASSIGN:
3450 case MINUS_ASSIGN:
3451 case STAR_ASSIGN:
3452 case DIV_ASSIGN:
3453 case MOD_ASSIGN:
3454 case SR_ASSIGN:
3455 case BSR_ASSIGN:
3456 case SL_ASSIGN:
3457 case BAND_ASSIGN:
3458 case BXOR_ASSIGN:
3459 case BOR_ASSIGN:
3460 {
3461 {
3462 switch ( LA(1)) {
3463 case ASSIGN:
3464 {
3465 AST tmp144_AST = null;
3466 tmp144_AST = astFactory.create(LT(1));
3467 astFactory.makeASTRoot(currentAST, tmp144_AST);
3468 match(ASSIGN);
3469 break;
3470 }
3471 case PLUS_ASSIGN:
3472 {
3473 AST tmp145_AST = null;
3474 tmp145_AST = astFactory.create(LT(1));
3475 astFactory.makeASTRoot(currentAST, tmp145_AST);
3476 match(PLUS_ASSIGN);
3477 break;
3478 }
3479 case MINUS_ASSIGN:
3480 {
3481 AST tmp146_AST = null;
3482 tmp146_AST = astFactory.create(LT(1));
3483 astFactory.makeASTRoot(currentAST, tmp146_AST);
3484 match(MINUS_ASSIGN);
3485 break;
3486 }
3487 case STAR_ASSIGN:
3488 {
3489 AST tmp147_AST = null;
3490 tmp147_AST = astFactory.create(LT(1));
3491 astFactory.makeASTRoot(currentAST, tmp147_AST);
3492 match(STAR_ASSIGN);
3493 break;
3494 }
3495 case DIV_ASSIGN:
3496 {
3497 AST tmp148_AST = null;
3498 tmp148_AST = astFactory.create(LT(1));
3499 astFactory.makeASTRoot(currentAST, tmp148_AST);
3500 match(DIV_ASSIGN);
3501 break;
3502 }
3503 case MOD_ASSIGN:
3504 {
3505 AST tmp149_AST = null;
3506 tmp149_AST = astFactory.create(LT(1));
3507 astFactory.makeASTRoot(currentAST, tmp149_AST);
3508 match(MOD_ASSIGN);
3509 break;
3510 }
3511 case SR_ASSIGN:
3512 {
3513 AST tmp150_AST = null;
3514 tmp150_AST = astFactory.create(LT(1));
3515 astFactory.makeASTRoot(currentAST, tmp150_AST);
3516 match(SR_ASSIGN);
3517 break;
3518 }
3519 case BSR_ASSIGN:
3520 {
3521 AST tmp151_AST = null;
3522 tmp151_AST = astFactory.create(LT(1));
3523 astFactory.makeASTRoot(currentAST, tmp151_AST);
3524 match(BSR_ASSIGN);
3525 break;
3526 }
3527 case SL_ASSIGN:
3528 {
3529 AST tmp152_AST = null;
3530 tmp152_AST = astFactory.create(LT(1));
3531 astFactory.makeASTRoot(currentAST, tmp152_AST);
3532 match(SL_ASSIGN);
3533 break;
3534 }
3535 case BAND_ASSIGN:
3536 {
3537 AST tmp153_AST = null;
3538 tmp153_AST = astFactory.create(LT(1));
3539 astFactory.makeASTRoot(currentAST, tmp153_AST);
3540 match(BAND_ASSIGN);
3541 break;
3542 }
3543 case BXOR_ASSIGN:
3544 {
3545 AST tmp154_AST = null;
3546 tmp154_AST = astFactory.create(LT(1));
3547 astFactory.makeASTRoot(currentAST, tmp154_AST);
3548 match(BXOR_ASSIGN);
3549 break;
3550 }
3551 case BOR_ASSIGN:
3552 {
3553 AST tmp155_AST = null;
3554 tmp155_AST = astFactory.create(LT(1));
3555 astFactory.makeASTRoot(currentAST, tmp155_AST);
3556 match(BOR_ASSIGN);
3557 break;
3558 }
3559 default:
3560 {
3561 throw new NoViableAltException(LT(1), getFilename());
3562 }
3563 }
3564 }
3566 astFactory.addASTChild(currentAST, returnAST);
3567 break;
3568 }
3569 case SEMI:
3570 case RBRACK:
3571 case RCURLY:
3572 case COMMA:
3573 case RPAREN:
3574 case COLON:
3575 {
3576 break;
3577 }
3578 default:
3579 {
3580 throw new NoViableAltException(LT(1), getFilename());
3581 }
3582 }
3583 }
3584 assignmentExpression_AST = (AST)currentAST.root;
3585 returnAST = assignmentExpression_AST;
3586 }
3587
3588 public final void conditionalExpression() throws RecognitionException, TokenStreamException {
3589
3590 returnAST = null;
3591 ASTPair currentAST = new ASTPair();
3592 AST conditionalExpression_AST = null;
3593
3595 astFactory.addASTChild(currentAST, returnAST);
3596 {
3597 switch ( LA(1)) {
3598 case QUESTION:
3599 {
3600 AST tmp156_AST = null;
3601 tmp156_AST = astFactory.create(LT(1));
3602 astFactory.makeASTRoot(currentAST, tmp156_AST);
3603 match(QUESTION);
3605 astFactory.addASTChild(currentAST, returnAST);
3606 match(COLON);
3608 astFactory.addASTChild(currentAST, returnAST);
3609 break;
3610 }
3611 case SEMI:
3612 case RBRACK:
3613 case RCURLY:
3614 case COMMA:
3615 case RPAREN:
3616 case ASSIGN:
3617 case COLON:
3618 case PLUS_ASSIGN:
3619 case MINUS_ASSIGN:
3620 case STAR_ASSIGN:
3621 case DIV_ASSIGN:
3622 case MOD_ASSIGN:
3623 case SR_ASSIGN:
3624 case BSR_ASSIGN:
3625 case SL_ASSIGN:
3626 case BAND_ASSIGN:
3627 case BXOR_ASSIGN:
3628 case BOR_ASSIGN:
3629 {
3630 break;
3631 }
3632 default:
3633 {
3634 throw new NoViableAltException(LT(1), getFilename());
3635 }
3636 }
3637 }
3638 conditionalExpression_AST = (AST)currentAST.root;
3639 returnAST = conditionalExpression_AST;
3640 }
3641
3642 public final void logicalOrExpression() throws RecognitionException, TokenStreamException {
3643
3644 returnAST = null;
3645 ASTPair currentAST = new ASTPair();
3646 AST logicalOrExpression_AST = null;
3647
3649 astFactory.addASTChild(currentAST, returnAST);
3650 {
3651 _loop143:
3652 do {
3653 if ((LA(1)==LOR)) {
3654 AST tmp158_AST = null;
3655 tmp158_AST = astFactory.create(LT(1));
3656 astFactory.makeASTRoot(currentAST, tmp158_AST);
3657 match(LOR);
3659 astFactory.addASTChild(currentAST, returnAST);
3660 }
3661 else {
3662 break _loop143;
3663 }
3664
3665 } while (true);
3666 }
3667 logicalOrExpression_AST = (AST)currentAST.root;
3668 returnAST = logicalOrExpression_AST;
3669 }
3670
3671 public final void logicalAndExpression() throws RecognitionException, TokenStreamException {
3672
3673 returnAST = null;
3674 ASTPair currentAST = new ASTPair();
3675 AST logicalAndExpression_AST = null;
3676
3678 astFactory.addASTChild(currentAST, returnAST);
3679 {
3680 _loop146:
3681 do {
3682 if ((LA(1)==LAND)) {
3683 AST tmp159_AST = null;
3684 tmp159_AST = astFactory.create(LT(1));
3685 astFactory.makeASTRoot(currentAST, tmp159_AST);
3686 match(LAND);
3688 astFactory.addASTChild(currentAST, returnAST);
3689 }
3690 else {
3691 break _loop146;
3692 }
3693
3694 } while (true);
3695 }
3696 logicalAndExpression_AST = (AST)currentAST.root;
3697 returnAST = logicalAndExpression_AST;
3698 }
3699
3700 public final void inclusiveOrExpression() throws RecognitionException, TokenStreamException {
3701
3702 returnAST = null;
3703 ASTPair currentAST = new ASTPair();
3704 AST inclusiveOrExpression_AST = null;
3705
3707 astFactory.addASTChild(currentAST, returnAST);
3708 {
3709 _loop149:
3710 do {
3711 if ((LA(1)==BOR)) {
3712 AST tmp160_AST = null;
3713 tmp160_AST = astFactory.create(LT(1));
3714 astFactory.makeASTRoot(currentAST, tmp160_AST);
3715 match(BOR);
3717 astFactory.addASTChild(currentAST, returnAST);
3718 }
3719 else {
3720 break _loop149;
3721 }
3722
3723 } while (true);
3724 }
3725 inclusiveOrExpression_AST = (AST)currentAST.root;
3726 returnAST = inclusiveOrExpression_AST;
3727 }
3728
3729 public final void exclusiveOrExpression() throws RecognitionException, TokenStreamException {
3730
3731 returnAST = null;
3732 ASTPair currentAST = new ASTPair();
3733 AST exclusiveOrExpression_AST = null;
3734
3735 andExpression();
3736 astFactory.addASTChild(currentAST, returnAST);
3737 {
3738 _loop152:
3739 do {
3740 if ((LA(1)==BXOR)) {
3741 AST tmp161_AST = null;
3742 tmp161_AST = astFactory.create(LT(1));
3743 astFactory.makeASTRoot(currentAST, tmp161_AST);
3744 match(BXOR);
3745 andExpression();
3746 astFactory.addASTChild(currentAST, returnAST);
3747 }
3748 else {
3749 break _loop152;
3750 }
3751
3752 } while (true);
3753 }
3754 exclusiveOrExpression_AST = (AST)currentAST.root;
3755 returnAST = exclusiveOrExpression_AST;
3756 }
3757
3758 public final void andExpression() throws RecognitionException, TokenStreamException {
3759
3760 returnAST = null;
3761 ASTPair currentAST = new ASTPair();
3762 AST andExpression_AST = null;
3763
3765 astFactory.addASTChild(currentAST, returnAST);
3766 {
3767 _loop155:
3768 do {
3769 if ((LA(1)==BAND)) {
3770 AST tmp162_AST = null;
3771 tmp162_AST = astFactory.create(LT(1));
3772 astFactory.makeASTRoot(currentAST, tmp162_AST);
3773 match(BAND);
3775 astFactory.addASTChild(currentAST, returnAST);
3776 }
3777 else {
3778 break _loop155;
3779 }
3780
3781 } while (true);
3782 }
3783 andExpression_AST = (AST)currentAST.root;
3784 returnAST = andExpression_AST;
3785 }
3786
3787 public final void equalityExpression() throws RecognitionException, TokenStreamException {
3788
3789 returnAST = null;
3790 ASTPair currentAST = new ASTPair();
3791 AST equalityExpression_AST = null;
3792
3794 astFactory.addASTChild(currentAST, returnAST);
3795 {
3796 _loop159:
3797 do {
3798 if ((LA(1)==NOT_EQUAL||LA(1)==EQUAL)) {
3799 {
3800 switch ( LA(1)) {
3801 case NOT_EQUAL:
3802 {
3803 AST tmp163_AST = null;
3804 tmp163_AST = astFactory.create(LT(1));
3805 astFactory.makeASTRoot(currentAST, tmp163_AST);
3806 match(NOT_EQUAL);
3807 break;
3808 }
3809 case EQUAL:
3810 {
3811 AST tmp164_AST = null;
3812 tmp164_AST = astFactory.create(LT(1));
3813 astFactory.makeASTRoot(currentAST, tmp164_AST);
3814 match(EQUAL);
3815 break;
3816 }
3817 default:
3818 {
3819 throw new NoViableAltException(LT(1), getFilename());
3820 }
3821 }
3822 }
3824 astFactory.addASTChild(currentAST, returnAST);
3825 }
3826 else {
3827 break _loop159;
3828 }
3829
3830 } while (true);
3831 }
3832 equalityExpression_AST = (AST)currentAST.root;
3833 returnAST = equalityExpression_AST;
3834 }
3835
3836 public final void relationalExpression() throws RecognitionException, TokenStreamException {
3837
3838 returnAST = null;
3839 ASTPair currentAST = new ASTPair();
3840 AST relationalExpression_AST = null;
3841
3843 astFactory.addASTChild(currentAST, returnAST);
3844 {
3845 switch ( LA(1)) {
3846 case SEMI:
3847 case LT:
3848 case QUESTION:
3849 case BAND:
3850 case GT:
3851 case RBRACK:
3852 case RCURLY:
3853 case COMMA:
3854 case RPAREN:
3855 case ASSIGN:
3856 case COLON:
3857 case PLUS_ASSIGN:
3858 case MINUS_ASSIGN:
3859 case STAR_ASSIGN:
3860 case DIV_ASSIGN:
3861 case MOD_ASSIGN:
3862 case SR_ASSIGN:
3863 case BSR_ASSIGN:
3864 case SL_ASSIGN:
3865 case BAND_ASSIGN:
3866 case BXOR_ASSIGN:
3867 case BOR_ASSIGN:
3868 case LOR:
3869 case LAND:
3870 case BOR:
3871 case BXOR:
3872 case NOT_EQUAL:
3873 case EQUAL:
3874 case LE:
3875 case GE:
3876 {
3877 {
3878 _loop164:
3879 do {
3880 if ((_tokenSet_27.member(LA(1)))) {
3881 {
3882 switch ( LA(1)) {
3883 case LT:
3884 {
3885 AST tmp165_AST = null;
3886 tmp165_AST = astFactory.create(LT(1));
3887 astFactory.makeASTRoot(currentAST, tmp165_AST);
3888 match(LT);
3889 break;
3890 }
3891 case GT:
3892 {
3893 AST tmp166_AST = null;
3894 tmp166_AST = astFactory.create(LT(1));
3895 astFactory.makeASTRoot(currentAST, tmp166_AST);
3896 match(GT);
3897 break;
3898 }
3899 case LE:
3900 {
3901 AST tmp167_AST = null;
3902 tmp167_AST = astFactory.create(LT(1));
3903 astFactory.makeASTRoot(currentAST, tmp167_AST);
3904 match(LE);
3905 break;
3906 }
3907 case GE:
3908 {
3909 AST tmp168_AST = null;
3910 tmp168_AST = astFactory.create(LT(1));
3911 astFactory.makeASTRoot(currentAST, tmp168_AST);
3912 match(GE);
3913 break;
3914 }
3915 default:
3916 {
3917 throw new NoViableAltException(LT(1), getFilename());
3918 }
3919 }
3920 }
3922 astFactory.addASTChild(currentAST, returnAST);
3923 }
3924 else {
3925 break _loop164;
3926 }
3927
3928 } while (true);
3929 }
3930 break;
3931 }
3932 case LITERAL_instanceof:
3933 {
3934 AST tmp169_AST = null;
3935 tmp169_AST = astFactory.create(LT(1));
3936 astFactory.makeASTRoot(currentAST, tmp169_AST);
3937 match(LITERAL_instanceof);
3938 typeSpec(true);
3939 astFactory.addASTChild(currentAST, returnAST);
3940 break;
3941 }
3942 default:
3943 {
3944 throw new NoViableAltException(LT(1), getFilename());
3945 }
3946 }
3947 }
3948 relationalExpression_AST = (AST)currentAST.root;
3949 returnAST = relationalExpression_AST;
3950 }
3951
3952 public final void shiftExpression() throws RecognitionException, TokenStreamException {
3953
3954 returnAST = null;
3955 ASTPair currentAST = new ASTPair();
3956 AST shiftExpression_AST = null;
3957
3959 astFactory.addASTChild(currentAST, returnAST);
3960 {
3961 _loop168:
3962 do {
3963 if (((LA(1) >= SL && LA(1) <= BSR))) {
3964 {
3965 switch ( LA(1)) {
3966 case SL:
3967 {
3968 AST tmp170_AST = null;
3969 tmp170_AST = astFactory.create(LT(1));
3970 astFactory.makeASTRoot(currentAST, tmp170_AST);
3971 match(SL);
3972 break;
3973 }
3974 case SR:
3975 {
3976 AST tmp171_AST = null;
3977 tmp171_AST = astFactory.create(LT(1));
3978 astFactory.makeASTRoot(currentAST, tmp171_AST);
3979 match(SR);
3980 break;
3981 }
3982 case BSR:
3983 {
3984 AST tmp172_AST = null;
3985 tmp172_AST = astFactory.create(LT(1));
3986 astFactory.makeASTRoot(currentAST, tmp172_AST);
3987 match(BSR);
3988 break;
3989 }
3990 default:
3991 {
3992 throw new NoViableAltException(LT(1), getFilename());
3993 }
3994 }
3995 }
3997 astFactory.addASTChild(currentAST, returnAST);
3998 }
3999 else {
4000 break _loop168;
4001 }
4002
4003 } while (true);
4004 }
4005 shiftExpression_AST = (AST)currentAST.root;
4006 returnAST = shiftExpression_AST;
4007 }
4008
4009 public final void additiveExpression() throws RecognitionException, TokenStreamException {
4010
4011 returnAST = null;
4012 ASTPair currentAST = new ASTPair();
4013 AST additiveExpression_AST = null;
4014
4016 astFactory.addASTChild(currentAST, returnAST);
4017 {
4018 _loop172:
4019 do {
4020 if ((LA(1)==PLUS||LA(1)==MINUS)) {
4021 {
4022 switch ( LA(1)) {
4023 case PLUS:
4024 {
4025 AST tmp173_AST = null;
4026 tmp173_AST = astFactory.create(LT(1));
4027 astFactory.makeASTRoot(currentAST, tmp173_AST);
4028 match(PLUS);
4029 break;
4030 }
4031 case MINUS:
4032 {
4033 AST tmp174_AST = null;
4034 tmp174_AST = astFactory.create(LT(1));
4035 astFactory.makeASTRoot(currentAST, tmp174_AST);
4036 match(MINUS);
4037 break;
4038 }
4039 default:
4040 {
4041 throw new NoViableAltException(LT(1), getFilename());
4042 }
4043 }
4044 }
4046 astFactory.addASTChild(currentAST, returnAST);
4047 }
4048 else {
4049 break _loop172;
4050 }
4051
4052 } while (true);
4053 }
4054 additiveExpression_AST = (AST)currentAST.root;
4055 returnAST = additiveExpression_AST;
4056 }
4057
4058 public final void multiplicativeExpression() throws RecognitionException, TokenStreamException {
4059
4060 returnAST = null;
4061 ASTPair currentAST = new ASTPair();
4062 AST multiplicativeExpression_AST = null;
4063
4065 astFactory.addASTChild(currentAST, returnAST);
4066 {
4067 _loop176:
4068 do {
4069 if ((_tokenSet_28.member(LA(1)))) {
4070 {
4071 switch ( LA(1)) {
4072 case STAR:
4073 {
4074 AST tmp175_AST = null;
4075 tmp175_AST = astFactory.create(LT(1));
4076 astFactory.makeASTRoot(currentAST, tmp175_AST);
4077 match(STAR);
4078 break;
4079 }
4080 case DIV:
4081 {
4082 AST tmp176_AST = null;
4083 tmp176_AST = astFactory.create(LT(1));
4084 astFactory.makeASTRoot(currentAST, tmp176_AST);
4085 match(DIV);
4086 break;
4087 }
4088 case MOD:
4089 {
4090 AST tmp177_AST = null;
4091 tmp177_AST = astFactory.create(LT(1));
4092 astFactory.makeASTRoot(currentAST, tmp177_AST);
4093 match(MOD);
4094 break;
4095 }
4096 default:
4097 {
4098 throw new NoViableAltException(LT(1), getFilename());
4099 }
4100 }
4101 }
4103 astFactory.addASTChild(currentAST, returnAST);
4104 }
4105 else {
4106 break _loop176;
4107 }
4108
4109 } while (true);
4110 }
4111 multiplicativeExpression_AST = (AST)currentAST.root;
4112 returnAST = multiplicativeExpression_AST;
4113 }
4114
4115 public final void unaryExpression() throws RecognitionException, TokenStreamException {
4116
4117 returnAST = null;
4118 ASTPair currentAST = new ASTPair();
4119 AST unaryExpression_AST = null;
4120
4121 switch ( LA(1)) {
4122 case INC:
4123 {
4124 AST tmp178_AST = null;
4125 tmp178_AST = astFactory.create(LT(1));
4126 astFactory.makeASTRoot(currentAST, tmp178_AST);
4127 match(INC);
4129 astFactory.addASTChild(currentAST, returnAST);
4130 unaryExpression_AST = (AST)currentAST.root;
4131 break;
4132 }
4133 case DEC:
4134 {
4135 AST tmp179_AST = null;
4136 tmp179_AST = astFactory.create(LT(1));
4137 astFactory.makeASTRoot(currentAST, tmp179_AST);
4138 match(DEC);
4140 astFactory.addASTChild(currentAST, returnAST);
4141 unaryExpression_AST = (AST)currentAST.root;
4142 break;
4143 }
4144 case MINUS:
4145 {
4146 AST tmp180_AST = null;
4147 tmp180_AST = astFactory.create(LT(1));
4148 astFactory.makeASTRoot(currentAST, tmp180_AST);
4149 match(MINUS);
4150 if ( inputState.guessing==0 ) {
4151 tmp180_AST.setType(UNARY_MINUS);
4152 }
4154 astFactory.addASTChild(currentAST, returnAST);
4155 unaryExpression_AST = (AST)currentAST.root;
4156 break;
4157 }
4158 case PLUS:
4159 {
4160 AST tmp181_AST = null;
4161 tmp181_AST = astFactory.create(LT(1));
4162 astFactory.makeASTRoot(currentAST, tmp181_AST);
4163 match(PLUS);
4164 if ( inputState.guessing==0 ) {
4165 tmp181_AST.setType(UNARY_PLUS);
4166 }
4168 astFactory.addASTChild(currentAST, returnAST);
4169 unaryExpression_AST = (AST)currentAST.root;
4170 break;
4171 }
4172 case LITERAL_void:
4173 case LITERAL_boolean:
4174 case LITERAL_byte:
4175 case LITERAL_char:
4176 case LITERAL_short:
4177 case LITERAL_int:
4178 case LITERAL_float:
4179 case LITERAL_long:
4180 case LITERAL_double:
4181 case IDENT:
4182 case LPAREN:
4183 case LITERAL_this:
4184 case LITERAL_super:
4185 case BNOT:
4186 case LNOT:
4187 case LITERAL_true:
4188 case LITERAL_false:
4189 case LITERAL_null:
4190 case LITERAL_new:
4191 case NUM_INT:
4192 case CHAR_LITERAL:
4193 case STRING_LITERAL:
4194 case NUM_FLOAT:
4195 case NUM_LONG:
4196 case NUM_DOUBLE:
4197 {
4199 astFactory.addASTChild(currentAST, returnAST);
4200 unaryExpression_AST = (AST)currentAST.root;
4201 break;
4202 }
4203 default:
4204 {
4205 throw new NoViableAltException(LT(1), getFilename());
4206 }
4207 }
4208 returnAST = unaryExpression_AST;
4209 }
4210
4211 public final void unaryExpressionNotPlusMinus() throws RecognitionException, TokenStreamException {
4212
4213 returnAST = null;
4214 ASTPair currentAST = new ASTPair();
4215 AST unaryExpressionNotPlusMinus_AST = null;
4216 Token lpb = null;
4217 AST lpb_AST = null;
4218 Token lp = null;
4219 AST lp_AST = null;
4220
4221 switch ( LA(1)) {
4222 case BNOT:
4223 {
4224 AST tmp182_AST = null;
4225 tmp182_AST = astFactory.create(LT(1));
4226 astFactory.makeASTRoot(currentAST, tmp182_AST);
4227 match(BNOT);
4229 astFactory.addASTChild(currentAST, returnAST);
4230 unaryExpressionNotPlusMinus_AST = (AST)currentAST.root;
4231 break;
4232 }
4233 case LNOT:
4234 {
4235 AST tmp183_AST = null;
4236 tmp183_AST = astFactory.create(LT(1));
4237 astFactory.makeASTRoot(currentAST, tmp183_AST);
4238 match(LNOT);
4240 astFactory.addASTChild(currentAST, returnAST);
4241 unaryExpressionNotPlusMinus_AST = (AST)currentAST.root;
4242 break;
4243 }
4244 default:
4245 boolean synPredMatched180 = false;
4246 if (((LA(1)==LPAREN) && ((LA(2) >= LITERAL_void && LA(2) <= LITERAL_double)))) {
4247 int _m180 = mark();
4248 synPredMatched180 = true;
4249 inputState.guessing++;
4250 try {
4251 {
4252 match(LPAREN);
4253 builtInTypeSpec(true);
4254 match(RPAREN);
4255 }
4256 }
4257 catch (RecognitionException pe) {
4258 synPredMatched180 = false;
4259 }
4260 rewind(_m180);
4261inputState.guessing--;
4262 }
4263 if ( synPredMatched180 ) {
4264 lpb = LT(1);
4265 lpb_AST = astFactory.create(lpb);
4266 astFactory.makeASTRoot(currentAST, lpb_AST);
4267 match(LPAREN);
4268 if ( inputState.guessing==0 ) {
4269 lpb_AST.setType(TYPECAST);
4270 }
4271 builtInTypeSpec(true);
4272 astFactory.addASTChild(currentAST, returnAST);
4273 match(RPAREN);
4275 astFactory.addASTChild(currentAST, returnAST);
4276 unaryExpressionNotPlusMinus_AST = (AST)currentAST.root;
4277 }
4278 else {
4279 boolean synPredMatched182 = false;
4280 if (((LA(1)==LPAREN) && (LA(2)==IDENT))) {
4281 int _m182 = mark();
4282 synPredMatched182 = true;
4283 inputState.guessing++;
4284 try {
4285 {
4286 match(LPAREN);
4287 classTypeSpec(true);
4288 match(RPAREN);
4290 }
4291 }
4292 catch (RecognitionException pe) {
4293 synPredMatched182 = false;
4294 }
4295 rewind(_m182);
4296inputState.guessing--;
4297 }
4298 if ( synPredMatched182 ) {
4299 lp = LT(1);
4300 lp_AST = astFactory.create(lp);
4301 astFactory.makeASTRoot(currentAST, lp_AST);
4302 match(LPAREN);
4303 if ( inputState.guessing==0 ) {
4304 lp_AST.setType(TYPECAST);
4305 }
4306 classTypeSpec(true);
4307 astFactory.addASTChild(currentAST, returnAST);
4308 match(RPAREN);
4310 astFactory.addASTChild(currentAST, returnAST);
4311 unaryExpressionNotPlusMinus_AST = (AST)currentAST.root;
4312 }
4313 else if ((_tokenSet_22.member(LA(1))) && (_tokenSet_29.member(LA(2)))) {
4315 astFactory.addASTChild(currentAST, returnAST);
4316 unaryExpressionNotPlusMinus_AST = (AST)currentAST.root;
4317 }
4318 else {
4319 throw new NoViableAltException(LT(1), getFilename());
4320 }
4321 }}
4322 returnAST = unaryExpressionNotPlusMinus_AST;
4323 }
4324
4325 public final void postfixExpression() throws RecognitionException, TokenStreamException {
4326
4327 returnAST = null;
4328 ASTPair currentAST = new ASTPair();
4329 AST postfixExpression_AST = null;
4330 Token lp = null;
4331 AST lp_AST = null;
4332 Token lp3 = null;
4333 AST lp3_AST = null;
4334 Token lps = null;
4335 AST lps_AST = null;
4336 Token lb = null;
4337 AST lb_AST = null;
4338 Token in = null;
4339 AST in_AST = null;
4340 Token de = null;
4341 AST de_AST = null;
4342
4344 astFactory.addASTChild(currentAST, returnAST);
4345 {
4346 _loop188:
4347 do {
4348 if ((LA(1)==DOT) && (LA(2)==IDENT)) {
4349 AST tmp186_AST = null;
4350 tmp186_AST = astFactory.create(LT(1));
4351 astFactory.makeASTRoot(currentAST, tmp186_AST);
4352 match(DOT);
4353 AST tmp187_AST = null;
4354 tmp187_AST = astFactory.create(LT(1));
4355 astFactory.addASTChild(currentAST, tmp187_AST);
4356 match(IDENT);
4357 {
4358 switch ( LA(1)) {
4359 case LPAREN:
4360 {
4361 lp = LT(1);
4362 lp_AST = astFactory.create(lp);
4363 astFactory.makeASTRoot(currentAST, lp_AST);
4364 match(LPAREN);
4365 if ( inputState.guessing==0 ) {
4366 lp_AST.setType(METHOD_CALL);
4367 }
4368 argList();
4369 astFactory.addASTChild(currentAST, returnAST);
4370 match(RPAREN);
4371 break;
4372 }
4373 case SEMI:
4374 case LT:
4375 case QUESTION:
4376 case BAND:
4377 case GT:
4378 case LBRACK:
4379 case RBRACK:
4380 case DOT:
4381 case STAR:
4382 case RCURLY:
4383 case COMMA:
4384 case RPAREN:
4385 case ASSIGN:
4386 case COLON:
4387 case PLUS_ASSIGN:
4388 case MINUS_ASSIGN:
4389 case STAR_ASSIGN:
4390 case DIV_ASSIGN:
4391 case MOD_ASSIGN:
4392 case SR_ASSIGN:
4393 case BSR_ASSIGN:
4394 case SL_ASSIGN:
4395 case BAND_ASSIGN:
4396 case BXOR_ASSIGN:
4397 case BOR_ASSIGN:
4398 case LOR:
4399 case LAND:
4400 case BOR:
4401 case BXOR:
4402 case NOT_EQUAL:
4403 case EQUAL:
4404 case LE:
4405 case GE:
4406 case LITERAL_instanceof:
4407 case SL:
4408 case SR:
4409 case BSR:
4410 case PLUS:
4411 case MINUS:
4412 case DIV:
4413 case MOD:
4414 case INC:
4415 case DEC:
4416 {
4417 break;
4418 }
4419 default:
4420 {
4421 throw new NoViableAltException(LT(1), getFilename());
4422 }
4423 }
4424 }
4425 }
4426 else if ((LA(1)==DOT) && (LA(2)==LITERAL_this)) {
4427 AST tmp189_AST = null;
4428 tmp189_AST = astFactory.create(LT(1));
4429 astFactory.makeASTRoot(currentAST, tmp189_AST);
4430 match(DOT);
4431 AST tmp190_AST = null;
4432 tmp190_AST = astFactory.create(LT(1));
4433 astFactory.addASTChild(currentAST, tmp190_AST);
4434 match(LITERAL_this);
4435 }
4436 else if ((LA(1)==DOT) && (LA(2)==LITERAL_super)) {
4437 AST tmp191_AST = null;
4438 tmp191_AST = astFactory.create(LT(1));
4439 astFactory.makeASTRoot(currentAST, tmp191_AST);
4440 match(DOT);
4441 AST tmp192_AST = null;
4442 tmp192_AST = astFactory.create(LT(1));
4443 astFactory.addASTChild(currentAST, tmp192_AST);
4444 match(LITERAL_super);
4445 {
4446 switch ( LA(1)) {
4447 case LPAREN:
4448 {
4449 lp3 = LT(1);
4450 lp3_AST = astFactory.create(lp3);
4451 astFactory.makeASTRoot(currentAST, lp3_AST);
4452 match(LPAREN);
4453 argList();
4454 astFactory.addASTChild(currentAST, returnAST);
4455 match(RPAREN);
4456 if ( inputState.guessing==0 ) {
4457 lp3_AST.setType(SUPER_CTOR_CALL);
4458 }
4459 break;
4460 }
4461 case DOT:
4462 {
4463 AST tmp194_AST = null;
4464 tmp194_AST = astFactory.create(LT(1));
4465 astFactory.makeASTRoot(currentAST, tmp194_AST);
4466 match(DOT);
4467 AST tmp195_AST = null;
4468 tmp195_AST = astFactory.create(LT(1));
4469 astFactory.addASTChild(currentAST, tmp195_AST);
4470 match(IDENT);
4471 {
4472 switch ( LA(1)) {
4473 case LPAREN:
4474 {
4475 lps = LT(1);
4476 lps_AST = astFactory.create(lps);
4477 astFactory.makeASTRoot(currentAST, lps_AST);
4478 match(LPAREN);
4479 if ( inputState.guessing==0 ) {
4480 lps_AST.setType(METHOD_CALL);
4481 }
4482 argList();
4483 astFactory.addASTChild(currentAST, returnAST);
4484 match(RPAREN);
4485 break;
4486 }
4487 case SEMI:
4488 case LT:
4489 case QUESTION:
4490 case BAND:
4491 case GT:
4492 case LBRACK:
4493 case RBRACK:
4494 case DOT:
4495 case STAR:
4496 case RCURLY:
4497 case COMMA:
4498 case RPAREN:
4499 case ASSIGN:
4500 case COLON:
4501 case PLUS_ASSIGN:
4502 case MINUS_ASSIGN:
4503 case STAR_ASSIGN:
4504 case DIV_ASSIGN:
4505 case MOD_ASSIGN:
4506 case SR_ASSIGN:
4507 case BSR_ASSIGN:
4508 case SL_ASSIGN:
4509 case BAND_ASSIGN:
4510 case BXOR_ASSIGN:
4511 case BOR_ASSIGN:
4512 case LOR:
4513 case LAND:
4514 case BOR:
4515 case BXOR:
4516 case NOT_EQUAL:
4517 case EQUAL:
4518 case LE:
4519 case GE:
4520 case LITERAL_instanceof:
4521 case SL:
4522 case SR:
4523 case BSR:
4524 case PLUS:
4525 case MINUS:
4526 case DIV:
4527 case MOD:
4528 case INC:
4529 case DEC:
4530 {
4531 break;
4532 }
4533 default:
4534 {
4535 throw new NoViableAltException(LT(1), getFilename());
4536 }
4537 }
4538 }
4539 break;
4540 }
4541 default:
4542 {
4543 throw new NoViableAltException(LT(1), getFilename());
4544 }
4545 }
4546 }
4547 }
4548 else if ((LA(1)==DOT) && (LA(2)==LITERAL_new)) {
4549 AST tmp197_AST = null;
4550 tmp197_AST = astFactory.create(LT(1));
4551 astFactory.makeASTRoot(currentAST, tmp197_AST);
4552 match(DOT);
4553 newExpression();
4554 astFactory.addASTChild(currentAST, returnAST);
4555 }
4556 else if ((LA(1)==LBRACK)) {
4557 lb = LT(1);
4558 lb_AST = astFactory.create(lb);
4559 astFactory.makeASTRoot(currentAST, lb_AST);
4560 match(LBRACK);
4561 if ( inputState.guessing==0 ) {
4562 lb_AST.setType(INDEX_OP);
4563 }
4564 expression();
4565 astFactory.addASTChild(currentAST, returnAST);
4566 match(RBRACK);
4567 }
4568 else {
4569 break _loop188;
4570 }
4571
4572 } while (true);
4573 }
4574 {
4575 switch ( LA(1)) {
4576 case INC:
4577 {
4578 in = LT(1);
4579 in_AST = astFactory.create(in);
4580 astFactory.makeASTRoot(currentAST, in_AST);
4581 match(INC);
4582 if ( inputState.guessing==0 ) {
4583 in_AST.setType(POST_INC);
4584 }
4585 break;
4586 }
4587 case DEC:
4588 {
4589 de = LT(1);
4590 de_AST = astFactory.create(de);
4591 astFactory.makeASTRoot(currentAST, de_AST);
4592 match(DEC);
4593 if ( inputState.guessing==0 ) {
4594 de_AST.setType(POST_DEC);
4595 }
4596 break;
4597 }
4598 case SEMI:
4599 case LT:
4600 case QUESTION:
4601 case BAND:
4602 case GT:
4603 case RBRACK:
4604 case STAR:
4605 case RCURLY:
4606 case COMMA:
4607 case RPAREN:
4608 case ASSIGN:
4609 case COLON:
4610 case PLUS_ASSIGN:
4611 case MINUS_ASSIGN:
4612 case STAR_ASSIGN:
4613 case DIV_ASSIGN:
4614 case MOD_ASSIGN:
4615 case SR_ASSIGN:
4616 case BSR_ASSIGN:
4617 case SL_ASSIGN:
4618 case BAND_ASSIGN:
4619 case BXOR_ASSIGN:
4620 case BOR_ASSIGN:
4621 case LOR:
4622 case LAND:
4623 case BOR:
4624 case BXOR:
4625 case NOT_EQUAL:
4626 case EQUAL:
4627 case LE:
4628 case GE:
4629 case LITERAL_instanceof:
4630 case SL:
4631 case SR:
4632 case BSR:
4633 case PLUS:
4634 case MINUS:
4635 case DIV:
4636 case MOD:
4637 {
4638 break;
4639 }
4640 default:
4641 {
4642 throw new NoViableAltException(LT(1), getFilename());
4643 }
4644 }
4645 }
4646 postfixExpression_AST = (AST)currentAST.root;
4647 returnAST = postfixExpression_AST;
4648 }
4649
4650/** object instantiation.
4651 * Trees are built as illustrated by the following input/tree pairs:
4652 *
4653 * new T()
4654 *
4655 * new
4656 * |
4657 * T -- ELIST
4658 * |
4659 * arg1 -- arg2 -- .. -- argn
4660 *
4661 * new int[]
4662 *
4663 * new
4664 * |
4665 * int -- ARRAY_DECLARATOR
4666 *
4667 * new int[] {1,2}
4668 *
4669 * new
4670 * |
4671 * int -- ARRAY_DECLARATOR -- ARRAY_INIT
4672 * |
4673 * EXPR -- EXPR
4674 * | |
4675 * 1 2
4676 *
4677 * new int[3]
4678 * new
4679 * |
4680 * int -- ARRAY_DECLARATOR
4681 * |
4682 * EXPR
4683 * |
4684 * 3
4685 *
4686 * new int[1][2]
4687 *
4688 * new
4689 * |
4690 * int -- ARRAY_DECLARATOR
4691 * |
4692 * ARRAY_DECLARATOR -- EXPR
4693 * | |
4694 * EXPR 1
4695 * |
4696 * 2
4697 *
4698 */
4699 public final void newExpression() throws RecognitionException, TokenStreamException {
4700
4701 returnAST = null;
4702 ASTPair currentAST = new ASTPair();
4703 AST newExpression_AST = null;
4704
4705 AST tmp199_AST = null;
4706 tmp199_AST = astFactory.create(LT(1));
4707 astFactory.makeASTRoot(currentAST, tmp199_AST);
4708 match(LITERAL_new);
4709 type();
4710 astFactory.addASTChild(currentAST, returnAST);
4711 {
4712 switch ( LA(1)) {
4713 case LPAREN:
4714 {
4715 match(LPAREN);
4716 argList();
4717 astFactory.addASTChild(currentAST, returnAST);
4718 match(RPAREN);
4719 {
4720 switch ( LA(1)) {
4721 case LCURLY:
4722 {
4723 classBlock();
4724 astFactory.addASTChild(currentAST, returnAST);
4725 break;
4726 }
4727 case SEMI:
4728 case LT:
4729 case QUESTION:
4730 case BAND:
4731 case GT:
4732 case LBRACK:
4733 case RBRACK:
4734 case DOT:
4735 case STAR:
4736 case RCURLY:
4737 case COMMA:
4738 case RPAREN:
4739 case ASSIGN:
4740 case COLON:
4741 case PLUS_ASSIGN:
4742 case MINUS_ASSIGN:
4743 case STAR_ASSIGN:
4744 case DIV_ASSIGN:
4745 case MOD_ASSIGN:
4746 case SR_ASSIGN:
4747 case BSR_ASSIGN:
4748 case SL_ASSIGN:
4749 case BAND_ASSIGN:
4750 case BXOR_ASSIGN:
4751 case BOR_ASSIGN:
4752 case LOR:
4753 case LAND:
4754 case BOR:
4755 case BXOR:
4756 case NOT_EQUAL:
4757 case EQUAL:
4758 case LE:
4759 case GE:
4760 case LITERAL_instanceof:
4761 case SL:
4762 case SR:
4763 case BSR:
4764 case PLUS:
4765 case MINUS:
4766 case DIV:
4767 case MOD:
4768 case INC:
4769 case DEC:
4770 {
4771 break;
4772 }
4773 default:
4774 {
4775 throw new NoViableAltException(LT(1), getFilename());
4776 }
4777 }
4778 }
4779 break;
4780 }
4781 case LBRACK:
4782 {
4784 astFactory.addASTChild(currentAST, returnAST);
4785 {
4786 switch ( LA(1)) {
4787 case LCURLY:
4788 {
4790 astFactory.addASTChild(currentAST, returnAST);
4791 break;
4792 }
4793 case SEMI:
4794 case LT:
4795 case QUESTION:
4796 case BAND:
4797 case GT:
4798 case LBRACK:
4799 case RBRACK:
4800 case DOT:
4801 case STAR:
4802 case RCURLY:
4803 case COMMA:
4804 case RPAREN:
4805 case ASSIGN:
4806 case COLON:
4807 case PLUS_ASSIGN:
4808 case MINUS_ASSIGN:
4809 case STAR_ASSIGN:
4810 case DIV_ASSIGN:
4811 case MOD_ASSIGN:
4812 case SR_ASSIGN:
4813 case BSR_ASSIGN:
4814 case SL_ASSIGN:
4815 case BAND_ASSIGN:
4816 case BXOR_ASSIGN:
4817 case BOR_ASSIGN:
4818 case LOR:
4819 case LAND:
4820 case BOR:
4821 case BXOR:
4822 case NOT_EQUAL:
4823 case EQUAL:
4824 case LE:
4825 case GE:
4826 case LITERAL_instanceof:
4827 case SL:
4828 case SR:
4829 case BSR:
4830 case PLUS:
4831 case MINUS:
4832 case DIV:
4833 case MOD:
4834 case INC:
4835 case DEC:
4836 {
4837 break;
4838 }
4839 default:
4840 {
4841 throw new NoViableAltException(LT(1), getFilename());
4842 }
4843 }
4844 }
4845 break;
4846 }
4847 default:
4848 {
4849 throw new NoViableAltException(LT(1), getFilename());
4850 }
4851 }
4852 }
4853 newExpression_AST = (AST)currentAST.root;
4854 returnAST = newExpression_AST;
4855 }
4856
4857 public final void constant() throws RecognitionException, TokenStreamException {
4858
4859 returnAST = null;
4860 ASTPair currentAST = new ASTPair();
4861 AST constant_AST = null;
4862
4863 switch ( LA(1)) {
4864 case NUM_INT:
4865 {
4866 AST tmp202_AST = null;
4867 tmp202_AST = astFactory.create(LT(1));
4868 astFactory.addASTChild(currentAST, tmp202_AST);
4869 match(NUM_INT);
4870 constant_AST = (AST)currentAST.root;
4871 break;
4872 }
4873 case CHAR_LITERAL:
4874 {
4875 AST tmp203_AST = null;
4876 tmp203_AST = astFactory.create(LT(1));
4877 astFactory.addASTChild(currentAST, tmp203_AST);
4878 match(CHAR_LITERAL);
4879 constant_AST = (AST)currentAST.root;
4880 break;
4881 }
4882 case STRING_LITERAL:
4883 {
4884 AST tmp204_AST = null;
4885 tmp204_AST = astFactory.create(LT(1));
4886 astFactory.addASTChild(currentAST, tmp204_AST);
4887 match(STRING_LITERAL);
4888 constant_AST = (AST)currentAST.root;
4889 break;
4890 }
4891 case NUM_FLOAT:
4892 {
4893 AST tmp205_AST = null;
4894 tmp205_AST = astFactory.create(LT(1));
4895 astFactory.addASTChild(currentAST, tmp205_AST);
4896 match(NUM_FLOAT);
4897 constant_AST = (AST)currentAST.root;
4898 break;
4899 }
4900 case NUM_LONG:
4901 {
4902 AST tmp206_AST = null;
4903 tmp206_AST = astFactory.create(LT(1));
4904 astFactory.addASTChild(currentAST, tmp206_AST);
4905 match(NUM_LONG);
4906 constant_AST = (AST)currentAST.root;
4907 break;
4908 }
4909 case NUM_DOUBLE:
4910 {
4911 AST tmp207_AST = null;
4912 tmp207_AST = astFactory.create(LT(1));
4913 astFactory.addASTChild(currentAST, tmp207_AST);
4914 match(NUM_DOUBLE);
4915 constant_AST = (AST)currentAST.root;
4916 break;
4917 }
4918 default:
4919 {
4920 throw new NoViableAltException(LT(1), getFilename());
4921 }
4922 }
4923 returnAST = constant_AST;
4924 }
4925
4926 public final void newArrayDeclarator() throws RecognitionException, TokenStreamException {
4927
4928 returnAST = null;
4929 ASTPair currentAST = new ASTPair();
4930 AST newArrayDeclarator_AST = null;
4931 Token lb = null;
4932 AST lb_AST = null;
4933
4934 {
4935 int _cnt210=0;
4936 _loop210:
4937 do {
4938 if ((LA(1)==LBRACK) && (_tokenSet_30.member(LA(2)))) {
4939 lb = LT(1);
4940 lb_AST = astFactory.create(lb);
4941 astFactory.makeASTRoot(currentAST, lb_AST);
4942 match(LBRACK);
4943 if ( inputState.guessing==0 ) {
4944 lb_AST.setType(ARRAY_DECLARATOR);
4945 }
4946 {
4947 switch ( LA(1)) {
4948 case LITERAL_void:
4949 case LITERAL_boolean:
4950 case LITERAL_byte:
4951 case LITERAL_char:
4952 case LITERAL_short:
4953 case LITERAL_int:
4954 case LITERAL_float:
4955 case LITERAL_long:
4956 case LITERAL_double:
4957 case IDENT:
4958 case LPAREN:
4959 case LITERAL_this:
4960 case LITERAL_super:
4961 case PLUS:
4962 case MINUS:
4963 case INC:
4964 case DEC:
4965 case BNOT:
4966 case LNOT:
4967 case LITERAL_true:
4968 case LITERAL_false:
4969 case LITERAL_null:
4970 case LITERAL_new:
4971 case NUM_INT:
4972 case CHAR_LITERAL:
4973 case STRING_LITERAL:
4974 case NUM_FLOAT:
4975 case NUM_LONG:
4976 case NUM_DOUBLE:
4977 {
4978 expression();
4979 astFactory.addASTChild(currentAST, returnAST);
4980 break;
4981 }
4982 case RBRACK:
4983 {
4984 break;
4985 }
4986 default:
4987 {
4988 throw new NoViableAltException(LT(1), getFilename());
4989 }
4990 }
4991 }
4992 match(RBRACK);
4993 }
4994 else {
4995 if ( _cnt210>=1 ) { break _loop210; } else {throw new NoViableAltException(LT(1), getFilename());}
4996 }
4997
4998 _cnt210++;
4999 } while (true);
5000 }
5001 newArrayDeclarator_AST = (AST)currentAST.root;
5002 returnAST = newArrayDeclarator_AST;
5003 }
5004
5005
5006 public static final String[] _tokenNames = {
5007 "<0>",
5008 "EOF",
5009 "<2>",
5010 "NULL_TREE_LOOKAHEAD",
5011 "BLOCK",
5012 "MODIFIERS",
5013 "OBJBLOCK",
5014 "SLIST",
5015 "CTOR_DEF",
5016 "METHOD_DEF",
5017 "VARIABLE_DEF",
5018 "INSTANCE_INIT",
5019 "STATIC_INIT",
5020 "TYPE",
5021 "CLASS_DEF",
5022 "INTERFACE_DEF",
5023 "PACKAGE_DEF",
5024 "ARRAY_DECLARATOR",
5025 "EXTENDS_CLAUSE",
5026 "IMPLEMENTS_CLAUSE",
5027 "PARAMETERS",
5028 "PARAMETER_DEF",
5029 "LABELED_STAT",
5030 "TYPECAST",
5031 "INDEX_OP",
5032 "POST_INC",
5033 "POST_DEC",
5034 "METHOD_CALL",
5035 "EXPR",
5036 "ARRAY_INIT",
5037 "IMPORT",
5038 "UNARY_MINUS",
5039 "UNARY_PLUS",
5040 "CASE_GROUP",
5041 "ELIST",
5042 "FOR_INIT",
5043 "FOR_CONDITION",
5044 "FOR_ITERATOR",
5045 "EMPTY_STAT",
5046 "\"final\"",
5047 "\"abstract\"",
5048 "\"strictfp\"",
5049 "SUPER_CTOR_CALL",
5050 "CTOR_CALL",
5051 "\"package\"",
5052 "SEMI",
5053 "\"import\"",
5054 "LT",
5055 "QUESTION",
5056 "\"extends\"",
5057 "BAND",
5058 "GT",
5059 "LBRACK",
5060 "RBRACK",
5061 "\"void\"",
5062 "\"boolean\"",
5063 "\"byte\"",
5064 "\"char\"",
5065 "\"short\"",
5066 "\"int\"",
5067 "\"float\"",
5068 "\"long\"",
5069 "\"double\"",
5070 "IDENT",
5071 "DOT",
5072 "STAR",
5073 "\"private\"",
5074 "\"public\"",
5075 "\"protected\"",
5076 "\"static\"",
5077 "\"transient\"",
5078 "\"native\"",
5079 "\"threadsafe\"",
5080 "\"synchronized\"",
5081 "\"volatile\"",
5082 "\"class\"",
5083 "\"interface\"",
5084 "LCURLY",
5085 "RCURLY",
5086 "COMMA",
5087 "\"implements\"",
5088 "LPAREN",
5089 "RPAREN",
5090 "\"this\"",
5091 "\"super\"",
5092 "ASSIGN",
5093 "\"throws\"",
5094 "COLON",
5095 "\"if\"",
5096 "\"else\"",
5097 "\"for\"",
5098 "\"while\"",
5099 "\"do\"",
5100 "\"break\"",
5101 "\"continue\"",
5102 "\"return\"",
5103 "\"switch\"",
5104 "\"throw\"",
5105 "\"case\"",
5106 "\"default\"",
5107 "\"try\"",
5108 "\"finally\"",
5109 "\"catch\"",
5110 "AT",
5111 "PLUS_ASSIGN",
5112 "MINUS_ASSIGN",
5113 "STAR_ASSIGN",
5114 "DIV_ASSIGN",
5115 "MOD_ASSIGN",
5116 "SR_ASSIGN",
5117 "BSR_ASSIGN",
5118 "SL_ASSIGN",
5119 "BAND_ASSIGN",
5120 "BXOR_ASSIGN",
5121 "BOR_ASSIGN",
5122 "LOR",
5123 "LAND",
5124 "BOR",
5125 "BXOR",
5126 "NOT_EQUAL",
5127 "EQUAL",
5128 "LE",
5129 "GE",
5130 "\"instanceof\"",
5131 "SL",
5132 "SR",
5133 "BSR",
5134 "PLUS",
5135 "MINUS",
5136 "DIV",
5137 "MOD",
5138 "INC",
5139 "DEC",
5140 "BNOT",
5141 "LNOT",
5142 "\"true\"",
5143 "\"false\"",
5144 "\"null\"",
5145 "\"new\"",
5146 "NUM_INT",
5147 "CHAR_LITERAL",
5148 "STRING_LITERAL",
5149 "NUM_FLOAT",
5150 "NUM_LONG",
5151 "NUM_DOUBLE",
5152 "WS",
5153 "SL_COMMENT",
5154 "ML_COMMENT",
5155 "ESC",
5156 "HEX_DIGIT",
5157 "EXPONENT",
5158 "FLOAT_SUFFIX"
5159 };
5160
5161 protected void buildTokenTypeASTClassMap() {
5162 tokenTypeToASTClassMap=null;
5163 };
5164
5165 private static final long[] mk_tokenSet_0() {
5166 long[] data = { 39032662786048L, 549755822076L, 0L, 0L};
5167 return data;
5168 }
5169 public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
5170 private static final long[] mk_tokenSet_1() {
5171 long[] data = { 109401406963714L, 549755822076L, 0L, 0L};
5172 return data;
5173 }
5174 public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
5175 private static final long[] mk_tokenSet_2() {
5176 long[] data = { 39032662786050L, 549755822076L, 0L, 0L};
5177 return data;
5178 }
5179 public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
5180 private static final long[] mk_tokenSet_3() {
5181 long[] data = { 3848290697216L, 2044L, 0L, 0L};
5182 return data;
5183 }
5184 public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
5185 private static final long[] mk_tokenSet_4() {
5186 long[] data = { -18010550218784768L, 549755822076L, 0L, 0L};
5187 return data;
5188 }
5189 public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
5190 private static final long[] mk_tokenSet_5() {
5191 long[] data = { -13366213103058944L, 549755953149L, 0L, 0L};
5192 return data;
5193 }
5194 public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
5195 private static final long[] mk_tokenSet_6() {
5196 long[] data = { -9218727699739049984L, 1L, 0L, 0L};
5197 return data;
5198 }
5199 public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
5200 private static final long[] mk_tokenSet_7() {
5201 long[] data = { 4538783999459328L, 2129920L, 0L, 0L};
5202 return data;
5203 }
5204 public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
5205 private static final long[] mk_tokenSet_8() {
5206 long[] data = { -17975365846695936L, -9223371401248215044L, 131065L, 0L, 0L, 0L};
5207 return data;
5208 }
5209 public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
5210 private static final long[] mk_tokenSet_9() {
5211 long[] data = { -9671854033731584L, -463894577153L, 131071L, 0L, 0L, 0L};
5212 return data;
5213 }
5214 public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
5215 private static final long[] mk_tokenSet_10() {
5216 long[] data = { -17975365846695936L, -9223371401248231428L, 131065L, 0L, 0L, 0L};
5217 return data;
5218 }
5219 public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());
5220 private static final long[] mk_tokenSet_11() {
5221 long[] data = { -17975365846695936L, -9223371349675053060L, 131065L, 0L, 0L, 0L};
5222 return data;
5223 }
5224 public static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11());
5225 private static final long[] mk_tokenSet_12() {
5226 long[] data = { -9671854033731584L, -4554753L, 131071L, 0L, 0L, 0L};
5227 return data;
5228 }
5229 public static final BitSet _tokenSet_12 = new BitSet(mk_tokenSet_12());
5230 private static final long[] mk_tokenSet_13() {
5231 long[] data = { -18010550218784768L, 549755815932L, 0L, 0L};
5232 return data;
5233 }
5234 public static final BitSet _tokenSet_13 = new BitSet(mk_tokenSet_13());
5235 private static final long[] mk_tokenSet_14() {
5236 long[] data = { -13366213103058944L, 549755815933L, 0L, 0L};
5237 return data;
5238 }
5239 public static final BitSet _tokenSet_14 = new BitSet(mk_tokenSet_14());
5240 private static final long[] mk_tokenSet_15() {
5241 long[] data = { -18014398509481984L, -9223372036853071872L, 131065L, 0L, 0L, 0L};
5242 return data;
5243 }
5244 public static final BitSet _tokenSet_15 = new BitSet(mk_tokenSet_15());
5245 private static final long[] mk_tokenSet_16() {
5246 long[] data = { -9675702324428800L, -1099507826685L, 131071L, 0L, 0L, 0L};
5247 return data;
5248 }
5249 public static final BitSet _tokenSet_16 = new BitSet(mk_tokenSet_16());
5250 private static final long[] mk_tokenSet_17() {
5251 long[] data = { 3848290697216L, 549755817980L, 0L, 0L};
5252 return data;
5253 }
5254 public static final BitSet _tokenSet_17 = new BitSet(mk_tokenSet_17());
5255 private static final long[] mk_tokenSet_18() {
5256 long[] data = { -18010550218784768L, 549755817980L, 0L, 0L};
5257 return data;
5258 }
5259 public static final BitSet _tokenSet_18 = new BitSet(mk_tokenSet_18());
5260 private static final long[] mk_tokenSet_19() {
5261 long[] data = { -18014398509481984L, -9223372036853063680L, 131065L, 0L, 0L, 0L};
5262 return data;
5263 }
5264 public static final BitSet _tokenSet_19 = new BitSet(mk_tokenSet_19());
5265 private static final long[] mk_tokenSet_20() {
5266 long[] data = { -9675702324428800L, -1099507793917L, 131071L, 0L, 0L, 0L};
5267 return data;
5268 }
5269 public static final BitSet _tokenSet_20 = new BitSet(mk_tokenSet_20());
5270 private static final long[] mk_tokenSet_21() {
5271 long[] data = { -18014398509481984L, -9223372036844683264L, 131065L, 0L, 0L, 0L};
5272 return data;
5273 }
5274 public static final BitSet _tokenSet_21 = new BitSet(mk_tokenSet_21());
5275 private static final long[] mk_tokenSet_22() {
5276 long[] data = { -18014398509481984L, 1703936L, 130944L, 0L, 0L, 0L};
5277 return data;
5278 }
5279 public static final BitSet _tokenSet_22 = new BitSet(mk_tokenSet_22());
5280 private static final long[] mk_tokenSet_23() {
5281 long[] data = { -13510798882111488L, -9223372036852809727L, 131065L, 0L, 0L, 0L};
5282 return data;
5283 }
5284 public static final BitSet _tokenSet_23 = new BitSet(mk_tokenSet_23());
5285 private static final long[] mk_tokenSet_24() {
5286 long[] data = { 4503599627370496L, 2228225L, 0L, 0L};
5287 return data;
5288 }
5289 public static final BitSet _tokenSet_24 = new BitSet(mk_tokenSet_24());
5290 private static final long[] mk_tokenSet_25() {
5291 long[] data = { 17345895439794176L, -1099500830717L, 31L, 0L, 0L, 0L};
5292 return data;
5293 }
5294 public static final BitSet _tokenSet_25 = new BitSet(mk_tokenSet_25());
5295 private static final long[] mk_tokenSet_26() {
5296 long[] data = { -664654778990592L, -412321120257L, 131071L, 0L, 0L, 0L};
5297 return data;
5298 }
5299 public static final BitSet _tokenSet_26 = new BitSet(mk_tokenSet_26());
5300 private static final long[] mk_tokenSet_27() {
5301 long[] data = { 2392537302040576L, 432345564227567616L, 0L, 0L};
5302 return data;
5303 }
5304 public static final BitSet _tokenSet_27 = new BitSet(mk_tokenSet_27());
5305 private static final long[] mk_tokenSet_28() {
5306 long[] data = { 0L, 2L, 6L, 0L, 0L, 0L};
5307 return data;
5308 }
5309 public static final BitSet _tokenSet_28 = new BitSet(mk_tokenSet_28());
5310 private static final long[] mk_tokenSet_29() {
5311 long[] data = { -668503069687808L, -1099499126781L, 131071L, 0L, 0L, 0L};
5312 return data;
5313 }
5314 public static final BitSet _tokenSet_29 = new BitSet(mk_tokenSet_29());
5315 private static final long[] mk_tokenSet_30() {
5316 long[] data = { -9007199254740992L, -9223372036853071872L, 131065L, 0L, 0L, 0L};
5317 return data;
5318 }
5319 public static final BitSet _tokenSet_30 = new BitSet(mk_tokenSet_30());
5320
5321 }
Set< String > getParsedEnumNames()
Returns the EnumTypes this HeaderParser processed.
Definition: JavaParser.java:36
Set< String > getParsedFunctionNames()
Returns the list of FunctionSymbols this HeaderParser has parsed.
Definition: JavaParser.java:48
JavaParser(TokenBuffer tokenBuf)
Definition: JavaParser.java:91
void clearParsedInnerInterfacesNames()
Clears the list of inner interfaces this HeaderParser has parsed.
Definition: JavaParser.java:55
final void newExpression()
object instantiation.
final void builtInTypeSpec(boolean addImagNode)
final void interfaceDefinition(AST antsBefore, AST modifiers, AST antsAfter)
JavaParser(ParserSharedInputState state)
final void classDefinition(AST antsBefore, AST modifiers, AST antsAfter)
final void typeSpec(boolean addImagNode)
void clearParsedInnerClassesNames()
Clears the list of inner classes this HeaderParser has parsed.
Definition: JavaParser.java:67
final void declaratorBrackets(AST typ)
final void explicitConstructorInvocation()
Catch obvious constructor calls, but not the expr.super(...) calls.
final void variableDeclarator(AST antsBefore, AST mods, AST antsAfter, AST t)
Declaration of a variable.
final void identPrimary()
Match a, a.b.c refs, a.b.c(...) refs, a.b.c[], a.b.c[].class, and a.b.c.class refs.
final void declaration()
A declaration is the creation of a reference or primitive-type variable Create a separate Type/Var tr...
JavaParser(TokenBuffer tokenBuf, int k)
Definition: JavaParser.java:84
static final String[] _tokenNames
final void classTypeSpec(boolean addImagNode)
JavaParser(TokenStream lexer, int k)
Definition: JavaParser.java:95
Set< String > getParsedInnerClassesNames()
Returns the list of inner classes this HeaderParser has parsed.
Definition: JavaParser.java:72
Set< String > getParsedInnerInterfacesNames()
Returns the list of inner interfaces this HeaderParser has parsed.
Definition: JavaParser.java:60
final void variableDefinitions(AST antsBefore, AST mods, AST antsAfter, AST t)
void clearParsedFunctionNames()
Clears the list of functions this HeaderParser has parsed.
Definition: JavaParser.java:43