GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java™ (public API).
GnuCParser.java
Go to the documentation of this file.
1// $ANTLR 2.7.7 (2006-11-01): "expandedGnuCParser.g" -> "GnuCParser.java"$
2
3 package com.jogamp.gluegen.cgram;
4
5 import java.io.*;
6
7 import antlr.CommonAST;
8 import antlr.DumpASTVisitor;
9 import com.jogamp.gluegen.ASTLocusTag;
10
11import antlr.TokenBuffer;
12import antlr.TokenStreamException;
13import antlr.TokenStreamIOException;
14import antlr.ANTLRException;
15import antlr.LLkParser;
16import antlr.Token;
17import antlr.TokenStream;
18import antlr.RecognitionException;
19import antlr.NoViableAltException;
20import antlr.MismatchedTokenException;
21import antlr.SemanticException;
22import antlr.ParserSharedInputState;
23import antlr.collections.impl.BitSet;
24import antlr.collections.AST;
25import java.util.Hashtable;
26import antlr.ASTFactory;
27import antlr.ASTPair;
28import antlr.collections.impl.ASTArray;
29
30public class GnuCParser extends antlr.LLkParser implements GNUCTokenTypes
31 {
32
33 // Suppport C++-style single-line comments?
34 public static boolean CPPComments = true;
35
36 // access to symbol table
38
39 // source for names to unnamed scopes
40 protected int unnamedScopeCounter = 0;
41
42 public boolean isTypedefName(String name) {
43 boolean returnValue = false;
45 for (; node != null; node = (TNode) node.getNextSibling() ) {
46 if(node.getType() == LITERAL_typedef) {
47 returnValue = true;
48 break;
49 }
50 }
51 return returnValue;
52 }
53
54
55 public String getAScopeName() {
56 return "" + (unnamedScopeCounter++);
57 }
58
59 public void pushScope(String scopeName) {
60 symbolTable.pushScope(scopeName);
61 }
62
63 public void popScope() {
65 }
66
67 protected boolean debugging = false;
68
69 public boolean getDebug() {
70 return debugging;
71 }
72
73 public void setDebug(boolean debug) {
74 this.debugging = debug;
75 }
76
77 int traceDepth = 0;
78 public void reportError(RecognitionException ex) {
79 try {
80 System.err.println("ANTLR Parsing Error: "+ex + " token name:" + tokenNames[LA(1)]);
81 ex.printStackTrace(System.err);
82 }
83 catch (TokenStreamException e) {
84 System.err.println("ANTLR Parsing Error: "+ex);
85 ex.printStackTrace(System.err);
86 }
87 }
88 public void reportError(String s) {
89 System.err.println("ANTLR Parsing Error from String: " + s);
90 }
91 public void reportWarning(String s) {
92 System.err.println("ANTLR Parsing Warning from String: " + s);
93 }
94 public void match(int t) throws MismatchedTokenException {
95 if ( debugging ) {
96 for (int x=0; x<traceDepth; x++) System.out.print(" ");
97 try {
98 System.out.println("Match("+tokenNames[t]+") with LA(1)="+
99 tokenNames[LA(1)] + ((inputState.guessing>0)?" [inputState.guessing "+ inputState.guessing + "]":""));
100 }
101 catch (TokenStreamException e) {
102 System.out.println("Match("+tokenNames[t]+") " + ((inputState.guessing>0)?" [inputState.guessing "+ inputState.guessing + "]":""));
103
104 }
105
106 }
107 try {
108 if ( LA(1)!=t ) {
109 if ( debugging ){
110 for (int x=0; x<traceDepth; x++) System.out.print(" ");
111 System.out.println("token mismatch: "+tokenNames[LA(1)]
112 + "!="+tokenNames[t]);
113 }
114 throw new MismatchedTokenException(tokenNames, LT(1), t, false, getFilename());
115
116 } else {
117 // mark token as consumed -- fetch next token deferred until LA/LT
118 consume();
119 }
120 }
121 catch (TokenStreamException e) {
122 }
123
124 }
125 public void traceIn(String rname) {
126 traceDepth += 1;
127 for (int x=0; x<traceDepth; x++) System.out.print(" ");
128 try {
129 System.out.println("> "+rname+"; LA(1)==("+ tokenNames[LT(1).getType()]
130 + ") " + LT(1).getText() + " [inputState.guessing "+ inputState.guessing + "]");
131 }
132 catch (TokenStreamException e) {
133 }
134 }
135 public void traceOut(String rname) {
136 for (int x=0; x<traceDepth; x++) System.out.print(" ");
137 try {
138 System.out.println("< "+rname+"; LA(1)==("+ tokenNames[LT(1).getType()]
139 + ") "+LT(1).getText() + " [inputState.guessing "+ inputState.guessing + "]");
140 }
141 catch (TokenStreamException e) {
142 }
143 traceDepth -= 1;
144 }
145
146
147protected GnuCParser(TokenBuffer tokenBuf, int k) {
148 super(tokenBuf,k);
149 tokenNames = _tokenNames;
151 astFactory = new ASTFactory(getTokenTypeToASTClassMap());
152}
153
154public GnuCParser(TokenBuffer tokenBuf) {
155 this(tokenBuf,2);
156}
157
158protected GnuCParser(TokenStream lexer, int k) {
159 super(lexer,k);
160 tokenNames = _tokenNames;
162 astFactory = new ASTFactory(getTokenTypeToASTClassMap());
163}
164
165public GnuCParser(TokenStream lexer) {
166 this(lexer,2);
167}
168
169public GnuCParser(ParserSharedInputState state) {
170 super(state,2);
171 tokenNames = _tokenNames;
173 astFactory = new ASTFactory(getTokenTypeToASTClassMap());
174}
175
176 public final void translationUnit() throws RecognitionException, TokenStreamException {
177
178 returnAST = null;
179 ASTPair currentAST = new ASTPair();
180 TNode translationUnit_AST = null;
181
182 try { // for error handling
183 {
184 switch ( LA(1)) {
185 case LITERAL_typedef:
186 case LITERAL_asm:
187 case LITERAL_volatile:
188 case SEMI:
189 case LITERAL_struct:
190 case LITERAL_union:
191 case LITERAL_enum:
192 case LITERAL_auto:
193 case LITERAL_register:
194 case LITERAL_extern:
195 case LITERAL_static:
196 case LITERAL_const:
197 case LITERAL_void:
198 case LITERAL_char:
199 case LITERAL_short:
200 case LITERAL_int:
201 case LITERAL_long:
202 case LITERAL_float:
203 case LITERAL_double:
204 case LITERAL_signed:
205 case LITERAL_unsigned:
206 case 27:
207 case 28:
208 case 29:
209 case 30:
210 case 31:
211 case 32:
212 case LITERAL_wchar_t:
213 case 34:
214 case 35:
215 case 36:
216 case 37:
218 case LITERAL_intptr_t:
219 case LITERAL_size_t:
221 case ID:
222 case STAR:
223 case LPAREN:
224 case LITERAL_inline:
225 case LITERAL_typeof:
227 {
228 externalList();
229 astFactory.addASTChild(currentAST, returnAST);
230 break;
231 }
232 case EOF:
233 {
234 break;
235 }
236 default:
237 {
238 throw new NoViableAltException(LT(1), getFilename());
239 }
240 }
241 }
242 translationUnit_AST = (TNode)currentAST.root;
243 }
244 catch (RecognitionException ex) {
245 if (inputState.guessing==0) {
246 reportError(ex);
247 recover(ex,_tokenSet_0);
248 } else {
249 throw ex;
250 }
251 }
252 returnAST = translationUnit_AST;
253 }
254
255 public final void externalList() throws RecognitionException, TokenStreamException {
256
257 returnAST = null;
258 ASTPair currentAST = new ASTPair();
259 TNode externalList_AST = null;
260
261 try { // for error handling
262 {
263 int _cnt209=0;
264 _loop209:
265 do {
266 if ((_tokenSet_1.member(LA(1)))) {
267 externalDef();
268 astFactory.addASTChild(currentAST, returnAST);
269 }
270 else {
271 if ( _cnt209>=1 ) { break _loop209; } else {throw new NoViableAltException(LT(1), getFilename());}
272 }
273
274 _cnt209++;
275 } while (true);
276 }
277 externalList_AST = (TNode)currentAST.root;
278 }
279 catch (RecognitionException ex) {
280 if (inputState.guessing==0) {
281 reportError(ex);
282 recover(ex,_tokenSet_0);
283 } else {
284 throw ex;
285 }
286 }
287 returnAST = externalList_AST;
288 }
289
290 public final void asm_expr() throws RecognitionException, TokenStreamException {
291
292 returnAST = null;
293 ASTPair currentAST = new ASTPair();
294 TNode asm_expr_AST = null;
295
296 try { // for error handling
297 TNode tmp1_AST = null;
298 tmp1_AST = (TNode)astFactory.create(LT(1));
299 astFactory.makeASTRoot(currentAST, tmp1_AST);
301 {
302 switch ( LA(1)) {
303 case LITERAL_volatile:
304 {
305 TNode tmp2_AST = null;
306 tmp2_AST = (TNode)astFactory.create(LT(1));
307 astFactory.addASTChild(currentAST, tmp2_AST);
309 break;
310 }
311 case LCURLY:
312 {
313 break;
314 }
315 default:
316 {
317 throw new NoViableAltException(LT(1), getFilename());
318 }
319 }
320 }
321 TNode tmp3_AST = null;
322 tmp3_AST = (TNode)astFactory.create(LT(1));
323 astFactory.addASTChild(currentAST, tmp3_AST);
324 match(LCURLY);
325 expr();
326 astFactory.addASTChild(currentAST, returnAST);
327 TNode tmp4_AST = null;
328 tmp4_AST = (TNode)astFactory.create(LT(1));
329 astFactory.addASTChild(currentAST, tmp4_AST);
330 match(RCURLY);
331 {
332 int _cnt6=0;
333 _loop6:
334 do {
335 if ((LA(1)==SEMI) && (_tokenSet_2.member(LA(2)))) {
336 TNode tmp5_AST = null;
337 tmp5_AST = (TNode)astFactory.create(LT(1));
338 astFactory.addASTChild(currentAST, tmp5_AST);
339 match(SEMI);
340 }
341 else {
342 if ( _cnt6>=1 ) { break _loop6; } else {throw new NoViableAltException(LT(1), getFilename());}
343 }
344
345 _cnt6++;
346 } while (true);
347 }
348 asm_expr_AST = (TNode)currentAST.root;
349 }
350 catch (RecognitionException ex) {
351 if (inputState.guessing==0) {
352 reportError(ex);
353 recover(ex,_tokenSet_2);
354 } else {
355 throw ex;
356 }
357 }
358 returnAST = asm_expr_AST;
359 }
360
361 public final void expr() throws RecognitionException, TokenStreamException {
362
363 returnAST = null;
364 ASTPair currentAST = new ASTPair();
365 TNode expr_AST = null;
366 Token c = null;
367 TNode c_AST = null;
368
369 try { // for error handling
370 assignExpr();
371 astFactory.addASTChild(currentAST, returnAST);
372 {
373 _loop259:
374 do {
375 if ((LA(1)==COMMA) && (_tokenSet_3.member(LA(2)))) {
376 c = LT(1);
377 c_AST = (TNode)astFactory.create(c);
378 astFactory.makeASTRoot(currentAST, c_AST);
379 match(COMMA);
380 if ( inputState.guessing==0 ) {
381 c_AST.setType(NCommaExpr);
382 }
383 assignExpr();
384 astFactory.addASTChild(currentAST, returnAST);
385 }
386 else {
387 break _loop259;
388 }
389
390 } while (true);
391 }
392 expr_AST = (TNode)currentAST.root;
393 }
394 catch (RecognitionException ex) {
395 if (inputState.guessing==0) {
396 reportError(ex);
397 recover(ex,_tokenSet_4);
398 } else {
399 throw ex;
400 }
401 }
402 returnAST = expr_AST;
403 }
404
405 public final void idList() throws RecognitionException, TokenStreamException {
406
407 returnAST = null;
408 ASTPair currentAST = new ASTPair();
409 TNode idList_AST = null;
410
411 try { // for error handling
412 TNode tmp6_AST = null;
413 tmp6_AST = (TNode)astFactory.create(LT(1));
414 astFactory.addASTChild(currentAST, tmp6_AST);
415 match(ID);
416 {
417 _loop9:
418 do {
419 if ((LA(1)==COMMA) && (LA(2)==ID)) {
420 TNode tmp7_AST = null;
421 tmp7_AST = (TNode)astFactory.create(LT(1));
422 astFactory.addASTChild(currentAST, tmp7_AST);
423 match(COMMA);
424 TNode tmp8_AST = null;
425 tmp8_AST = (TNode)astFactory.create(LT(1));
426 astFactory.addASTChild(currentAST, tmp8_AST);
427 match(ID);
428 }
429 else {
430 break _loop9;
431 }
432
433 } while (true);
434 }
435 idList_AST = (TNode)currentAST.root;
436 }
437 catch (RecognitionException ex) {
438 if (inputState.guessing==0) {
439 reportError(ex);
440 recover(ex,_tokenSet_5);
441 } else {
442 throw ex;
443 }
444 }
445 returnAST = idList_AST;
446 }
447
448 public final void externalDef() throws RecognitionException, TokenStreamException {
449
450 returnAST = null;
451 ASTPair currentAST = new ASTPair();
452 TNode externalDef_AST = null;
453
454 try { // for error handling
455 switch ( LA(1)) {
456 case LITERAL_asm:
457 {
458 asm_expr();
459 astFactory.addASTChild(currentAST, returnAST);
460 externalDef_AST = (TNode)currentAST.root;
461 break;
462 }
463 case SEMI:
464 {
465 TNode tmp9_AST = null;
466 tmp9_AST = (TNode)astFactory.create(LT(1));
467 astFactory.addASTChild(currentAST, tmp9_AST);
468 match(SEMI);
469 externalDef_AST = (TNode)currentAST.root;
470 break;
471 }
472 default:
473 boolean synPredMatched12 = false;
474 if (((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2))))) {
475 int _m12 = mark();
476 synPredMatched12 = true;
477 inputState.guessing++;
478 try {
479 {
480 if ((LA(1)==LITERAL_typedef) && (true)) {
482 }
483 else if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
484 declaration();
485 }
486 else {
487 throw new NoViableAltException(LT(1), getFilename());
488 }
489
490 }
491 }
492 catch (RecognitionException pe) {
493 synPredMatched12 = false;
494 }
495 rewind(_m12);
496inputState.guessing--;
497 }
498 if ( synPredMatched12 ) {
499 declaration();
500 astFactory.addASTChild(currentAST, returnAST);
501 externalDef_AST = (TNode)currentAST.root;
502 }
503 else {
504 boolean synPredMatched14 = false;
505 if (((_tokenSet_8.member(LA(1))) && (_tokenSet_9.member(LA(2))))) {
506 int _m14 = mark();
507 synPredMatched14 = true;
508 inputState.guessing++;
509 try {
510 {
512 }
513 }
514 catch (RecognitionException pe) {
515 synPredMatched14 = false;
516 }
517 rewind(_m14);
518inputState.guessing--;
519 }
520 if ( synPredMatched14 ) {
521 functionDef();
522 astFactory.addASTChild(currentAST, returnAST);
523 externalDef_AST = (TNode)currentAST.root;
524 }
525 else if ((_tokenSet_10.member(LA(1))) && (_tokenSet_11.member(LA(2)))) {
527 astFactory.addASTChild(currentAST, returnAST);
528 externalDef_AST = (TNode)currentAST.root;
529 }
530 else {
531 throw new NoViableAltException(LT(1), getFilename());
532 }
533 }}
534 }
535 catch (RecognitionException ex) {
536 if (inputState.guessing==0) {
537 reportError(ex);
538 recover(ex,_tokenSet_2);
539 } else {
540 throw ex;
541 }
542 }
543 returnAST = externalDef_AST;
544 }
545
546 public final void declaration() throws RecognitionException, TokenStreamException {
547
548 returnAST = null;
549 ASTPair currentAST = new ASTPair();
550 TNode declaration_AST = null;
551 TNode ds_AST = null;
552 AST ds1 = null;
553
554 try { // for error handling
556 ds_AST = (TNode)returnAST;
557 astFactory.addASTChild(currentAST, returnAST);
558 if ( inputState.guessing==0 ) {
559 ds1 = astFactory.dupList(ds_AST);
560 }
561 {
562 switch ( LA(1)) {
563 case ID:
564 case STAR:
565 case LPAREN:
566 {
567 initDeclList(ds1);
568 astFactory.addASTChild(currentAST, returnAST);
569 break;
570 }
571 case SEMI:
572 {
573 break;
574 }
575 default:
576 {
577 throw new NoViableAltException(LT(1), getFilename());
578 }
579 }
580 }
581 {
582 int _cnt78=0;
583 _loop78:
584 do {
585 if ((LA(1)==SEMI) && (_tokenSet_12.member(LA(2)))) {
586 TNode tmp10_AST = null;
587 tmp10_AST = (TNode)astFactory.create(LT(1));
588 astFactory.addASTChild(currentAST, tmp10_AST);
589 match(SEMI);
590 }
591 else {
592 if ( _cnt78>=1 ) { break _loop78; } else {throw new NoViableAltException(LT(1), getFilename());}
593 }
594
595 _cnt78++;
596 } while (true);
597 }
598 if ( inputState.guessing==0 ) {
599 declaration_AST = (TNode)currentAST.root;
600 declaration_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NDeclaration)).add(declaration_AST));
601 currentAST.root = declaration_AST;
602 currentAST.child = declaration_AST!=null &&declaration_AST.getFirstChild()!=null ?
603 declaration_AST.getFirstChild() : declaration_AST;
604 currentAST.advanceChildToEnd();
605 }
606 declaration_AST = (TNode)currentAST.root;
607 }
608 catch (RecognitionException ex) {
609 if (inputState.guessing==0) {
610 reportError(ex);
611 recover(ex,_tokenSet_12);
612 } else {
613 throw ex;
614 }
615 }
616 returnAST = declaration_AST;
617 }
618
619 public final void functionPrefix() throws RecognitionException, TokenStreamException {
620
621 returnAST = null;
622 ASTPair currentAST = new ASTPair();
623 TNode functionPrefix_AST = null;
624 TNode ds_AST = null;
625 TNode d_AST = null;
626 String declName;
627
628 try { // for error handling
629 {
630 boolean synPredMatched18 = false;
631 if (((_tokenSet_13.member(LA(1))) && (_tokenSet_14.member(LA(2))))) {
632 int _m18 = mark();
633 synPredMatched18 = true;
634 inputState.guessing++;
635 try {
636 {
638 }
639 }
640 catch (RecognitionException pe) {
641 synPredMatched18 = false;
642 }
643 rewind(_m18);
644inputState.guessing--;
645 }
646 if ( synPredMatched18 ) {
648 ds_AST = (TNode)returnAST;
649 astFactory.addASTChild(currentAST, returnAST);
650 }
651 else if ((_tokenSet_10.member(LA(1))) && (_tokenSet_9.member(LA(2)))) {
652 }
653 else {
654 throw new NoViableAltException(LT(1), getFilename());
655 }
656
657 }
658 declName=declarator(true);
659 d_AST = (TNode)returnAST;
660 astFactory.addASTChild(currentAST, returnAST);
661 {
662 _loop20:
663 do {
664 if ((_tokenSet_6.member(LA(1)))) {
665 declaration();
666 astFactory.addASTChild(currentAST, returnAST);
667 }
668 else {
669 break _loop20;
670 }
671
672 } while (true);
673 }
674 {
675 switch ( LA(1)) {
676 case VARARGS:
677 {
678 TNode tmp11_AST = null;
679 tmp11_AST = (TNode)astFactory.create(LT(1));
680 astFactory.addASTChild(currentAST, tmp11_AST);
681 match(VARARGS);
682 break;
683 }
684 case LCURLY:
685 case SEMI:
686 {
687 break;
688 }
689 default:
690 {
691 throw new NoViableAltException(LT(1), getFilename());
692 }
693 }
694 }
695 {
696 _loop23:
697 do {
698 if ((LA(1)==SEMI)) {
699 TNode tmp12_AST = null;
700 tmp12_AST = (TNode)astFactory.create(LT(1));
701 astFactory.addASTChild(currentAST, tmp12_AST);
702 match(SEMI);
703 }
704 else {
705 break _loop23;
706 }
707
708 } while (true);
709 }
710 TNode tmp13_AST = null;
711 tmp13_AST = (TNode)astFactory.create(LT(1));
712 astFactory.addASTChild(currentAST, tmp13_AST);
713 match(LCURLY);
714 functionPrefix_AST = (TNode)currentAST.root;
715 }
716 catch (RecognitionException ex) {
717 if (inputState.guessing==0) {
718 reportError(ex);
719 recover(ex,_tokenSet_0);
720 } else {
721 throw ex;
722 }
723 }
724 returnAST = functionPrefix_AST;
725 }
726
727 public final void functionDef() throws RecognitionException, TokenStreamException {
728
729 returnAST = null;
730 ASTPair currentAST = new ASTPair();
731 TNode functionDef_AST = null;
732 TNode ds_AST = null;
733 TNode d_AST = null;
734 String declName;
735
736 try { // for error handling
737 {
738 boolean synPredMatched241 = false;
739 if (((_tokenSet_13.member(LA(1))) && (_tokenSet_14.member(LA(2))))) {
740 int _m241 = mark();
741 synPredMatched241 = true;
742 inputState.guessing++;
743 try {
744 {
746 }
747 }
748 catch (RecognitionException pe) {
749 synPredMatched241 = false;
750 }
751 rewind(_m241);
752inputState.guessing--;
753 }
754 if ( synPredMatched241 ) {
756 ds_AST = (TNode)returnAST;
757 astFactory.addASTChild(currentAST, returnAST);
758 }
759 else if ((_tokenSet_10.member(LA(1))) && (_tokenSet_9.member(LA(2)))) {
760 }
761 else {
762 throw new NoViableAltException(LT(1), getFilename());
763 }
764
765 }
766 declName=declarator(true);
767 d_AST = (TNode)returnAST;
768 astFactory.addASTChild(currentAST, returnAST);
769 if ( inputState.guessing==0 ) {
770
771 AST d2, ds2;
772 d2 = astFactory.dupList(d_AST);
773 ds2 = astFactory.dupList(ds_AST);
774 symbolTable.add(declName, (TNode)astFactory.make( (new ASTArray(3)).add(null).add(ds2).add(d2)));
775 pushScope(declName);
776
777 }
778 {
779 _loop243:
780 do {
781 if ((_tokenSet_6.member(LA(1)))) {
782 declaration();
783 astFactory.addASTChild(currentAST, returnAST);
784 }
785 else {
786 break _loop243;
787 }
788
789 } while (true);
790 }
791 {
792 switch ( LA(1)) {
793 case VARARGS:
794 {
795 TNode tmp14_AST = null;
796 tmp14_AST = (TNode)astFactory.create(LT(1));
797 astFactory.addASTChild(currentAST, tmp14_AST);
798 match(VARARGS);
799 break;
800 }
801 case LCURLY:
802 case SEMI:
803 {
804 break;
805 }
806 default:
807 {
808 throw new NoViableAltException(LT(1), getFilename());
809 }
810 }
811 }
812 {
813 _loop246:
814 do {
815 if ((LA(1)==SEMI)) {
816 match(SEMI);
817 }
818 else {
819 break _loop246;
820 }
821
822 } while (true);
823 }
824 if ( inputState.guessing==0 ) {
825 popScope();
826 }
827 compoundStatement(declName);
828 astFactory.addASTChild(currentAST, returnAST);
829 if ( inputState.guessing==0 ) {
830 functionDef_AST = (TNode)currentAST.root;
831 functionDef_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NFunctionDef)).add(functionDef_AST));
832 currentAST.root = functionDef_AST;
833 currentAST.child = functionDef_AST!=null &&functionDef_AST.getFirstChild()!=null ?
834 functionDef_AST.getFirstChild() : functionDef_AST;
835 currentAST.advanceChildToEnd();
836 }
837 functionDef_AST = (TNode)currentAST.root;
838 }
839 catch (RecognitionException ex) {
840 if (inputState.guessing==0) {
841 reportError(ex);
842 recover(ex,_tokenSet_2);
843 } else {
844 throw ex;
845 }
846 }
847 returnAST = functionDef_AST;
848 }
849
850 public final void typelessDeclaration() throws RecognitionException, TokenStreamException {
851
852 returnAST = null;
853 ASTPair currentAST = new ASTPair();
854 TNode typelessDeclaration_AST = null;
855 AST typeMissing = (TNode)astFactory.create(NTypeMissing);
856
857 try { // for error handling
858 initDeclList(typeMissing);
859 astFactory.addASTChild(currentAST, returnAST);
860 TNode tmp16_AST = null;
861 tmp16_AST = (TNode)astFactory.create(LT(1));
862 astFactory.addASTChild(currentAST, tmp16_AST);
863 match(SEMI);
864 if ( inputState.guessing==0 ) {
865 typelessDeclaration_AST = (TNode)currentAST.root;
866 typelessDeclaration_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NTypeMissing)).add(typelessDeclaration_AST));
867 currentAST.root = typelessDeclaration_AST;
868 currentAST.child = typelessDeclaration_AST!=null &&typelessDeclaration_AST.getFirstChild()!=null ?
869 typelessDeclaration_AST.getFirstChild() : typelessDeclaration_AST;
870 currentAST.advanceChildToEnd();
871 }
872 typelessDeclaration_AST = (TNode)currentAST.root;
873 }
874 catch (RecognitionException ex) {
875 if (inputState.guessing==0) {
876 reportError(ex);
877 recover(ex,_tokenSet_2);
878 } else {
879 throw ex;
880 }
881 }
882 returnAST = typelessDeclaration_AST;
883 }
884
885 public final void functionDeclSpecifiers() throws RecognitionException, TokenStreamException {
886
887 returnAST = null;
888 ASTPair currentAST = new ASTPair();
889 TNode functionDeclSpecifiers_AST = null;
890 int specCount = 0;
891
892 try { // for error handling
893 {
894 int _cnt251=0;
895 _loop251:
896 do {
897 switch ( LA(1)) {
898 case LITERAL_extern:
899 case LITERAL_static:
900 case LITERAL_inline:
901 {
903 astFactory.addASTChild(currentAST, returnAST);
904 break;
905 }
906 case LITERAL_volatile:
907 case LITERAL_const:
908 {
910 astFactory.addASTChild(currentAST, returnAST);
911 break;
912 }
913 default:
914 boolean synPredMatched250 = false;
915 if (((_tokenSet_15.member(LA(1))) && (_tokenSet_14.member(LA(2))))) {
916 int _m250 = mark();
917 synPredMatched250 = true;
918 inputState.guessing++;
919 try {
920 {
921 if ((LA(1)==LITERAL_struct) && (true)) {
923 }
924 else if ((LA(1)==LITERAL_union) && (true)) {
926 }
927 else if ((LA(1)==LITERAL_enum) && (true)) {
929 }
930 else if ((_tokenSet_15.member(LA(1))) && (true)) {
931 typeSpecifier(specCount);
932 }
933 else {
934 throw new NoViableAltException(LT(1), getFilename());
935 }
936
937 }
938 }
939 catch (RecognitionException pe) {
940 synPredMatched250 = false;
941 }
942 rewind(_m250);
943inputState.guessing--;
944 }
945 if ( synPredMatched250 ) {
946 specCount=typeSpecifier(specCount);
947 astFactory.addASTChild(currentAST, returnAST);
948 }
949 else {
950 if ( _cnt251>=1 ) { break _loop251; } else {throw new NoViableAltException(LT(1), getFilename());}
951 }
952 }
953 _cnt251++;
954 } while (true);
955 }
956 functionDeclSpecifiers_AST = (TNode)currentAST.root;
957 }
958 catch (RecognitionException ex) {
959 if (inputState.guessing==0) {
960 reportError(ex);
961 recover(ex,_tokenSet_10);
962 } else {
963 throw ex;
964 }
965 }
966 returnAST = functionDeclSpecifiers_AST;
967 }
968
969 public final String declarator(
970 boolean isFunctionDefinition
971 ) throws RecognitionException, TokenStreamException {
972 String declName;
973
974 returnAST = null;
975 ASTPair currentAST = new ASTPair();
976 TNode declarator_AST = null;
977 Token id = null;
978 TNode id_AST = null;
979 declName = "";
980
981 try { // for error handling
982 {
983 switch ( LA(1)) {
984 case STAR:
985 {
986 pointerGroup();
987 astFactory.addASTChild(currentAST, returnAST);
988 break;
989 }
990 case ID:
991 case LPAREN:
992 {
993 break;
994 }
995 default:
996 {
997 throw new NoViableAltException(LT(1), getFilename());
998 }
999 }
1000 }
1001 {
1002 switch ( LA(1)) {
1003 case ID:
1004 {
1005 id = LT(1);
1006 id_AST = (TNode)astFactory.create(id);
1007 astFactory.addASTChild(currentAST, id_AST);
1008 match(ID);
1009 if ( inputState.guessing==0 ) {
1010 declName = id.getText();
1011 }
1012 break;
1013 }
1014 case LPAREN:
1015 {
1016 TNode tmp17_AST = null;
1017 tmp17_AST = (TNode)astFactory.create(LT(1));
1018 astFactory.addASTChild(currentAST, tmp17_AST);
1019 match(LPAREN);
1020 declName=declarator(false);
1021 astFactory.addASTChild(currentAST, returnAST);
1022 TNode tmp18_AST = null;
1023 tmp18_AST = (TNode)astFactory.create(LT(1));
1024 astFactory.addASTChild(currentAST, tmp18_AST);
1025 match(RPAREN);
1026 break;
1027 }
1028 default:
1029 {
1030 throw new NoViableAltException(LT(1), getFilename());
1031 }
1032 }
1033 }
1034 {
1035 _loop50:
1036 do {
1037 switch ( LA(1)) {
1038 case LPAREN:
1039 {
1040 declaratorParamaterList(isFunctionDefinition, declName);
1041 astFactory.addASTChild(currentAST, returnAST);
1042 break;
1043 }
1044 case LBRACKET:
1045 {
1046 TNode tmp19_AST = null;
1047 tmp19_AST = (TNode)astFactory.create(LT(1));
1048 astFactory.addASTChild(currentAST, tmp19_AST);
1049 match(LBRACKET);
1050 {
1051 switch ( LA(1)) {
1052 case LITERAL_asm:
1053 case ID:
1054 case STAR:
1055 case LPAREN:
1056 case LAND:
1057 case BAND:
1058 case PLUS:
1059 case MINUS:
1060 case INC:
1061 case DEC:
1062 case LITERAL_sizeof:
1063 case BNOT:
1064 case LNOT:
1065 case CharLiteral:
1066 case StringLiteral:
1067 case Number:
1068 case LITERAL___alignof:
1069 case LITERAL___real:
1070 case LITERAL___imag:
1071 {
1072 expr();
1073 astFactory.addASTChild(currentAST, returnAST);
1074 break;
1075 }
1076 case RBRACKET:
1077 {
1078 break;
1079 }
1080 default:
1081 {
1082 throw new NoViableAltException(LT(1), getFilename());
1083 }
1084 }
1085 }
1086 TNode tmp20_AST = null;
1087 tmp20_AST = (TNode)astFactory.create(LT(1));
1088 astFactory.addASTChild(currentAST, tmp20_AST);
1089 match(RBRACKET);
1090 break;
1091 }
1092 default:
1093 {
1094 break _loop50;
1095 }
1096 }
1097 } while (true);
1098 }
1099 if ( inputState.guessing==0 ) {
1100 declarator_AST = (TNode)currentAST.root;
1101 declarator_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NDeclarator)).add(declarator_AST));
1102 currentAST.root = declarator_AST;
1103 currentAST.child = declarator_AST!=null &&declarator_AST.getFirstChild()!=null ?
1104 declarator_AST.getFirstChild() : declarator_AST;
1105 currentAST.advanceChildToEnd();
1106 }
1107 declarator_AST = (TNode)currentAST.root;
1108 }
1109 catch (RecognitionException ex) {
1110 if (inputState.guessing==0) {
1111 reportError(ex);
1112 recover(ex,_tokenSet_16);
1113 } else {
1114 throw ex;
1115 }
1116 }
1117 returnAST = declarator_AST;
1118 return declName;
1119 }
1120
1121 public final void initDeclList(
1122 AST declarationSpecifiers
1123 ) throws RecognitionException, TokenStreamException {
1124
1125 returnAST = null;
1126 ASTPair currentAST = new ASTPair();
1127 TNode initDeclList_AST = null;
1128
1129 try { // for error handling
1130 initDecl(declarationSpecifiers);
1131 astFactory.addASTChild(currentAST, returnAST);
1132 {
1133 _loop115:
1134 do {
1135 if ((LA(1)==COMMA) && (_tokenSet_10.member(LA(2)))) {
1136 match(COMMA);
1137 initDecl(declarationSpecifiers);
1138 astFactory.addASTChild(currentAST, returnAST);
1139 }
1140 else {
1141 break _loop115;
1142 }
1143
1144 } while (true);
1145 }
1146 {
1147 switch ( LA(1)) {
1148 case COMMA:
1149 {
1150 match(COMMA);
1151 break;
1152 }
1153 case SEMI:
1154 {
1155 break;
1156 }
1157 default:
1158 {
1159 throw new NoViableAltException(LT(1), getFilename());
1160 }
1161 }
1162 }
1163 initDeclList_AST = (TNode)currentAST.root;
1164 }
1165 catch (RecognitionException ex) {
1166 if (inputState.guessing==0) {
1167 reportError(ex);
1168 recover(ex,_tokenSet_17);
1169 } else {
1170 throw ex;
1171 }
1172 }
1173 returnAST = initDeclList_AST;
1174 }
1175
1176 public final void initializer() throws RecognitionException, TokenStreamException {
1177
1178 returnAST = null;
1179 ASTPair currentAST = new ASTPair();
1180 TNode initializer_AST = null;
1181
1182 try { // for error handling
1183 {
1184 if ((_tokenSet_18.member(LA(1))) && (_tokenSet_19.member(LA(2)))) {
1185 {
1186 {
1187 boolean synPredMatched30 = false;
1188 if (((_tokenSet_20.member(LA(1))) && (_tokenSet_21.member(LA(2))))) {
1189 int _m30 = mark();
1190 synPredMatched30 = true;
1191 inputState.guessing++;
1192 try {
1193 {
1195 }
1196 }
1197 catch (RecognitionException pe) {
1198 synPredMatched30 = false;
1199 }
1200 rewind(_m30);
1201inputState.guessing--;
1202 }
1203 if ( synPredMatched30 ) {
1205 astFactory.addASTChild(currentAST, returnAST);
1206 }
1207 else if ((_tokenSet_22.member(LA(1))) && (_tokenSet_23.member(LA(2)))) {
1208 }
1209 else {
1210 throw new NoViableAltException(LT(1), getFilename());
1211 }
1212
1213 }
1214 {
1215 switch ( LA(1)) {
1216 case LITERAL_asm:
1217 case ID:
1218 case STAR:
1219 case LPAREN:
1220 case LAND:
1221 case BAND:
1222 case PLUS:
1223 case MINUS:
1224 case INC:
1225 case DEC:
1226 case LITERAL_sizeof:
1227 case BNOT:
1228 case LNOT:
1229 case CharLiteral:
1230 case StringLiteral:
1231 case Number:
1232 case LITERAL___alignof:
1233 case LITERAL___real:
1234 case LITERAL___imag:
1235 {
1236 assignExpr();
1237 astFactory.addASTChild(currentAST, returnAST);
1238 break;
1239 }
1240 case LCURLY:
1241 {
1243 astFactory.addASTChild(currentAST, returnAST);
1244 break;
1245 }
1246 default:
1247 {
1248 throw new NoViableAltException(LT(1), getFilename());
1249 }
1250 }
1251 }
1252 if ( inputState.guessing==0 ) {
1253 initializer_AST = (TNode)currentAST.root;
1254 initializer_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NInitializer)).add(initializer_AST));
1255 currentAST.root = initializer_AST;
1256 currentAST.child = initializer_AST!=null &&initializer_AST.getFirstChild()!=null ?
1257 initializer_AST.getFirstChild() : initializer_AST;
1258 currentAST.advanceChildToEnd();
1259 }
1260 }
1261 }
1262 else if ((LA(1)==LCURLY) && (_tokenSet_24.member(LA(2)))) {
1264 astFactory.addASTChild(currentAST, returnAST);
1265 }
1266 else {
1267 throw new NoViableAltException(LT(1), getFilename());
1268 }
1269
1270 }
1271 initializer_AST = (TNode)currentAST.root;
1272 }
1273 catch (RecognitionException ex) {
1274 if (inputState.guessing==0) {
1275 reportError(ex);
1276 recover(ex,_tokenSet_25);
1277 } else {
1278 throw ex;
1279 }
1280 }
1281 returnAST = initializer_AST;
1282 }
1283
1284 public final void initializerElementLabel() throws RecognitionException, TokenStreamException {
1285
1286 returnAST = null;
1287 ASTPair currentAST = new ASTPair();
1288 TNode initializerElementLabel_AST = null;
1289
1290 try { // for error handling
1291 {
1292 switch ( LA(1)) {
1293 case LBRACKET:
1294 {
1295 {
1296 TNode tmp23_AST = null;
1297 tmp23_AST = (TNode)astFactory.create(LT(1));
1298 astFactory.addASTChild(currentAST, tmp23_AST);
1299 match(LBRACKET);
1300 {
1301 boolean synPredMatched37 = false;
1302 if (((_tokenSet_3.member(LA(1))) && (_tokenSet_26.member(LA(2))))) {
1303 int _m37 = mark();
1304 synPredMatched37 = true;
1305 inputState.guessing++;
1306 try {
1307 {
1308 constExpr();
1309 match(VARARGS);
1310 }
1311 }
1312 catch (RecognitionException pe) {
1313 synPredMatched37 = false;
1314 }
1315 rewind(_m37);
1316inputState.guessing--;
1317 }
1318 if ( synPredMatched37 ) {
1319 rangeExpr();
1320 astFactory.addASTChild(currentAST, returnAST);
1321 }
1322 else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_27.member(LA(2)))) {
1323 constExpr();
1324 astFactory.addASTChild(currentAST, returnAST);
1325 }
1326 else {
1327 throw new NoViableAltException(LT(1), getFilename());
1328 }
1329
1330 }
1331 TNode tmp24_AST = null;
1332 tmp24_AST = (TNode)astFactory.create(LT(1));
1333 astFactory.addASTChild(currentAST, tmp24_AST);
1334 match(RBRACKET);
1335 {
1336 switch ( LA(1)) {
1337 case ASSIGN:
1338 {
1339 TNode tmp25_AST = null;
1340 tmp25_AST = (TNode)astFactory.create(LT(1));
1341 astFactory.addASTChild(currentAST, tmp25_AST);
1342 match(ASSIGN);
1343 break;
1344 }
1345 case LITERAL_asm:
1346 case LCURLY:
1347 case ID:
1348 case STAR:
1349 case LPAREN:
1350 case LAND:
1351 case BAND:
1352 case PLUS:
1353 case MINUS:
1354 case INC:
1355 case DEC:
1356 case LITERAL_sizeof:
1357 case BNOT:
1358 case LNOT:
1359 case CharLiteral:
1360 case StringLiteral:
1361 case Number:
1362 case LITERAL___alignof:
1363 case LITERAL___real:
1364 case LITERAL___imag:
1365 {
1366 break;
1367 }
1368 default:
1369 {
1370 throw new NoViableAltException(LT(1), getFilename());
1371 }
1372 }
1373 }
1374 }
1375 break;
1376 }
1377 case ID:
1378 {
1379 TNode tmp26_AST = null;
1380 tmp26_AST = (TNode)astFactory.create(LT(1));
1381 astFactory.addASTChild(currentAST, tmp26_AST);
1382 match(ID);
1383 TNode tmp27_AST = null;
1384 tmp27_AST = (TNode)astFactory.create(LT(1));
1385 astFactory.addASTChild(currentAST, tmp27_AST);
1386 match(COLON);
1387 break;
1388 }
1389 case DOT:
1390 {
1391 TNode tmp28_AST = null;
1392 tmp28_AST = (TNode)astFactory.create(LT(1));
1393 astFactory.addASTChild(currentAST, tmp28_AST);
1394 match(DOT);
1395 TNode tmp29_AST = null;
1396 tmp29_AST = (TNode)astFactory.create(LT(1));
1397 astFactory.addASTChild(currentAST, tmp29_AST);
1398 match(ID);
1399 TNode tmp30_AST = null;
1400 tmp30_AST = (TNode)astFactory.create(LT(1));
1401 astFactory.addASTChild(currentAST, tmp30_AST);
1402 match(ASSIGN);
1403 break;
1404 }
1405 default:
1406 {
1407 throw new NoViableAltException(LT(1), getFilename());
1408 }
1409 }
1410 }
1411 if ( inputState.guessing==0 ) {
1412 initializerElementLabel_AST = (TNode)currentAST.root;
1413 initializerElementLabel_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NInitializerElementLabel)).add(initializerElementLabel_AST)) ;
1414 currentAST.root = initializerElementLabel_AST;
1415 currentAST.child = initializerElementLabel_AST!=null &&initializerElementLabel_AST.getFirstChild()!=null ?
1416 initializerElementLabel_AST.getFirstChild() : initializerElementLabel_AST;
1417 currentAST.advanceChildToEnd();
1418 }
1419 initializerElementLabel_AST = (TNode)currentAST.root;
1420 }
1421 catch (RecognitionException ex) {
1422 if (inputState.guessing==0) {
1423 reportError(ex);
1424 recover(ex,_tokenSet_22);
1425 } else {
1426 throw ex;
1427 }
1428 }
1429 returnAST = initializerElementLabel_AST;
1430 }
1431
1432 public final void assignExpr() throws RecognitionException, TokenStreamException {
1433
1434 returnAST = null;
1435 ASTPair currentAST = new ASTPair();
1436 TNode assignExpr_AST = null;
1437 TNode a_AST = null;
1438
1439 try { // for error handling
1441 astFactory.addASTChild(currentAST, returnAST);
1442 {
1443 switch ( LA(1)) {
1444 case ASSIGN:
1445 case DIV_ASSIGN:
1446 case PLUS_ASSIGN:
1447 case MINUS_ASSIGN:
1448 case STAR_ASSIGN:
1449 case MOD_ASSIGN:
1450 case RSHIFT_ASSIGN:
1451 case LSHIFT_ASSIGN:
1452 case BAND_ASSIGN:
1453 case BOR_ASSIGN:
1454 case BXOR_ASSIGN:
1455 {
1457 a_AST = (TNode)returnAST;
1458 assignExpr();
1459 astFactory.addASTChild(currentAST, returnAST);
1460 if ( inputState.guessing==0 ) {
1461 assignExpr_AST = (TNode)currentAST.root;
1462 assignExpr_AST = (TNode)astFactory.make( (new ASTArray(2)).add(a_AST).add(assignExpr_AST));
1463 currentAST.root = assignExpr_AST;
1464 currentAST.child = assignExpr_AST!=null &&assignExpr_AST.getFirstChild()!=null ?
1465 assignExpr_AST.getFirstChild() : assignExpr_AST;
1466 currentAST.advanceChildToEnd();
1467 }
1468 break;
1469 }
1470 case RCURLY:
1471 case SEMI:
1472 case COMMA:
1473 case COLON:
1474 case RPAREN:
1475 case RBRACKET:
1476 {
1477 break;
1478 }
1479 default:
1480 {
1481 throw new NoViableAltException(LT(1), getFilename());
1482 }
1483 }
1484 }
1485 assignExpr_AST = (TNode)currentAST.root;
1486 }
1487 catch (RecognitionException ex) {
1488 if (inputState.guessing==0) {
1489 reportError(ex);
1490 recover(ex,_tokenSet_4);
1491 } else {
1492 throw ex;
1493 }
1494 }
1495 returnAST = assignExpr_AST;
1496 }
1497
1498 public final void lcurlyInitializer() throws RecognitionException, TokenStreamException {
1499
1500 returnAST = null;
1501 ASTPair currentAST = new ASTPair();
1502 TNode lcurlyInitializer_AST = null;
1503
1504 try { // for error handling
1505 TNode tmp31_AST = null;
1506 tmp31_AST = (TNode)astFactory.create(LT(1));
1507 astFactory.makeASTRoot(currentAST, tmp31_AST);
1508 match(LCURLY);
1509 {
1510 switch ( LA(1)) {
1511 case LITERAL_asm:
1512 case LCURLY:
1513 case ID:
1514 case STAR:
1515 case LPAREN:
1516 case LBRACKET:
1517 case LAND:
1518 case BAND:
1519 case PLUS:
1520 case MINUS:
1521 case INC:
1522 case DEC:
1523 case LITERAL_sizeof:
1524 case BNOT:
1525 case LNOT:
1526 case DOT:
1527 case CharLiteral:
1528 case StringLiteral:
1529 case Number:
1530 case LITERAL___alignof:
1531 case LITERAL___real:
1532 case LITERAL___imag:
1533 {
1535 astFactory.addASTChild(currentAST, returnAST);
1536 {
1537 switch ( LA(1)) {
1538 case COMMA:
1539 {
1540 match(COMMA);
1541 break;
1542 }
1543 case RCURLY:
1544 {
1545 break;
1546 }
1547 default:
1548 {
1549 throw new NoViableAltException(LT(1), getFilename());
1550 }
1551 }
1552 }
1553 break;
1554 }
1555 case RCURLY:
1556 {
1557 break;
1558 }
1559 default:
1560 {
1561 throw new NoViableAltException(LT(1), getFilename());
1562 }
1563 }
1564 }
1565 TNode tmp33_AST = null;
1566 tmp33_AST = (TNode)astFactory.create(LT(1));
1567 astFactory.addASTChild(currentAST, tmp33_AST);
1568 match(RCURLY);
1569 if ( inputState.guessing==0 ) {
1570 lcurlyInitializer_AST = (TNode)currentAST.root;
1571 lcurlyInitializer_AST.setType( NLcurlyInitializer );
1572 }
1573 lcurlyInitializer_AST = (TNode)currentAST.root;
1574 }
1575 catch (RecognitionException ex) {
1576 if (inputState.guessing==0) {
1577 reportError(ex);
1578 recover(ex,_tokenSet_28);
1579 } else {
1580 throw ex;
1581 }
1582 }
1583 returnAST = lcurlyInitializer_AST;
1584 }
1585
1586 public final void constExpr() throws RecognitionException, TokenStreamException {
1587
1588 returnAST = null;
1589 ASTPair currentAST = new ASTPair();
1590 TNode constExpr_AST = null;
1591
1592 try { // for error handling
1594 astFactory.addASTChild(currentAST, returnAST);
1595 constExpr_AST = (TNode)currentAST.root;
1596 }
1597 catch (RecognitionException ex) {
1598 if (inputState.guessing==0) {
1599 reportError(ex);
1600 recover(ex,_tokenSet_29);
1601 } else {
1602 throw ex;
1603 }
1604 }
1605 returnAST = constExpr_AST;
1606 }
1607
1608 public final void rangeExpr() throws RecognitionException, TokenStreamException {
1609
1610 returnAST = null;
1611 ASTPair currentAST = new ASTPair();
1612 TNode rangeExpr_AST = null;
1613
1614 try { // for error handling
1615 constExpr();
1616 astFactory.addASTChild(currentAST, returnAST);
1617 TNode tmp34_AST = null;
1618 tmp34_AST = (TNode)astFactory.create(LT(1));
1619 astFactory.addASTChild(currentAST, tmp34_AST);
1620 match(VARARGS);
1621 constExpr();
1622 astFactory.addASTChild(currentAST, returnAST);
1623 if ( inputState.guessing==0 ) {
1624 rangeExpr_AST = (TNode)currentAST.root;
1625 rangeExpr_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NRangeExpr)).add(rangeExpr_AST));
1626 currentAST.root = rangeExpr_AST;
1627 currentAST.child = rangeExpr_AST!=null &&rangeExpr_AST.getFirstChild()!=null ?
1628 rangeExpr_AST.getFirstChild() : rangeExpr_AST;
1629 currentAST.advanceChildToEnd();
1630 }
1631 rangeExpr_AST = (TNode)currentAST.root;
1632 }
1633 catch (RecognitionException ex) {
1634 if (inputState.guessing==0) {
1635 reportError(ex);
1636 recover(ex,_tokenSet_30);
1637 } else {
1638 throw ex;
1639 }
1640 }
1641 returnAST = rangeExpr_AST;
1642 }
1643
1644 public final void initializerList() throws RecognitionException, TokenStreamException {
1645
1646 returnAST = null;
1647 ASTPair currentAST = new ASTPair();
1648 TNode initializerList_AST = null;
1649
1650 try { // for error handling
1651 initializer();
1652 astFactory.addASTChild(currentAST, returnAST);
1653 {
1654 _loop44:
1655 do {
1656 if ((LA(1)==COMMA) && (_tokenSet_18.member(LA(2)))) {
1657 match(COMMA);
1658 initializer();
1659 astFactory.addASTChild(currentAST, returnAST);
1660 }
1661 else {
1662 break _loop44;
1663 }
1664
1665 } while (true);
1666 }
1667 initializerList_AST = (TNode)currentAST.root;
1668 }
1669 catch (RecognitionException ex) {
1670 if (inputState.guessing==0) {
1671 reportError(ex);
1672 recover(ex,_tokenSet_31);
1673 } else {
1674 throw ex;
1675 }
1676 }
1677 returnAST = initializerList_AST;
1678 }
1679
1680 public final void pointerGroup() throws RecognitionException, TokenStreamException {
1681
1682 returnAST = null;
1683 ASTPair currentAST = new ASTPair();
1684 TNode pointerGroup_AST = null;
1685
1686 try { // for error handling
1687 {
1688 int _cnt233=0;
1689 _loop233:
1690 do {
1691 if ((LA(1)==STAR)) {
1692 TNode tmp36_AST = null;
1693 tmp36_AST = (TNode)astFactory.create(LT(1));
1694 astFactory.addASTChild(currentAST, tmp36_AST);
1695 match(STAR);
1696 {
1697 _loop232:
1698 do {
1699 if ((LA(1)==LITERAL_volatile||LA(1)==LITERAL_const)) {
1700 typeQualifier();
1701 astFactory.addASTChild(currentAST, returnAST);
1702 }
1703 else {
1704 break _loop232;
1705 }
1706
1707 } while (true);
1708 }
1709 }
1710 else {
1711 if ( _cnt233>=1 ) { break _loop233; } else {throw new NoViableAltException(LT(1), getFilename());}
1712 }
1713
1714 _cnt233++;
1715 } while (true);
1716 }
1717 if ( inputState.guessing==0 ) {
1718 pointerGroup_AST = (TNode)currentAST.root;
1719 pointerGroup_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NPointerGroup)).add(pointerGroup_AST));
1720 currentAST.root = pointerGroup_AST;
1721 currentAST.child = pointerGroup_AST!=null &&pointerGroup_AST.getFirstChild()!=null ?
1722 pointerGroup_AST.getFirstChild() : pointerGroup_AST;
1723 currentAST.advanceChildToEnd();
1724 }
1725 pointerGroup_AST = (TNode)currentAST.root;
1726 }
1727 catch (RecognitionException ex) {
1728 if (inputState.guessing==0) {
1729 reportError(ex);
1730 recover(ex,_tokenSet_32);
1731 } else {
1732 throw ex;
1733 }
1734 }
1735 returnAST = pointerGroup_AST;
1736 }
1737
1738 public final void declaratorParamaterList(
1739 boolean isFunctionDefinition, String declName
1740 ) throws RecognitionException, TokenStreamException {
1741
1742 returnAST = null;
1743 ASTPair currentAST = new ASTPair();
1744 TNode declaratorParamaterList_AST = null;
1745
1746 try { // for error handling
1747 TNode tmp37_AST = null;
1748 tmp37_AST = (TNode)astFactory.create(LT(1));
1749 astFactory.makeASTRoot(currentAST, tmp37_AST);
1750 match(LPAREN);
1751 if ( inputState.guessing==0 ) {
1752
1753 if (isFunctionDefinition) {
1754 pushScope(declName);
1755 }
1756 else {
1757 pushScope("!"+declName);
1758 }
1759
1760 }
1761 {
1762 boolean synPredMatched54 = false;
1763 if (((_tokenSet_6.member(LA(1))) && (_tokenSet_33.member(LA(2))))) {
1764 int _m54 = mark();
1765 synPredMatched54 = true;
1766 inputState.guessing++;
1767 try {
1768 {
1770 }
1771 }
1772 catch (RecognitionException pe) {
1773 synPredMatched54 = false;
1774 }
1775 rewind(_m54);
1776inputState.guessing--;
1777 }
1778 if ( synPredMatched54 ) {
1780 astFactory.addASTChild(currentAST, returnAST);
1781 }
1782 else if ((_tokenSet_34.member(LA(1))) && (_tokenSet_35.member(LA(2)))) {
1783 {
1784 switch ( LA(1)) {
1785 case ID:
1786 {
1787 idList();
1788 astFactory.addASTChild(currentAST, returnAST);
1789 break;
1790 }
1791 case COMMA:
1792 case RPAREN:
1793 {
1794 break;
1795 }
1796 default:
1797 {
1798 throw new NoViableAltException(LT(1), getFilename());
1799 }
1800 }
1801 }
1802 }
1803 else {
1804 throw new NoViableAltException(LT(1), getFilename());
1805 }
1806
1807 }
1808 if ( inputState.guessing==0 ) {
1809
1810 popScope();
1811
1812 }
1813 {
1814 switch ( LA(1)) {
1815 case COMMA:
1816 {
1817 match(COMMA);
1818 break;
1819 }
1820 case RPAREN:
1821 {
1822 break;
1823 }
1824 default:
1825 {
1826 throw new NoViableAltException(LT(1), getFilename());
1827 }
1828 }
1829 }
1830 TNode tmp39_AST = null;
1831 tmp39_AST = (TNode)astFactory.create(LT(1));
1832 astFactory.addASTChild(currentAST, tmp39_AST);
1833 match(RPAREN);
1834 if ( inputState.guessing==0 ) {
1835 declaratorParamaterList_AST = (TNode)currentAST.root;
1836 declaratorParamaterList_AST.setType(NParameterTypeList);
1837 }
1838 declaratorParamaterList_AST = (TNode)currentAST.root;
1839 }
1840 catch (RecognitionException ex) {
1841 if (inputState.guessing==0) {
1842 reportError(ex);
1843 recover(ex,_tokenSet_35);
1844 } else {
1845 throw ex;
1846 }
1847 }
1848 returnAST = declaratorParamaterList_AST;
1849 }
1850
1851 public final void declSpecifiers() throws RecognitionException, TokenStreamException {
1852
1853 returnAST = null;
1854 ASTPair currentAST = new ASTPair();
1855 TNode declSpecifiers_AST = null;
1856 TNode s_AST = null;
1857 int specCount=0;
1858
1859 try { // for error handling
1860 {
1861 int _cnt214=0;
1862 _loop214:
1863 do {
1864 switch ( LA(1)) {
1865 case LITERAL_typedef:
1866 case LITERAL_auto:
1867 case LITERAL_register:
1868 case LITERAL_extern:
1869 case LITERAL_static:
1870 case LITERAL_inline:
1871 {
1873 s_AST = (TNode)returnAST;
1874 astFactory.addASTChild(currentAST, returnAST);
1875 break;
1876 }
1877 case LITERAL_volatile:
1878 case LITERAL_const:
1879 {
1880 typeQualifier();
1881 astFactory.addASTChild(currentAST, returnAST);
1882 break;
1883 }
1884 default:
1885 boolean synPredMatched213 = false;
1886 if (((_tokenSet_15.member(LA(1))) && (_tokenSet_33.member(LA(2))))) {
1887 int _m213 = mark();
1888 synPredMatched213 = true;
1889 inputState.guessing++;
1890 try {
1891 {
1892 if ((LA(1)==LITERAL_struct) && (true)) {
1894 }
1895 else if ((LA(1)==LITERAL_union) && (true)) {
1897 }
1898 else if ((LA(1)==LITERAL_enum) && (true)) {
1900 }
1901 else if ((_tokenSet_15.member(LA(1))) && (true)) {
1902 typeSpecifier(specCount);
1903 }
1904 else {
1905 throw new NoViableAltException(LT(1), getFilename());
1906 }
1907
1908 }
1909 }
1910 catch (RecognitionException pe) {
1911 synPredMatched213 = false;
1912 }
1913 rewind(_m213);
1914inputState.guessing--;
1915 }
1916 if ( synPredMatched213 ) {
1917 specCount=typeSpecifier(specCount);
1918 astFactory.addASTChild(currentAST, returnAST);
1919 }
1920 else {
1921 if ( _cnt214>=1 ) { break _loop214; } else {throw new NoViableAltException(LT(1), getFilename());}
1922 }
1923 }
1924 _cnt214++;
1925 } while (true);
1926 }
1927 declSpecifiers_AST = (TNode)currentAST.root;
1928 }
1929 catch (RecognitionException ex) {
1930 if (inputState.guessing==0) {
1931 reportError(ex);
1932 recover(ex,_tokenSet_36);
1933 } else {
1934 throw ex;
1935 }
1936 }
1937 returnAST = declSpecifiers_AST;
1938 }
1939
1940 public final void parameterTypeList() throws RecognitionException, TokenStreamException {
1941
1942 returnAST = null;
1943 ASTPair currentAST = new ASTPair();
1944 TNode parameterTypeList_AST = null;
1945
1946 try { // for error handling
1948 astFactory.addASTChild(currentAST, returnAST);
1949 {
1950 _loop60:
1951 do {
1952 if ((LA(1)==SEMI||LA(1)==COMMA) && (_tokenSet_6.member(LA(2)))) {
1953 {
1954 switch ( LA(1)) {
1955 case COMMA:
1956 {
1957 TNode tmp40_AST = null;
1958 tmp40_AST = (TNode)astFactory.create(LT(1));
1959 astFactory.addASTChild(currentAST, tmp40_AST);
1960 match(COMMA);
1961 break;
1962 }
1963 case SEMI:
1964 {
1965 TNode tmp41_AST = null;
1966 tmp41_AST = (TNode)astFactory.create(LT(1));
1967 astFactory.addASTChild(currentAST, tmp41_AST);
1968 match(SEMI);
1969 break;
1970 }
1971 default:
1972 {
1973 throw new NoViableAltException(LT(1), getFilename());
1974 }
1975 }
1976 }
1978 astFactory.addASTChild(currentAST, returnAST);
1979 }
1980 else {
1981 break _loop60;
1982 }
1983
1984 } while (true);
1985 }
1986 {
1987 if ((LA(1)==SEMI||LA(1)==COMMA) && (LA(2)==VARARGS)) {
1988 {
1989 switch ( LA(1)) {
1990 case COMMA:
1991 {
1992 TNode tmp42_AST = null;
1993 tmp42_AST = (TNode)astFactory.create(LT(1));
1994 astFactory.addASTChild(currentAST, tmp42_AST);
1995 match(COMMA);
1996 break;
1997 }
1998 case SEMI:
1999 {
2000 TNode tmp43_AST = null;
2001 tmp43_AST = (TNode)astFactory.create(LT(1));
2002 astFactory.addASTChild(currentAST, tmp43_AST);
2003 match(SEMI);
2004 break;
2005 }
2006 default:
2007 {
2008 throw new NoViableAltException(LT(1), getFilename());
2009 }
2010 }
2011 }
2012 TNode tmp44_AST = null;
2013 tmp44_AST = (TNode)astFactory.create(LT(1));
2014 astFactory.addASTChild(currentAST, tmp44_AST);
2015 match(VARARGS);
2016 }
2017 else if ((LA(1)==COMMA||LA(1)==RPAREN) && (_tokenSet_35.member(LA(2)))) {
2018 }
2019 else {
2020 throw new NoViableAltException(LT(1), getFilename());
2021 }
2022
2023 }
2024 parameterTypeList_AST = (TNode)currentAST.root;
2025 }
2026 catch (RecognitionException ex) {
2027 if (inputState.guessing==0) {
2028 reportError(ex);
2029 recover(ex,_tokenSet_5);
2030 } else {
2031 throw ex;
2032 }
2033 }
2034 returnAST = parameterTypeList_AST;
2035 }
2036
2037 public final void parameterDeclaration() throws RecognitionException, TokenStreamException {
2038
2039 returnAST = null;
2040 ASTPair currentAST = new ASTPair();
2041 TNode parameterDeclaration_AST = null;
2042 TNode ds_AST = null;
2043 TNode d_AST = null;
2044 String declName;
2045
2046 try { // for error handling
2048 ds_AST = (TNode)returnAST;
2049 astFactory.addASTChild(currentAST, returnAST);
2050 {
2051 boolean synPredMatched237 = false;
2052 if (((_tokenSet_10.member(LA(1))) && (_tokenSet_37.member(LA(2))))) {
2053 int _m237 = mark();
2054 synPredMatched237 = true;
2055 inputState.guessing++;
2056 try {
2057 {
2058 declarator(false);
2059 }
2060 }
2061 catch (RecognitionException pe) {
2062 synPredMatched237 = false;
2063 }
2064 rewind(_m237);
2065inputState.guessing--;
2066 }
2067 if ( synPredMatched237 ) {
2068 declName=declarator(false);
2069 d_AST = (TNode)returnAST;
2070 astFactory.addASTChild(currentAST, returnAST);
2071 if ( inputState.guessing==0 ) {
2072
2073 AST d2, ds2;
2074 d2 = astFactory.dupList(d_AST);
2075 ds2 = astFactory.dupList(ds_AST);
2076 symbolTable.add(declName, (TNode)astFactory.make( (new ASTArray(3)).add(null).add(ds2).add(d2)));
2077
2078 }
2079 }
2080 else if ((_tokenSet_38.member(LA(1))) && (_tokenSet_39.member(LA(2)))) {
2082 astFactory.addASTChild(currentAST, returnAST);
2083 }
2084 else if ((_tokenSet_40.member(LA(1)))) {
2085 }
2086 else {
2087 throw new NoViableAltException(LT(1), getFilename());
2088 }
2089
2090 }
2091 if ( inputState.guessing==0 ) {
2092 parameterDeclaration_AST = (TNode)currentAST.root;
2093
2094 parameterDeclaration_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NParameterDeclaration)).add(parameterDeclaration_AST));
2095
2096 currentAST.root = parameterDeclaration_AST;
2097 currentAST.child = parameterDeclaration_AST!=null &&parameterDeclaration_AST.getFirstChild()!=null ?
2098 parameterDeclaration_AST.getFirstChild() : parameterDeclaration_AST;
2099 currentAST.advanceChildToEnd();
2100 }
2101 parameterDeclaration_AST = (TNode)currentAST.root;
2102 }
2103 catch (RecognitionException ex) {
2104 if (inputState.guessing==0) {
2105 reportError(ex);
2106 recover(ex,_tokenSet_40);
2107 } else {
2108 throw ex;
2109 }
2110 }
2111 returnAST = parameterDeclaration_AST;
2112 }
2113
2114 public final void declarationList() throws RecognitionException, TokenStreamException {
2115
2116 returnAST = null;
2117 ASTPair currentAST = new ASTPair();
2118 TNode declarationList_AST = null;
2119
2120 try { // for error handling
2121 {
2122 int _cnt67=0;
2123 _loop67:
2124 do {
2125 if ((LA(1)==LITERAL___label__) && (LA(2)==ID)) {
2127 astFactory.addASTChild(currentAST, returnAST);
2128 }
2129 else {
2130 boolean synPredMatched66 = false;
2131 if (((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2))))) {
2132 int _m66 = mark();
2133 synPredMatched66 = true;
2134 inputState.guessing++;
2135 try {
2136 {
2138 }
2139 }
2140 catch (RecognitionException pe) {
2141 synPredMatched66 = false;
2142 }
2143 rewind(_m66);
2144inputState.guessing--;
2145 }
2146 if ( synPredMatched66 ) {
2147 declaration();
2148 astFactory.addASTChild(currentAST, returnAST);
2149 }
2150 else {
2151 if ( _cnt67>=1 ) { break _loop67; } else {throw new NoViableAltException(LT(1), getFilename());}
2152 }
2153 }
2154 _cnt67++;
2155 } while (true);
2156 }
2157 declarationList_AST = (TNode)currentAST.root;
2158 }
2159 catch (RecognitionException ex) {
2160 if (inputState.guessing==0) {
2161 reportError(ex);
2162 recover(ex,_tokenSet_41);
2163 } else {
2164 throw ex;
2165 }
2166 }
2167 returnAST = declarationList_AST;
2168 }
2169
2170 public final void localLabelDeclaration() throws RecognitionException, TokenStreamException {
2171
2172 returnAST = null;
2173 ASTPair currentAST = new ASTPair();
2174 TNode localLabelDeclaration_AST = null;
2175
2176 try { // for error handling
2177 {
2178 TNode tmp45_AST = null;
2179 tmp45_AST = (TNode)astFactory.create(LT(1));
2180 astFactory.makeASTRoot(currentAST, tmp45_AST);
2182 TNode tmp46_AST = null;
2183 tmp46_AST = (TNode)astFactory.create(LT(1));
2184 astFactory.addASTChild(currentAST, tmp46_AST);
2185 match(ID);
2186 {
2187 _loop71:
2188 do {
2189 if ((LA(1)==COMMA) && (LA(2)==ID)) {
2190 match(COMMA);
2191 TNode tmp48_AST = null;
2192 tmp48_AST = (TNode)astFactory.create(LT(1));
2193 astFactory.addASTChild(currentAST, tmp48_AST);
2194 match(ID);
2195 }
2196 else {
2197 break _loop71;
2198 }
2199
2200 } while (true);
2201 }
2202 {
2203 switch ( LA(1)) {
2204 case COMMA:
2205 {
2206 match(COMMA);
2207 break;
2208 }
2209 case SEMI:
2210 {
2211 break;
2212 }
2213 default:
2214 {
2215 throw new NoViableAltException(LT(1), getFilename());
2216 }
2217 }
2218 }
2219 {
2220 int _cnt74=0;
2221 _loop74:
2222 do {
2223 if ((LA(1)==SEMI) && (_tokenSet_41.member(LA(2)))) {
2224 match(SEMI);
2225 }
2226 else {
2227 if ( _cnt74>=1 ) { break _loop74; } else {throw new NoViableAltException(LT(1), getFilename());}
2228 }
2229
2230 _cnt74++;
2231 } while (true);
2232 }
2233 }
2234 localLabelDeclaration_AST = (TNode)currentAST.root;
2235 }
2236 catch (RecognitionException ex) {
2237 if (inputState.guessing==0) {
2238 reportError(ex);
2239 recover(ex,_tokenSet_41);
2240 } else {
2241 throw ex;
2242 }
2243 }
2244 returnAST = localLabelDeclaration_AST;
2245 }
2246
2247 public final void declarationPredictor() throws RecognitionException, TokenStreamException {
2248
2249 returnAST = null;
2250 ASTPair currentAST = new ASTPair();
2251 TNode declarationPredictor_AST = null;
2252
2253 try { // for error handling
2254 {
2255 if ((LA(1)==LITERAL_typedef) && (LA(2)==EOF)) {
2256 TNode tmp51_AST = null;
2257 tmp51_AST = (TNode)astFactory.create(LT(1));
2258 astFactory.addASTChild(currentAST, tmp51_AST);
2260 }
2261 else if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
2262 declaration();
2263 astFactory.addASTChild(currentAST, returnAST);
2264 }
2265 else {
2266 throw new NoViableAltException(LT(1), getFilename());
2267 }
2268
2269 }
2270 declarationPredictor_AST = (TNode)currentAST.root;
2271 }
2272 catch (RecognitionException ex) {
2273 if (inputState.guessing==0) {
2274 reportError(ex);
2275 recover(ex,_tokenSet_0);
2276 } else {
2277 throw ex;
2278 }
2279 }
2280 returnAST = declarationPredictor_AST;
2281 }
2282
2283 public final void functionStorageClassSpecifier() throws RecognitionException, TokenStreamException {
2284
2285 returnAST = null;
2286 ASTPair currentAST = new ASTPair();
2287 TNode functionStorageClassSpecifier_AST = null;
2288
2289 try { // for error handling
2290 switch ( LA(1)) {
2291 case LITERAL_extern:
2292 {
2293 TNode tmp52_AST = null;
2294 tmp52_AST = (TNode)astFactory.create(LT(1));
2295 astFactory.addASTChild(currentAST, tmp52_AST);
2297 functionStorageClassSpecifier_AST = (TNode)currentAST.root;
2298 break;
2299 }
2300 case LITERAL_static:
2301 {
2302 TNode tmp53_AST = null;
2303 tmp53_AST = (TNode)astFactory.create(LT(1));
2304 astFactory.addASTChild(currentAST, tmp53_AST);
2306 functionStorageClassSpecifier_AST = (TNode)currentAST.root;
2307 break;
2308 }
2309 case LITERAL_inline:
2310 {
2311 TNode tmp54_AST = null;
2312 tmp54_AST = (TNode)astFactory.create(LT(1));
2313 astFactory.addASTChild(currentAST, tmp54_AST);
2315 functionStorageClassSpecifier_AST = (TNode)currentAST.root;
2316 break;
2317 }
2318 default:
2319 {
2320 throw new NoViableAltException(LT(1), getFilename());
2321 }
2322 }
2323 }
2324 catch (RecognitionException ex) {
2325 if (inputState.guessing==0) {
2326 reportError(ex);
2327 recover(ex,_tokenSet_42);
2328 } else {
2329 throw ex;
2330 }
2331 }
2332 returnAST = functionStorageClassSpecifier_AST;
2333 }
2334
2335 public final int typeSpecifier(
2336 int specCount
2337 ) throws RecognitionException, TokenStreamException {
2338 int retSpecCount;
2339
2340 returnAST = null;
2341 ASTPair currentAST = new ASTPair();
2342 TNode typeSpecifier_AST = null;
2343 retSpecCount = specCount + 1;
2344
2345 try { // for error handling
2346 {
2347 switch ( LA(1)) {
2348 case LITERAL_void:
2349 {
2350 TNode tmp55_AST = null;
2351 tmp55_AST = (TNode)astFactory.create(LT(1));
2352 astFactory.addASTChild(currentAST, tmp55_AST);
2354 break;
2355 }
2356 case LITERAL_char:
2357 {
2358 TNode tmp56_AST = null;
2359 tmp56_AST = (TNode)astFactory.create(LT(1));
2360 astFactory.addASTChild(currentAST, tmp56_AST);
2362 break;
2363 }
2364 case LITERAL_short:
2365 {
2366 TNode tmp57_AST = null;
2367 tmp57_AST = (TNode)astFactory.create(LT(1));
2368 astFactory.addASTChild(currentAST, tmp57_AST);
2370 break;
2371 }
2372 case LITERAL_int:
2373 {
2374 TNode tmp58_AST = null;
2375 tmp58_AST = (TNode)astFactory.create(LT(1));
2376 astFactory.addASTChild(currentAST, tmp58_AST);
2378 break;
2379 }
2380 case LITERAL_long:
2381 {
2382 TNode tmp59_AST = null;
2383 tmp59_AST = (TNode)astFactory.create(LT(1));
2384 astFactory.addASTChild(currentAST, tmp59_AST);
2386 break;
2387 }
2388 case LITERAL_float:
2389 {
2390 TNode tmp60_AST = null;
2391 tmp60_AST = (TNode)astFactory.create(LT(1));
2392 astFactory.addASTChild(currentAST, tmp60_AST);
2394 break;
2395 }
2396 case LITERAL_double:
2397 {
2398 TNode tmp61_AST = null;
2399 tmp61_AST = (TNode)astFactory.create(LT(1));
2400 astFactory.addASTChild(currentAST, tmp61_AST);
2402 break;
2403 }
2404 case LITERAL_signed:
2405 {
2406 TNode tmp62_AST = null;
2407 tmp62_AST = (TNode)astFactory.create(LT(1));
2408 astFactory.addASTChild(currentAST, tmp62_AST);
2410 break;
2411 }
2412 case LITERAL_unsigned:
2413 {
2414 TNode tmp63_AST = null;
2415 tmp63_AST = (TNode)astFactory.create(LT(1));
2416 astFactory.addASTChild(currentAST, tmp63_AST);
2418 break;
2419 }
2420 case 27:
2421 {
2422 TNode tmp64_AST = null;
2423 tmp64_AST = (TNode)astFactory.create(LT(1));
2424 astFactory.addASTChild(currentAST, tmp64_AST);
2425 match(27);
2426 break;
2427 }
2428 case 28:
2429 {
2430 TNode tmp65_AST = null;
2431 tmp65_AST = (TNode)astFactory.create(LT(1));
2432 astFactory.addASTChild(currentAST, tmp65_AST);
2433 match(28);
2434 break;
2435 }
2436 case 29:
2437 {
2438 TNode tmp66_AST = null;
2439 tmp66_AST = (TNode)astFactory.create(LT(1));
2440 astFactory.addASTChild(currentAST, tmp66_AST);
2441 match(29);
2442 break;
2443 }
2444 case 30:
2445 {
2446 TNode tmp67_AST = null;
2447 tmp67_AST = (TNode)astFactory.create(LT(1));
2448 astFactory.addASTChild(currentAST, tmp67_AST);
2449 match(30);
2450 break;
2451 }
2452 case 31:
2453 {
2454 TNode tmp68_AST = null;
2455 tmp68_AST = (TNode)astFactory.create(LT(1));
2456 astFactory.addASTChild(currentAST, tmp68_AST);
2457 match(31);
2458 break;
2459 }
2460 case 32:
2461 {
2462 TNode tmp69_AST = null;
2463 tmp69_AST = (TNode)astFactory.create(LT(1));
2464 astFactory.addASTChild(currentAST, tmp69_AST);
2465 match(32);
2466 break;
2467 }
2468 case LITERAL_wchar_t:
2469 {
2470 TNode tmp70_AST = null;
2471 tmp70_AST = (TNode)astFactory.create(LT(1));
2472 astFactory.addASTChild(currentAST, tmp70_AST);
2474 break;
2475 }
2476 case 34:
2477 {
2478 TNode tmp71_AST = null;
2479 tmp71_AST = (TNode)astFactory.create(LT(1));
2480 astFactory.addASTChild(currentAST, tmp71_AST);
2481 match(34);
2482 break;
2483 }
2484 case 35:
2485 {
2486 TNode tmp72_AST = null;
2487 tmp72_AST = (TNode)astFactory.create(LT(1));
2488 astFactory.addASTChild(currentAST, tmp72_AST);
2489 match(35);
2490 break;
2491 }
2492 case 36:
2493 {
2494 TNode tmp73_AST = null;
2495 tmp73_AST = (TNode)astFactory.create(LT(1));
2496 astFactory.addASTChild(currentAST, tmp73_AST);
2497 match(36);
2498 break;
2499 }
2500 case 37:
2501 {
2502 TNode tmp74_AST = null;
2503 tmp74_AST = (TNode)astFactory.create(LT(1));
2504 astFactory.addASTChild(currentAST, tmp74_AST);
2505 match(37);
2506 break;
2507 }
2508 case LITERAL_ptrdiff_t:
2509 {
2510 TNode tmp75_AST = null;
2511 tmp75_AST = (TNode)astFactory.create(LT(1));
2512 astFactory.addASTChild(currentAST, tmp75_AST);
2514 break;
2515 }
2516 case LITERAL_intptr_t:
2517 {
2518 TNode tmp76_AST = null;
2519 tmp76_AST = (TNode)astFactory.create(LT(1));
2520 astFactory.addASTChild(currentAST, tmp76_AST);
2522 break;
2523 }
2524 case LITERAL_size_t:
2525 {
2526 TNode tmp77_AST = null;
2527 tmp77_AST = (TNode)astFactory.create(LT(1));
2528 astFactory.addASTChild(currentAST, tmp77_AST);
2530 break;
2531 }
2532 case LITERAL_uintptr_t:
2533 {
2534 TNode tmp78_AST = null;
2535 tmp78_AST = (TNode)astFactory.create(LT(1));
2536 astFactory.addASTChild(currentAST, tmp78_AST);
2538 break;
2539 }
2540 case LITERAL_struct:
2541 case LITERAL_union:
2542 {
2544 astFactory.addASTChild(currentAST, returnAST);
2545 {
2546 _loop83:
2547 do {
2548 if ((LA(1)==LITERAL_asm||LA(1)==LITERAL___attribute) && (LA(2)==LPAREN)) {
2549 attributeDecl();
2550 astFactory.addASTChild(currentAST, returnAST);
2551 }
2552 else {
2553 break _loop83;
2554 }
2555
2556 } while (true);
2557 }
2558 break;
2559 }
2560 case LITERAL_enum:
2561 {
2562 enumSpecifier();
2563 astFactory.addASTChild(currentAST, returnAST);
2564 break;
2565 }
2566 case LITERAL_typeof:
2567 {
2568 TNode tmp79_AST = null;
2569 tmp79_AST = (TNode)astFactory.create(LT(1));
2570 astFactory.makeASTRoot(currentAST, tmp79_AST);
2572 TNode tmp80_AST = null;
2573 tmp80_AST = (TNode)astFactory.create(LT(1));
2574 astFactory.addASTChild(currentAST, tmp80_AST);
2575 match(LPAREN);
2576 {
2577 boolean synPredMatched86 = false;
2578 if (((_tokenSet_43.member(LA(1))) && (_tokenSet_44.member(LA(2))))) {
2579 int _m86 = mark();
2580 synPredMatched86 = true;
2581 inputState.guessing++;
2582 try {
2583 {
2584 typeName();
2585 }
2586 }
2587 catch (RecognitionException pe) {
2588 synPredMatched86 = false;
2589 }
2590 rewind(_m86);
2591inputState.guessing--;
2592 }
2593 if ( synPredMatched86 ) {
2594 typeName();
2595 astFactory.addASTChild(currentAST, returnAST);
2596 }
2597 else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_45.member(LA(2)))) {
2598 expr();
2599 astFactory.addASTChild(currentAST, returnAST);
2600 }
2601 else {
2602 throw new NoViableAltException(LT(1), getFilename());
2603 }
2604
2605 }
2606 TNode tmp81_AST = null;
2607 tmp81_AST = (TNode)astFactory.create(LT(1));
2608 astFactory.addASTChild(currentAST, tmp81_AST);
2609 match(RPAREN);
2610 break;
2611 }
2612 case LITERAL___complex:
2613 {
2614 TNode tmp82_AST = null;
2615 tmp82_AST = (TNode)astFactory.create(LT(1));
2616 astFactory.addASTChild(currentAST, tmp82_AST);
2618 break;
2619 }
2620 default:
2621 if (((LA(1)==ID))&&( specCount==0 )) {
2622 typedefName();
2623 astFactory.addASTChild(currentAST, returnAST);
2624 }
2625 else {
2626 throw new NoViableAltException(LT(1), getFilename());
2627 }
2628 }
2629 }
2630 typeSpecifier_AST = (TNode)currentAST.root;
2631 }
2632 catch (RecognitionException ex) {
2633 if (inputState.guessing==0) {
2634 reportError(ex);
2635 recover(ex,_tokenSet_46);
2636 } else {
2637 throw ex;
2638 }
2639 }
2640 returnAST = typeSpecifier_AST;
2641 return retSpecCount;
2642 }
2643
2644 public final void structOrUnionSpecifier() throws RecognitionException, TokenStreamException {
2645
2646 returnAST = null;
2647 ASTPair currentAST = new ASTPair();
2648 TNode structOrUnionSpecifier_AST = null;
2649 TNode sou_AST = null;
2650 Token i = null;
2651 TNode i_AST = null;
2652 Token l = null;
2653 TNode l_AST = null;
2654 Token l1 = null;
2655 TNode l1_AST = null;
2656 String scopeName;
2657
2658 try { // for error handling
2659 structOrUnion();
2660 sou_AST = (TNode)returnAST;
2661 {
2662 boolean synPredMatched90 = false;
2663 if (((LA(1)==ID) && (LA(2)==LCURLY))) {
2664 int _m90 = mark();
2665 synPredMatched90 = true;
2666 inputState.guessing++;
2667 try {
2668 {
2669 match(ID);
2670 match(LCURLY);
2671 }
2672 }
2673 catch (RecognitionException pe) {
2674 synPredMatched90 = false;
2675 }
2676 rewind(_m90);
2677inputState.guessing--;
2678 }
2679 if ( synPredMatched90 ) {
2680 i = LT(1);
2681 i_AST = (TNode)astFactory.create(i);
2682 astFactory.addASTChild(currentAST, i_AST);
2683 match(ID);
2684 l = LT(1);
2685 l_AST = (TNode)astFactory.create(l);
2686 astFactory.addASTChild(currentAST, l_AST);
2687 match(LCURLY);
2688 if ( inputState.guessing==0 ) {
2689
2690 scopeName = sou_AST.getText() + " " + i_AST.getText();
2691 l_AST.setText(scopeName);
2692 pushScope(scopeName);
2693
2694 }
2695 {
2696 switch ( LA(1)) {
2697 case LITERAL_volatile:
2698 case LITERAL_struct:
2699 case LITERAL_union:
2700 case LITERAL_enum:
2701 case LITERAL_const:
2702 case LITERAL_void:
2703 case LITERAL_char:
2704 case LITERAL_short:
2705 case LITERAL_int:
2706 case LITERAL_long:
2707 case LITERAL_float:
2708 case LITERAL_double:
2709 case LITERAL_signed:
2710 case LITERAL_unsigned:
2711 case 27:
2712 case 28:
2713 case 29:
2714 case 30:
2715 case 31:
2716 case 32:
2717 case LITERAL_wchar_t:
2718 case 34:
2719 case 35:
2720 case 36:
2721 case 37:
2722 case LITERAL_ptrdiff_t:
2723 case LITERAL_intptr_t:
2724 case LITERAL_size_t:
2725 case LITERAL_uintptr_t:
2726 case ID:
2727 case LITERAL_typeof:
2728 case LITERAL___complex:
2729 {
2731 astFactory.addASTChild(currentAST, returnAST);
2732 break;
2733 }
2734 case RCURLY:
2735 {
2736 break;
2737 }
2738 default:
2739 {
2740 throw new NoViableAltException(LT(1), getFilename());
2741 }
2742 }
2743 }
2744 if ( inputState.guessing==0 ) {
2745 popScope();
2746 }
2747 TNode tmp83_AST = null;
2748 tmp83_AST = (TNode)astFactory.create(LT(1));
2749 astFactory.addASTChild(currentAST, tmp83_AST);
2750 match(RCURLY);
2751 }
2752 else if ((LA(1)==LCURLY)) {
2753 l1 = LT(1);
2754 l1_AST = (TNode)astFactory.create(l1);
2755 astFactory.addASTChild(currentAST, l1_AST);
2756 match(LCURLY);
2757 if ( inputState.guessing==0 ) {
2758
2759 scopeName = getAScopeName();
2760 l1_AST.setText(scopeName);
2761 pushScope(scopeName);
2762
2763 }
2764 {
2765 switch ( LA(1)) {
2766 case LITERAL_volatile:
2767 case LITERAL_struct:
2768 case LITERAL_union:
2769 case LITERAL_enum:
2770 case LITERAL_const:
2771 case LITERAL_void:
2772 case LITERAL_char:
2773 case LITERAL_short:
2774 case LITERAL_int:
2775 case LITERAL_long:
2776 case LITERAL_float:
2777 case LITERAL_double:
2778 case LITERAL_signed:
2779 case LITERAL_unsigned:
2780 case 27:
2781 case 28:
2782 case 29:
2783 case 30:
2784 case 31:
2785 case 32:
2786 case LITERAL_wchar_t:
2787 case 34:
2788 case 35:
2789 case 36:
2790 case 37:
2791 case LITERAL_ptrdiff_t:
2792 case LITERAL_intptr_t:
2793 case LITERAL_size_t:
2794 case LITERAL_uintptr_t:
2795 case ID:
2796 case LITERAL_typeof:
2797 case LITERAL___complex:
2798 {
2800 astFactory.addASTChild(currentAST, returnAST);
2801 break;
2802 }
2803 case RCURLY:
2804 {
2805 break;
2806 }
2807 default:
2808 {
2809 throw new NoViableAltException(LT(1), getFilename());
2810 }
2811 }
2812 }
2813 if ( inputState.guessing==0 ) {
2814 popScope();
2815 }
2816 TNode tmp84_AST = null;
2817 tmp84_AST = (TNode)astFactory.create(LT(1));
2818 astFactory.addASTChild(currentAST, tmp84_AST);
2819 match(RCURLY);
2820 }
2821 else if ((LA(1)==ID) && (_tokenSet_46.member(LA(2)))) {
2822 TNode tmp85_AST = null;
2823 tmp85_AST = (TNode)astFactory.create(LT(1));
2824 astFactory.addASTChild(currentAST, tmp85_AST);
2825 match(ID);
2826 }
2827 else {
2828 throw new NoViableAltException(LT(1), getFilename());
2829 }
2830
2831 }
2832 if ( inputState.guessing==0 ) {
2833 structOrUnionSpecifier_AST = (TNode)currentAST.root;
2834
2835 structOrUnionSpecifier_AST = (TNode)astFactory.make( (new ASTArray(2)).add(sou_AST).add(structOrUnionSpecifier_AST));
2836
2837 currentAST.root = structOrUnionSpecifier_AST;
2838 currentAST.child = structOrUnionSpecifier_AST!=null &&structOrUnionSpecifier_AST.getFirstChild()!=null ?
2839 structOrUnionSpecifier_AST.getFirstChild() : structOrUnionSpecifier_AST;
2840 currentAST.advanceChildToEnd();
2841 }
2842 structOrUnionSpecifier_AST = (TNode)currentAST.root;
2843 }
2844 catch (RecognitionException ex) {
2845 if (inputState.guessing==0) {
2846 reportError(ex);
2847 recover(ex,_tokenSet_46);
2848 } else {
2849 throw ex;
2850 }
2851 }
2852 returnAST = structOrUnionSpecifier_AST;
2853 }
2854
2855 public final void attributeDecl() throws RecognitionException, TokenStreamException {
2856
2857 returnAST = null;
2858 ASTPair currentAST = new ASTPair();
2859 TNode attributeDecl_AST = null;
2860
2861 try { // for error handling
2862 switch ( LA(1)) {
2864 {
2865 TNode tmp86_AST = null;
2866 tmp86_AST = (TNode)astFactory.create(LT(1));
2867 astFactory.makeASTRoot(currentAST, tmp86_AST);
2869 TNode tmp87_AST = null;
2870 tmp87_AST = (TNode)astFactory.create(LT(1));
2871 astFactory.addASTChild(currentAST, tmp87_AST);
2872 match(LPAREN);
2873 TNode tmp88_AST = null;
2874 tmp88_AST = (TNode)astFactory.create(LT(1));
2875 astFactory.addASTChild(currentAST, tmp88_AST);
2876 match(LPAREN);
2877 attributeList();
2878 astFactory.addASTChild(currentAST, returnAST);
2879 TNode tmp89_AST = null;
2880 tmp89_AST = (TNode)astFactory.create(LT(1));
2881 astFactory.addASTChild(currentAST, tmp89_AST);
2882 match(RPAREN);
2883 TNode tmp90_AST = null;
2884 tmp90_AST = (TNode)astFactory.create(LT(1));
2885 astFactory.addASTChild(currentAST, tmp90_AST);
2886 match(RPAREN);
2887 attributeDecl_AST = (TNode)currentAST.root;
2888 break;
2889 }
2890 case LITERAL_asm:
2891 {
2892 TNode tmp91_AST = null;
2893 tmp91_AST = (TNode)astFactory.create(LT(1));
2894 astFactory.makeASTRoot(currentAST, tmp91_AST);
2896 TNode tmp92_AST = null;
2897 tmp92_AST = (TNode)astFactory.create(LT(1));
2898 astFactory.addASTChild(currentAST, tmp92_AST);
2899 match(LPAREN);
2900 stringConst();
2901 astFactory.addASTChild(currentAST, returnAST);
2902 TNode tmp93_AST = null;
2903 tmp93_AST = (TNode)astFactory.create(LT(1));
2904 astFactory.addASTChild(currentAST, tmp93_AST);
2905 match(RPAREN);
2906 if ( inputState.guessing==0 ) {
2907 attributeDecl_AST = (TNode)currentAST.root;
2908 attributeDecl_AST.setType( NAsmAttribute );
2909 }
2910 attributeDecl_AST = (TNode)currentAST.root;
2911 break;
2912 }
2913 default:
2914 {
2915 throw new NoViableAltException(LT(1), getFilename());
2916 }
2917 }
2918 }
2919 catch (RecognitionException ex) {
2920 if (inputState.guessing==0) {
2921 reportError(ex);
2922 recover(ex,_tokenSet_47);
2923 } else {
2924 throw ex;
2925 }
2926 }
2927 returnAST = attributeDecl_AST;
2928 }
2929
2930 public final void enumSpecifier() throws RecognitionException, TokenStreamException {
2931
2932 returnAST = null;
2933 ASTPair currentAST = new ASTPair();
2934 TNode enumSpecifier_AST = null;
2935 Token i = null;
2936 TNode i_AST = null;
2937
2938 try { // for error handling
2939 TNode tmp94_AST = null;
2940 tmp94_AST = (TNode)astFactory.create(LT(1));
2941 astFactory.makeASTRoot(currentAST, tmp94_AST);
2943 {
2944 boolean synPredMatched108 = false;
2945 if (((LA(1)==ID) && (LA(2)==LCURLY))) {
2946 int _m108 = mark();
2947 synPredMatched108 = true;
2948 inputState.guessing++;
2949 try {
2950 {
2951 match(ID);
2952 match(LCURLY);
2953 }
2954 }
2955 catch (RecognitionException pe) {
2956 synPredMatched108 = false;
2957 }
2958 rewind(_m108);
2959inputState.guessing--;
2960 }
2961 if ( synPredMatched108 ) {
2962 i = LT(1);
2963 i_AST = (TNode)astFactory.create(i);
2964 astFactory.addASTChild(currentAST, i_AST);
2965 match(ID);
2966 TNode tmp95_AST = null;
2967 tmp95_AST = (TNode)astFactory.create(LT(1));
2968 astFactory.addASTChild(currentAST, tmp95_AST);
2969 match(LCURLY);
2970 enumList(i.getText());
2971 astFactory.addASTChild(currentAST, returnAST);
2972 TNode tmp96_AST = null;
2973 tmp96_AST = (TNode)astFactory.create(LT(1));
2974 astFactory.addASTChild(currentAST, tmp96_AST);
2975 match(RCURLY);
2976 }
2977 else if ((LA(1)==LCURLY)) {
2978 TNode tmp97_AST = null;
2979 tmp97_AST = (TNode)astFactory.create(LT(1));
2980 astFactory.addASTChild(currentAST, tmp97_AST);
2981 match(LCURLY);
2982 enumList("anonymous");
2983 astFactory.addASTChild(currentAST, returnAST);
2984 TNode tmp98_AST = null;
2985 tmp98_AST = (TNode)astFactory.create(LT(1));
2986 astFactory.addASTChild(currentAST, tmp98_AST);
2987 match(RCURLY);
2988 }
2989 else if ((LA(1)==ID) && (_tokenSet_46.member(LA(2)))) {
2990 TNode tmp99_AST = null;
2991 tmp99_AST = (TNode)astFactory.create(LT(1));
2992 astFactory.addASTChild(currentAST, tmp99_AST);
2993 match(ID);
2994 }
2995 else {
2996 throw new NoViableAltException(LT(1), getFilename());
2997 }
2998
2999 }
3000 enumSpecifier_AST = (TNode)currentAST.root;
3001 }
3002 catch (RecognitionException ex) {
3003 if (inputState.guessing==0) {
3004 reportError(ex);
3005 recover(ex,_tokenSet_46);
3006 } else {
3007 throw ex;
3008 }
3009 }
3010 returnAST = enumSpecifier_AST;
3011 }
3012
3013 public final void typedefName() throws RecognitionException, TokenStreamException {
3014
3015 returnAST = null;
3016 ASTPair currentAST = new ASTPair();
3017 TNode typedefName_AST = null;
3018 Token i = null;
3019 TNode i_AST = null;
3020
3021 try { // for error handling
3022 if (!( isTypedefName ( LT(1).getText() ) ))
3023 throw new SemanticException(" isTypedefName ( LT(1).getText() ) ");
3024 i = LT(1);
3025 i_AST = (TNode)astFactory.create(i);
3026 astFactory.addASTChild(currentAST, i_AST);
3027 match(ID);
3028 if ( inputState.guessing==0 ) {
3029 typedefName_AST = (TNode)currentAST.root;
3030 typedefName_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NTypedefName)).add(i_AST));
3031 currentAST.root = typedefName_AST;
3032 currentAST.child = typedefName_AST!=null &&typedefName_AST.getFirstChild()!=null ?
3033 typedefName_AST.getFirstChild() : typedefName_AST;
3034 currentAST.advanceChildToEnd();
3035 }
3036 typedefName_AST = (TNode)currentAST.root;
3037 }
3038 catch (RecognitionException ex) {
3039 if (inputState.guessing==0) {
3040 reportError(ex);
3041 recover(ex,_tokenSet_46);
3042 } else {
3043 throw ex;
3044 }
3045 }
3046 returnAST = typedefName_AST;
3047 }
3048
3049 public final void typeName() throws RecognitionException, TokenStreamException {
3050
3051 returnAST = null;
3052 ASTPair currentAST = new ASTPair();
3053 TNode typeName_AST = null;
3054
3055 try { // for error handling
3057 astFactory.addASTChild(currentAST, returnAST);
3058 {
3059 switch ( LA(1)) {
3060 case STAR:
3061 case LPAREN:
3062 case LBRACKET:
3063 {
3065 astFactory.addASTChild(currentAST, returnAST);
3066 break;
3067 }
3068 case RPAREN:
3069 {
3070 break;
3071 }
3072 default:
3073 {
3074 throw new NoViableAltException(LT(1), getFilename());
3075 }
3076 }
3077 }
3078 typeName_AST = (TNode)currentAST.root;
3079 }
3080 catch (RecognitionException ex) {
3081 if (inputState.guessing==0) {
3082 reportError(ex);
3083 recover(ex,_tokenSet_48);
3084 } else {
3085 throw ex;
3086 }
3087 }
3088 returnAST = typeName_AST;
3089 }
3090
3091 public final void structOrUnion() throws RecognitionException, TokenStreamException {
3092
3093 returnAST = null;
3094 ASTPair currentAST = new ASTPair();
3095 TNode structOrUnion_AST = null;
3096
3097 try { // for error handling
3098 switch ( LA(1)) {
3099 case LITERAL_struct:
3100 {
3101 TNode tmp100_AST = null;
3102 tmp100_AST = (TNode)astFactory.create(LT(1));
3103 astFactory.addASTChild(currentAST, tmp100_AST);
3105 structOrUnion_AST = (TNode)currentAST.root;
3106 break;
3107 }
3108 case LITERAL_union:
3109 {
3110 TNode tmp101_AST = null;
3111 tmp101_AST = (TNode)astFactory.create(LT(1));
3112 astFactory.addASTChild(currentAST, tmp101_AST);
3114 structOrUnion_AST = (TNode)currentAST.root;
3115 break;
3116 }
3117 default:
3118 {
3119 throw new NoViableAltException(LT(1), getFilename());
3120 }
3121 }
3122 }
3123 catch (RecognitionException ex) {
3124 if (inputState.guessing==0) {
3125 reportError(ex);
3126 recover(ex,_tokenSet_49);
3127 } else {
3128 throw ex;
3129 }
3130 }
3131 returnAST = structOrUnion_AST;
3132 }
3133
3134 public final void structDeclarationList() throws RecognitionException, TokenStreamException {
3135
3136 returnAST = null;
3137 ASTPair currentAST = new ASTPair();
3138 TNode structDeclarationList_AST = null;
3139
3140 try { // for error handling
3141 {
3142 int _cnt221=0;
3143 _loop221:
3144 do {
3145 if ((_tokenSet_43.member(LA(1)))) {
3147 astFactory.addASTChild(currentAST, returnAST);
3148 }
3149 else {
3150 if ( _cnt221>=1 ) { break _loop221; } else {throw new NoViableAltException(LT(1), getFilename());}
3151 }
3152
3153 _cnt221++;
3154 } while (true);
3155 }
3156 structDeclarationList_AST = (TNode)currentAST.root;
3157 }
3158 catch (RecognitionException ex) {
3159 if (inputState.guessing==0) {
3160 reportError(ex);
3161 recover(ex,_tokenSet_50);
3162 } else {
3163 throw ex;
3164 }
3165 }
3166 returnAST = structDeclarationList_AST;
3167 }
3168
3169 public final void structDeclaration() throws RecognitionException, TokenStreamException {
3170
3171 returnAST = null;
3172 ASTPair currentAST = new ASTPair();
3173 TNode structDeclaration_AST = null;
3174
3175 try { // for error handling
3177 astFactory.addASTChild(currentAST, returnAST);
3179 astFactory.addASTChild(currentAST, returnAST);
3180 {
3181 switch ( LA(1)) {
3182 case COMMA:
3183 {
3184 match(COMMA);
3185 break;
3186 }
3187 case SEMI:
3188 {
3189 break;
3190 }
3191 default:
3192 {
3193 throw new NoViableAltException(LT(1), getFilename());
3194 }
3195 }
3196 }
3197 {
3198 int _cnt96=0;
3199 _loop96:
3200 do {
3201 if ((LA(1)==SEMI)) {
3202 match(SEMI);
3203 }
3204 else {
3205 if ( _cnt96>=1 ) { break _loop96; } else {throw new NoViableAltException(LT(1), getFilename());}
3206 }
3207
3208 _cnt96++;
3209 } while (true);
3210 }
3211 structDeclaration_AST = (TNode)currentAST.root;
3212 }
3213 catch (RecognitionException ex) {
3214 if (inputState.guessing==0) {
3215 reportError(ex);
3216 recover(ex,_tokenSet_51);
3217 } else {
3218 throw ex;
3219 }
3220 }
3221 returnAST = structDeclaration_AST;
3222 }
3223
3224 public final void specifierQualifierList() throws RecognitionException, TokenStreamException {
3225
3226 returnAST = null;
3227 ASTPair currentAST = new ASTPair();
3228 TNode specifierQualifierList_AST = null;
3229 int specCount = 0;
3230
3231 try { // for error handling
3232 {
3233 int _cnt226=0;
3234 _loop226:
3235 do {
3236 boolean synPredMatched225 = false;
3237 if (((_tokenSet_15.member(LA(1))) && (_tokenSet_52.member(LA(2))))) {
3238 int _m225 = mark();
3239 synPredMatched225 = true;
3240 inputState.guessing++;
3241 try {
3242 {
3243 if ((LA(1)==LITERAL_struct) && (true)) {
3245 }
3246 else if ((LA(1)==LITERAL_union) && (true)) {
3248 }
3249 else if ((LA(1)==LITERAL_enum) && (true)) {
3251 }
3252 else if ((_tokenSet_15.member(LA(1))) && (true)) {
3253 typeSpecifier(specCount);
3254 }
3255 else {
3256 throw new NoViableAltException(LT(1), getFilename());
3257 }
3258
3259 }
3260 }
3261 catch (RecognitionException pe) {
3262 synPredMatched225 = false;
3263 }
3264 rewind(_m225);
3265inputState.guessing--;
3266 }
3267 if ( synPredMatched225 ) {
3268 specCount=typeSpecifier(specCount);
3269 astFactory.addASTChild(currentAST, returnAST);
3270 }
3271 else if ((LA(1)==LITERAL_volatile||LA(1)==LITERAL_const)) {
3272 typeQualifier();
3273 astFactory.addASTChild(currentAST, returnAST);
3274 }
3275 else {
3276 if ( _cnt226>=1 ) { break _loop226; } else {throw new NoViableAltException(LT(1), getFilename());}
3277 }
3278
3279 _cnt226++;
3280 } while (true);
3281 }
3282 specifierQualifierList_AST = (TNode)currentAST.root;
3283 }
3284 catch (RecognitionException ex) {
3285 if (inputState.guessing==0) {
3286 reportError(ex);
3287 recover(ex,_tokenSet_53);
3288 } else {
3289 throw ex;
3290 }
3291 }
3292 returnAST = specifierQualifierList_AST;
3293 }
3294
3295 public final void structDeclaratorList() throws RecognitionException, TokenStreamException {
3296
3297 returnAST = null;
3298 ASTPair currentAST = new ASTPair();
3299 TNode structDeclaratorList_AST = null;
3300
3301 try { // for error handling
3303 astFactory.addASTChild(currentAST, returnAST);
3304 {
3305 _loop99:
3306 do {
3307 if ((LA(1)==COMMA) && (_tokenSet_54.member(LA(2)))) {
3308 match(COMMA);
3310 astFactory.addASTChild(currentAST, returnAST);
3311 }
3312 else {
3313 break _loop99;
3314 }
3315
3316 } while (true);
3317 }
3318 structDeclaratorList_AST = (TNode)currentAST.root;
3319 }
3320 catch (RecognitionException ex) {
3321 if (inputState.guessing==0) {
3322 reportError(ex);
3323 recover(ex,_tokenSet_55);
3324 } else {
3325 throw ex;
3326 }
3327 }
3328 returnAST = structDeclaratorList_AST;
3329 }
3330
3331 public final void structDeclarator() throws RecognitionException, TokenStreamException {
3332
3333 returnAST = null;
3334 ASTPair currentAST = new ASTPair();
3335 TNode structDeclarator_AST = null;
3336
3337 try { // for error handling
3338 {
3339 switch ( LA(1)) {
3340 case ID:
3341 case STAR:
3342 case LPAREN:
3343 {
3344 declarator(false);
3345 astFactory.addASTChild(currentAST, returnAST);
3346 break;
3347 }
3348 case LITERAL_asm:
3349 case SEMI:
3350 case COMMA:
3351 case COLON:
3353 {
3354 break;
3355 }
3356 default:
3357 {
3358 throw new NoViableAltException(LT(1), getFilename());
3359 }
3360 }
3361 }
3362 {
3363 switch ( LA(1)) {
3364 case COLON:
3365 {
3366 TNode tmp105_AST = null;
3367 tmp105_AST = (TNode)astFactory.create(LT(1));
3368 astFactory.addASTChild(currentAST, tmp105_AST);
3369 match(COLON);
3370 constExpr();
3371 astFactory.addASTChild(currentAST, returnAST);
3372 break;
3373 }
3374 case LITERAL_asm:
3375 case SEMI:
3376 case COMMA:
3378 {
3379 break;
3380 }
3381 default:
3382 {
3383 throw new NoViableAltException(LT(1), getFilename());
3384 }
3385 }
3386 }
3387 {
3388 _loop104:
3389 do {
3390 if ((LA(1)==LITERAL_asm||LA(1)==LITERAL___attribute)) {
3391 attributeDecl();
3392 astFactory.addASTChild(currentAST, returnAST);
3393 }
3394 else {
3395 break _loop104;
3396 }
3397
3398 } while (true);
3399 }
3400 if ( inputState.guessing==0 ) {
3401 structDeclarator_AST = (TNode)currentAST.root;
3402 structDeclarator_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NStructDeclarator)).add(structDeclarator_AST));
3403 currentAST.root = structDeclarator_AST;
3404 currentAST.child = structDeclarator_AST!=null &&structDeclarator_AST.getFirstChild()!=null ?
3405 structDeclarator_AST.getFirstChild() : structDeclarator_AST;
3406 currentAST.advanceChildToEnd();
3407 }
3408 structDeclarator_AST = (TNode)currentAST.root;
3409 }
3410 catch (RecognitionException ex) {
3411 if (inputState.guessing==0) {
3412 reportError(ex);
3413 recover(ex,_tokenSet_55);
3414 } else {
3415 throw ex;
3416 }
3417 }
3418 returnAST = structDeclarator_AST;
3419 }
3420
3421 public final void enumList(
3422 String enumName
3423 ) throws RecognitionException, TokenStreamException {
3424
3425 returnAST = null;
3426 ASTPair currentAST = new ASTPair();
3427 TNode enumList_AST = null;
3428
3429 try { // for error handling
3430 enumerator(enumName);
3431 astFactory.addASTChild(currentAST, returnAST);
3432 {
3433 _loop111:
3434 do {
3435 if ((LA(1)==COMMA) && (LA(2)==ID)) {
3436 match(COMMA);
3437 enumerator(enumName);
3438 astFactory.addASTChild(currentAST, returnAST);
3439 }
3440 else {
3441 break _loop111;
3442 }
3443
3444 } while (true);
3445 }
3446 {
3447 switch ( LA(1)) {
3448 case COMMA:
3449 {
3450 match(COMMA);
3451 break;
3452 }
3453 case RCURLY:
3454 {
3455 break;
3456 }
3457 default:
3458 {
3459 throw new NoViableAltException(LT(1), getFilename());
3460 }
3461 }
3462 }
3463 enumList_AST = (TNode)currentAST.root;
3464 }
3465 catch (RecognitionException ex) {
3466 if (inputState.guessing==0) {
3467 reportError(ex);
3468 recover(ex,_tokenSet_50);
3469 } else {
3470 throw ex;
3471 }
3472 }
3473 returnAST = enumList_AST;
3474 }
3475
3476 public final void enumerator(
3477 String enumName
3478 ) throws RecognitionException, TokenStreamException {
3479
3480 returnAST = null;
3481 ASTPair currentAST = new ASTPair();
3482 TNode enumerator_AST = null;
3483 Token i = null;
3484 TNode i_AST = null;
3485
3486 try { // for error handling
3487 i = LT(1);
3488 i_AST = (TNode)astFactory.create(i);
3489 astFactory.addASTChild(currentAST, i_AST);
3490 match(ID);
3491 if ( inputState.guessing==0 ) {
3492 symbolTable.add( i.getText(),
3493 (TNode)astFactory.make( (new ASTArray(3)).add(null).add((TNode)astFactory.create(LITERAL_enum,"enum")).add((TNode)astFactory.create(ID,enumName)))
3494 );
3495
3496 }
3497 {
3498 switch ( LA(1)) {
3499 case ASSIGN:
3500 {
3501 TNode tmp108_AST = null;
3502 tmp108_AST = (TNode)astFactory.create(LT(1));
3503 astFactory.addASTChild(currentAST, tmp108_AST);
3504 match(ASSIGN);
3505 constExpr();
3506 astFactory.addASTChild(currentAST, returnAST);
3507 break;
3508 }
3509 case RCURLY:
3510 case COMMA:
3511 {
3512 break;
3513 }
3514 default:
3515 {
3516 throw new NoViableAltException(LT(1), getFilename());
3517 }
3518 }
3519 }
3520 enumerator_AST = (TNode)currentAST.root;
3521 }
3522 catch (RecognitionException ex) {
3523 if (inputState.guessing==0) {
3524 reportError(ex);
3525 recover(ex,_tokenSet_31);
3526 } else {
3527 throw ex;
3528 }
3529 }
3530 returnAST = enumerator_AST;
3531 }
3532
3533 public final void initDecl(
3534 AST declarationSpecifiers
3535 ) throws RecognitionException, TokenStreamException {
3536
3537 returnAST = null;
3538 ASTPair currentAST = new ASTPair();
3539 TNode initDecl_AST = null;
3540 TNode d_AST = null;
3541 String declName = "";
3542
3543 try { // for error handling
3544 declName=declarator(false);
3545 d_AST = (TNode)returnAST;
3546 astFactory.addASTChild(currentAST, returnAST);
3547 if ( inputState.guessing==0 ) {
3548 AST ds1, d1;
3549 ds1 = astFactory.dupList(declarationSpecifiers);
3550 d1 = astFactory.dupList(d_AST);
3551 symbolTable.add(declName, (TNode)astFactory.make( (new ASTArray(3)).add(null).add(ds1).add(d1)) );
3552
3553 }
3554 {
3555 _loop119:
3556 do {
3557 if ((LA(1)==LITERAL_asm||LA(1)==LITERAL___attribute)) {
3558 attributeDecl();
3559 astFactory.addASTChild(currentAST, returnAST);
3560 }
3561 else {
3562 break _loop119;
3563 }
3564
3565 } while (true);
3566 }
3567 {
3568 switch ( LA(1)) {
3569 case ASSIGN:
3570 {
3571 TNode tmp109_AST = null;
3572 tmp109_AST = (TNode)astFactory.create(LT(1));
3573 astFactory.addASTChild(currentAST, tmp109_AST);
3574 match(ASSIGN);
3575 initializer();
3576 astFactory.addASTChild(currentAST, returnAST);
3577 break;
3578 }
3579 case COLON:
3580 {
3581 TNode tmp110_AST = null;
3582 tmp110_AST = (TNode)astFactory.create(LT(1));
3583 astFactory.addASTChild(currentAST, tmp110_AST);
3584 match(COLON);
3585 expr();
3586 astFactory.addASTChild(currentAST, returnAST);
3587 break;
3588 }
3589 case SEMI:
3590 case COMMA:
3591 {
3592 break;
3593 }
3594 default:
3595 {
3596 throw new NoViableAltException(LT(1), getFilename());
3597 }
3598 }
3599 }
3600 if ( inputState.guessing==0 ) {
3601 initDecl_AST = (TNode)currentAST.root;
3602 initDecl_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NInitDecl)).add(initDecl_AST));
3603 currentAST.root = initDecl_AST;
3604 currentAST.child = initDecl_AST!=null &&initDecl_AST.getFirstChild()!=null ?
3605 initDecl_AST.getFirstChild() : initDecl_AST;
3606 currentAST.advanceChildToEnd();
3607 }
3608 initDecl_AST = (TNode)currentAST.root;
3609 }
3610 catch (RecognitionException ex) {
3611 if (inputState.guessing==0) {
3612 reportError(ex);
3613 recover(ex,_tokenSet_55);
3614 } else {
3615 throw ex;
3616 }
3617 }
3618 returnAST = initDecl_AST;
3619 }
3620
3621 public final void attributeList() throws RecognitionException, TokenStreamException {
3622
3623 returnAST = null;
3624 ASTPair currentAST = new ASTPair();
3625 TNode attributeList_AST = null;
3626
3627 try { // for error handling
3628 attribute();
3629 astFactory.addASTChild(currentAST, returnAST);
3630 {
3631 _loop124:
3632 do {
3633 if ((LA(1)==COMMA) && ((LA(2) >= LITERAL_typedef && LA(2) <= LITERAL___imag))) {
3634 TNode tmp111_AST = null;
3635 tmp111_AST = (TNode)astFactory.create(LT(1));
3636 astFactory.addASTChild(currentAST, tmp111_AST);
3637 match(COMMA);
3638 attribute();
3639 astFactory.addASTChild(currentAST, returnAST);
3640 }
3641 else {
3642 break _loop124;
3643 }
3644
3645 } while (true);
3646 }
3647 {
3648 switch ( LA(1)) {
3649 case COMMA:
3650 {
3651 TNode tmp112_AST = null;
3652 tmp112_AST = (TNode)astFactory.create(LT(1));
3653 astFactory.addASTChild(currentAST, tmp112_AST);
3654 match(COMMA);
3655 break;
3656 }
3657 case RPAREN:
3658 {
3659 break;
3660 }
3661 default:
3662 {
3663 throw new NoViableAltException(LT(1), getFilename());
3664 }
3665 }
3666 }
3667 attributeList_AST = (TNode)currentAST.root;
3668 }
3669 catch (RecognitionException ex) {
3670 if (inputState.guessing==0) {
3671 reportError(ex);
3672 recover(ex,_tokenSet_48);
3673 } else {
3674 throw ex;
3675 }
3676 }
3677 returnAST = attributeList_AST;
3678 }
3679
3680 protected final void stringConst() throws RecognitionException, TokenStreamException {
3681
3682 returnAST = null;
3683 ASTPair currentAST = new ASTPair();
3684 TNode stringConst_AST = null;
3685
3686 try { // for error handling
3687 {
3688 int _cnt314=0;
3689 _loop314:
3690 do {
3691 if ((LA(1)==StringLiteral)) {
3692 TNode tmp113_AST = null;
3693 tmp113_AST = (TNode)astFactory.create(LT(1));
3694 astFactory.addASTChild(currentAST, tmp113_AST);
3696 }
3697 else {
3698 if ( _cnt314>=1 ) { break _loop314; } else {throw new NoViableAltException(LT(1), getFilename());}
3699 }
3700
3701 _cnt314++;
3702 } while (true);
3703 }
3704 if ( inputState.guessing==0 ) {
3705 stringConst_AST = (TNode)currentAST.root;
3706 stringConst_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NStringSeq)).add(stringConst_AST));
3707 currentAST.root = stringConst_AST;
3708 currentAST.child = stringConst_AST!=null &&stringConst_AST.getFirstChild()!=null ?
3709 stringConst_AST.getFirstChild() : stringConst_AST;
3710 currentAST.advanceChildToEnd();
3711 }
3712 stringConst_AST = (TNode)currentAST.root;
3713 }
3714 catch (RecognitionException ex) {
3715 if (inputState.guessing==0) {
3716 reportError(ex);
3717 recover(ex,_tokenSet_56);
3718 } else {
3719 throw ex;
3720 }
3721 }
3722 returnAST = stringConst_AST;
3723 }
3724
3725 public final void attribute() throws RecognitionException, TokenStreamException {
3726
3727 returnAST = null;
3728 ASTPair currentAST = new ASTPair();
3729 TNode attribute_AST = null;
3730
3731 try { // for error handling
3732 {
3733 _loop129:
3734 do {
3735 if ((_tokenSet_57.member(LA(1)))) {
3736 {
3737 TNode tmp114_AST = null;
3738 tmp114_AST = (TNode)astFactory.create(LT(1));
3739 astFactory.addASTChild(currentAST, tmp114_AST);
3741 }
3742 }
3743 else if ((LA(1)==LPAREN)) {
3744 TNode tmp115_AST = null;
3745 tmp115_AST = (TNode)astFactory.create(LT(1));
3746 astFactory.addASTChild(currentAST, tmp115_AST);
3747 match(LPAREN);
3748 attributeList();
3749 astFactory.addASTChild(currentAST, returnAST);
3750 TNode tmp116_AST = null;
3751 tmp116_AST = (TNode)astFactory.create(LT(1));
3752 astFactory.addASTChild(currentAST, tmp116_AST);
3753 match(RPAREN);
3754 }
3755 else {
3756 break _loop129;
3757 }
3758
3759 } while (true);
3760 }
3761 attribute_AST = (TNode)currentAST.root;
3762 }
3763 catch (RecognitionException ex) {
3764 if (inputState.guessing==0) {
3765 reportError(ex);
3766 recover(ex,_tokenSet_5);
3767 } else {
3768 throw ex;
3769 }
3770 }
3771 returnAST = attribute_AST;
3772 }
3773
3774 public final void compoundStatement(
3775 String scopeName
3776 ) throws RecognitionException, TokenStreamException {
3777
3778 returnAST = null;
3779 ASTPair currentAST = new ASTPair();
3780 TNode compoundStatement_AST = null;
3781
3782 try { // for error handling
3783 TNode tmp117_AST = null;
3784 tmp117_AST = (TNode)astFactory.create(LT(1));
3785 astFactory.makeASTRoot(currentAST, tmp117_AST);
3786 match(LCURLY);
3787 if ( inputState.guessing==0 ) {
3788
3789 pushScope(scopeName);
3790
3791 }
3792 {
3793 _loop136:
3794 do {
3795 boolean synPredMatched133 = false;
3796 if (((_tokenSet_58.member(LA(1))) && (_tokenSet_7.member(LA(2))))) {
3797 int _m133 = mark();
3798 synPredMatched133 = true;
3799 inputState.guessing++;
3800 try {
3801 {
3802 if ((LA(1)==LITERAL_typedef) && (true)) {
3804 }
3805 else if ((LA(1)==LITERAL___label__)) {
3807 }
3808 else if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
3809 declaration();
3810 }
3811 else {
3812 throw new NoViableAltException(LT(1), getFilename());
3813 }
3814
3815 }
3816 }
3817 catch (RecognitionException pe) {
3818 synPredMatched133 = false;
3819 }
3820 rewind(_m133);
3821inputState.guessing--;
3822 }
3823 if ( synPredMatched133 ) {
3825 astFactory.addASTChild(currentAST, returnAST);
3826 }
3827 else {
3828 boolean synPredMatched135 = false;
3829 if (((_tokenSet_59.member(LA(1))) && (_tokenSet_60.member(LA(2))))) {
3830 int _m135 = mark();
3831 synPredMatched135 = true;
3832 inputState.guessing++;
3833 try {
3834 {
3836 }
3837 }
3838 catch (RecognitionException pe) {
3839 synPredMatched135 = false;
3840 }
3841 rewind(_m135);
3842inputState.guessing--;
3843 }
3844 if ( synPredMatched135 ) {
3846 astFactory.addASTChild(currentAST, returnAST);
3847 }
3848 else {
3849 break _loop136;
3850 }
3851 }
3852 } while (true);
3853 }
3854 {
3855 switch ( LA(1)) {
3856 case LITERAL_asm:
3857 case LCURLY:
3858 case SEMI:
3859 case ID:
3860 case STAR:
3861 case LPAREN:
3862 case LITERAL_while:
3863 case LITERAL_do:
3864 case LITERAL_for:
3865 case LITERAL_goto:
3866 case LITERAL_continue:
3867 case LITERAL_break:
3868 case LITERAL_return:
3869 case LITERAL_case:
3870 case LITERAL_default:
3871 case LITERAL_if:
3872 case LITERAL_switch:
3873 case LAND:
3874 case BAND:
3875 case PLUS:
3876 case MINUS:
3877 case INC:
3878 case DEC:
3879 case LITERAL_sizeof:
3880 case BNOT:
3881 case LNOT:
3882 case CharLiteral:
3883 case StringLiteral:
3884 case Number:
3885 case LITERAL___alignof:
3886 case LITERAL___real:
3887 case LITERAL___imag:
3888 {
3889 statementList();
3890 astFactory.addASTChild(currentAST, returnAST);
3891 break;
3892 }
3893 case RCURLY:
3894 {
3895 break;
3896 }
3897 default:
3898 {
3899 throw new NoViableAltException(LT(1), getFilename());
3900 }
3901 }
3902 }
3903 if ( inputState.guessing==0 ) {
3904 popScope();
3905 }
3906 TNode tmp118_AST = null;
3907 tmp118_AST = (TNode)astFactory.create(LT(1));
3908 astFactory.addASTChild(currentAST, tmp118_AST);
3909 match(RCURLY);
3910 if ( inputState.guessing==0 ) {
3911 compoundStatement_AST = (TNode)currentAST.root;
3912 compoundStatement_AST.setType( NCompoundStatement ); compoundStatement_AST.setAttribute( "scopeName", scopeName );
3913 }
3914 compoundStatement_AST = (TNode)currentAST.root;
3915 }
3916 catch (RecognitionException ex) {
3917 if (inputState.guessing==0) {
3918 reportError(ex);
3919 recover(ex,_tokenSet_61);
3920 } else {
3921 throw ex;
3922 }
3923 }
3924 returnAST = compoundStatement_AST;
3925 }
3926
3927 public final void nestedFunctionDef() throws RecognitionException, TokenStreamException {
3928
3929 returnAST = null;
3930 ASTPair currentAST = new ASTPair();
3931 TNode nestedFunctionDef_AST = null;
3932 TNode ds_AST = null;
3933 TNode d_AST = null;
3934 String declName;
3935
3936 try { // for error handling
3937 {
3938 switch ( LA(1)) {
3939 case LITERAL_auto:
3940 {
3941 TNode tmp119_AST = null;
3942 tmp119_AST = (TNode)astFactory.create(LT(1));
3943 astFactory.addASTChild(currentAST, tmp119_AST);
3945 break;
3946 }
3947 case LITERAL_volatile:
3948 case LITERAL_struct:
3949 case LITERAL_union:
3950 case LITERAL_enum:
3951 case LITERAL_extern:
3952 case LITERAL_static:
3953 case LITERAL_const:
3954 case LITERAL_void:
3955 case LITERAL_char:
3956 case LITERAL_short:
3957 case LITERAL_int:
3958 case LITERAL_long:
3959 case LITERAL_float:
3960 case LITERAL_double:
3961 case LITERAL_signed:
3962 case LITERAL_unsigned:
3963 case 27:
3964 case 28:
3965 case 29:
3966 case 30:
3967 case 31:
3968 case 32:
3969 case LITERAL_wchar_t:
3970 case 34:
3971 case 35:
3972 case 36:
3973 case 37:
3974 case LITERAL_ptrdiff_t:
3975 case LITERAL_intptr_t:
3976 case LITERAL_size_t:
3977 case LITERAL_uintptr_t:
3978 case ID:
3979 case STAR:
3980 case LPAREN:
3981 case LITERAL_inline:
3982 case LITERAL_typeof:
3983 case LITERAL___complex:
3984 {
3985 break;
3986 }
3987 default:
3988 {
3989 throw new NoViableAltException(LT(1), getFilename());
3990 }
3991 }
3992 }
3993 {
3994 boolean synPredMatched142 = false;
3995 if (((_tokenSet_13.member(LA(1))) && (_tokenSet_14.member(LA(2))))) {
3996 int _m142 = mark();
3997 synPredMatched142 = true;
3998 inputState.guessing++;
3999 try {
4000 {
4002 }
4003 }
4004 catch (RecognitionException pe) {
4005 synPredMatched142 = false;
4006 }
4007 rewind(_m142);
4008inputState.guessing--;
4009 }
4010 if ( synPredMatched142 ) {
4012 ds_AST = (TNode)returnAST;
4013 astFactory.addASTChild(currentAST, returnAST);
4014 }
4015 else if ((_tokenSet_10.member(LA(1))) && (_tokenSet_60.member(LA(2)))) {
4016 }
4017 else {
4018 throw new NoViableAltException(LT(1), getFilename());
4019 }
4020
4021 }
4022 declName=declarator(false);
4023 d_AST = (TNode)returnAST;
4024 astFactory.addASTChild(currentAST, returnAST);
4025 if ( inputState.guessing==0 ) {
4026
4027 AST d2, ds2;
4028 d2 = astFactory.dupList(d_AST);
4029 ds2 = astFactory.dupList(ds_AST);
4030 symbolTable.add(declName, (TNode)astFactory.make( (new ASTArray(3)).add(null).add(ds2).add(d2)));
4031 pushScope(declName);
4032
4033 }
4034 {
4035 _loop144:
4036 do {
4037 if ((_tokenSet_6.member(LA(1)))) {
4038 declaration();
4039 astFactory.addASTChild(currentAST, returnAST);
4040 }
4041 else {
4042 break _loop144;
4043 }
4044
4045 } while (true);
4046 }
4047 if ( inputState.guessing==0 ) {
4048 popScope();
4049 }
4050 compoundStatement(declName);
4051 astFactory.addASTChild(currentAST, returnAST);
4052 if ( inputState.guessing==0 ) {
4053 nestedFunctionDef_AST = (TNode)currentAST.root;
4054 nestedFunctionDef_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NFunctionDef)).add(nestedFunctionDef_AST));
4055 currentAST.root = nestedFunctionDef_AST;
4056 currentAST.child = nestedFunctionDef_AST!=null &&nestedFunctionDef_AST.getFirstChild()!=null ?
4057 nestedFunctionDef_AST.getFirstChild() : nestedFunctionDef_AST;
4058 currentAST.advanceChildToEnd();
4059 }
4060 nestedFunctionDef_AST = (TNode)currentAST.root;
4061 }
4062 catch (RecognitionException ex) {
4063 if (inputState.guessing==0) {
4064 reportError(ex);
4065 recover(ex,_tokenSet_41);
4066 } else {
4067 throw ex;
4068 }
4069 }
4070 returnAST = nestedFunctionDef_AST;
4071 }
4072
4073 public final void statementList() throws RecognitionException, TokenStreamException {
4074
4075 returnAST = null;
4076 ASTPair currentAST = new ASTPair();
4077 TNode statementList_AST = null;
4078
4079 try { // for error handling
4080 {
4081 int _cnt256=0;
4082 _loop256:
4083 do {
4084 if ((_tokenSet_62.member(LA(1)))) {
4085 statement();
4086 astFactory.addASTChild(currentAST, returnAST);
4087 }
4088 else {
4089 if ( _cnt256>=1 ) { break _loop256; } else {throw new NoViableAltException(LT(1), getFilename());}
4090 }
4091
4092 _cnt256++;
4093 } while (true);
4094 }
4095 statementList_AST = (TNode)currentAST.root;
4096 }
4097 catch (RecognitionException ex) {
4098 if (inputState.guessing==0) {
4099 reportError(ex);
4100 recover(ex,_tokenSet_50);
4101 } else {
4102 throw ex;
4103 }
4104 }
4105 returnAST = statementList_AST;
4106 }
4107
4108 public final void statement() throws RecognitionException, TokenStreamException {
4109
4110 returnAST = null;
4111 ASTPair currentAST = new ASTPair();
4112 TNode statement_AST = null;
4113 TNode e1_AST = null;
4114 TNode e2_AST = null;
4115 TNode e3_AST = null;
4116 TNode s_AST = null;
4117
4118 try { // for error handling
4119 switch ( LA(1)) {
4120 case SEMI:
4121 {
4122 TNode tmp120_AST = null;
4123 tmp120_AST = (TNode)astFactory.create(LT(1));
4124 astFactory.addASTChild(currentAST, tmp120_AST);
4125 match(SEMI);
4126 statement_AST = (TNode)currentAST.root;
4127 break;
4128 }
4129 case LCURLY:
4130 {
4132 astFactory.addASTChild(currentAST, returnAST);
4133 statement_AST = (TNode)currentAST.root;
4134 break;
4135 }
4136 case LITERAL_while:
4137 {
4138 TNode tmp121_AST = null;
4139 tmp121_AST = (TNode)astFactory.create(LT(1));
4140 astFactory.makeASTRoot(currentAST, tmp121_AST);
4142 match(LPAREN);
4143 expr();
4144 astFactory.addASTChild(currentAST, returnAST);
4145 match(RPAREN);
4146 statement();
4147 astFactory.addASTChild(currentAST, returnAST);
4148 statement_AST = (TNode)currentAST.root;
4149 break;
4150 }
4151 case LITERAL_do:
4152 {
4153 TNode tmp124_AST = null;
4154 tmp124_AST = (TNode)astFactory.create(LT(1));
4155 astFactory.makeASTRoot(currentAST, tmp124_AST);
4157 statement();
4158 astFactory.addASTChild(currentAST, returnAST);
4160 match(LPAREN);
4161 expr();
4162 astFactory.addASTChild(currentAST, returnAST);
4163 match(RPAREN);
4164 match(SEMI);
4165 statement_AST = (TNode)currentAST.root;
4166 break;
4167 }
4168 case LITERAL_for:
4169 {
4171 TNode tmp130_AST = null;
4172 tmp130_AST = (TNode)astFactory.create(LT(1));
4173 match(LPAREN);
4174 {
4175 switch ( LA(1)) {
4176 case LITERAL_asm:
4177 case ID:
4178 case STAR:
4179 case LPAREN:
4180 case LAND:
4181 case BAND:
4182 case PLUS:
4183 case MINUS:
4184 case INC:
4185 case DEC:
4186 case LITERAL_sizeof:
4187 case BNOT:
4188 case LNOT:
4189 case CharLiteral:
4190 case StringLiteral:
4191 case Number:
4192 case LITERAL___alignof:
4193 case LITERAL___real:
4194 case LITERAL___imag:
4195 {
4196 expr();
4197 e1_AST = (TNode)returnAST;
4198 break;
4199 }
4200 case SEMI:
4201 {
4202 break;
4203 }
4204 default:
4205 {
4206 throw new NoViableAltException(LT(1), getFilename());
4207 }
4208 }
4209 }
4210 TNode tmp131_AST = null;
4211 tmp131_AST = (TNode)astFactory.create(LT(1));
4212 match(SEMI);
4213 {
4214 switch ( LA(1)) {
4215 case LITERAL_asm:
4216 case ID:
4217 case STAR:
4218 case LPAREN:
4219 case LAND:
4220 case BAND:
4221 case PLUS:
4222 case MINUS:
4223 case INC:
4224 case DEC:
4225 case LITERAL_sizeof:
4226 case BNOT:
4227 case LNOT:
4228 case CharLiteral:
4229 case StringLiteral:
4230 case Number:
4231 case LITERAL___alignof:
4232 case LITERAL___real:
4233 case LITERAL___imag:
4234 {
4235 expr();
4236 e2_AST = (TNode)returnAST;
4237 break;
4238 }
4239 case SEMI:
4240 {
4241 break;
4242 }
4243 default:
4244 {
4245 throw new NoViableAltException(LT(1), getFilename());
4246 }
4247 }
4248 }
4249 TNode tmp132_AST = null;
4250 tmp132_AST = (TNode)astFactory.create(LT(1));
4251 match(SEMI);
4252 {
4253 switch ( LA(1)) {
4254 case LITERAL_asm:
4255 case ID:
4256 case STAR:
4257 case LPAREN:
4258 case LAND:
4259 case BAND:
4260 case PLUS:
4261 case MINUS:
4262 case INC:
4263 case DEC:
4264 case LITERAL_sizeof:
4265 case BNOT:
4266 case LNOT:
4267 case CharLiteral:
4268 case StringLiteral:
4269 case Number:
4270 case LITERAL___alignof:
4271 case LITERAL___real:
4272 case LITERAL___imag:
4273 {
4274 expr();
4275 e3_AST = (TNode)returnAST;
4276 break;
4277 }
4278 case RPAREN:
4279 {
4280 break;
4281 }
4282 default:
4283 {
4284 throw new NoViableAltException(LT(1), getFilename());
4285 }
4286 }
4287 }
4288 TNode tmp133_AST = null;
4289 tmp133_AST = (TNode)astFactory.create(LT(1));
4290 match(RPAREN);
4291 statement();
4292 s_AST = (TNode)returnAST;
4293 if ( inputState.guessing==0 ) {
4294 statement_AST = (TNode)currentAST.root;
4295
4296 if ( e1_AST == null) { e1_AST = (TNode) (TNode)astFactory.create(NEmptyExpression); }
4297 if ( e2_AST == null) { e2_AST = (TNode) (TNode)astFactory.create(NEmptyExpression); }
4298 if ( e3_AST == null) { e3_AST = (TNode) (TNode)astFactory.create(NEmptyExpression); }
4299 statement_AST = (TNode)astFactory.make( (new ASTArray(5)).add((TNode)astFactory.create(LITERAL_for,"for")).add(e1_AST).add(e2_AST).add(e3_AST).add(s_AST));
4300
4301 currentAST.root = statement_AST;
4302 currentAST.child = statement_AST!=null &&statement_AST.getFirstChild()!=null ?
4303 statement_AST.getFirstChild() : statement_AST;
4304 currentAST.advanceChildToEnd();
4305 }
4306 break;
4307 }
4308 case LITERAL_goto:
4309 {
4310 TNode tmp134_AST = null;
4311 tmp134_AST = (TNode)astFactory.create(LT(1));
4312 astFactory.makeASTRoot(currentAST, tmp134_AST);
4314 expr();
4315 astFactory.addASTChild(currentAST, returnAST);
4316 match(SEMI);
4317 statement_AST = (TNode)currentAST.root;
4318 break;
4319 }
4320 case LITERAL_continue:
4321 {
4322 TNode tmp136_AST = null;
4323 tmp136_AST = (TNode)astFactory.create(LT(1));
4324 astFactory.addASTChild(currentAST, tmp136_AST);
4326 match(SEMI);
4327 statement_AST = (TNode)currentAST.root;
4328 break;
4329 }
4330 case LITERAL_break:
4331 {
4332 TNode tmp138_AST = null;
4333 tmp138_AST = (TNode)astFactory.create(LT(1));
4334 astFactory.addASTChild(currentAST, tmp138_AST);
4336 match(SEMI);
4337 statement_AST = (TNode)currentAST.root;
4338 break;
4339 }
4340 case LITERAL_return:
4341 {
4342 TNode tmp140_AST = null;
4343 tmp140_AST = (TNode)astFactory.create(LT(1));
4344 astFactory.makeASTRoot(currentAST, tmp140_AST);
4346 {
4347 switch ( LA(1)) {
4348 case LITERAL_asm:
4349 case ID:
4350 case STAR:
4351 case LPAREN:
4352 case LAND:
4353 case BAND:
4354 case PLUS:
4355 case MINUS:
4356 case INC:
4357 case DEC:
4358 case LITERAL_sizeof:
4359 case BNOT:
4360 case LNOT:
4361 case CharLiteral:
4362 case StringLiteral:
4363 case Number:
4364 case LITERAL___alignof:
4365 case LITERAL___real:
4366 case LITERAL___imag:
4367 {
4368 expr();
4369 astFactory.addASTChild(currentAST, returnAST);
4370 break;
4371 }
4372 case SEMI:
4373 {
4374 break;
4375 }
4376 default:
4377 {
4378 throw new NoViableAltException(LT(1), getFilename());
4379 }
4380 }
4381 }
4382 match(SEMI);
4383 statement_AST = (TNode)currentAST.root;
4384 break;
4385 }
4386 case LITERAL_case:
4387 {
4388 TNode tmp142_AST = null;
4389 tmp142_AST = (TNode)astFactory.create(LT(1));
4390 astFactory.makeASTRoot(currentAST, tmp142_AST);
4392 {
4393 boolean synPredMatched153 = false;
4394 if (((_tokenSet_3.member(LA(1))) && (_tokenSet_26.member(LA(2))))) {
4395 int _m153 = mark();
4396 synPredMatched153 = true;
4397 inputState.guessing++;
4398 try {
4399 {
4400 constExpr();
4401 match(VARARGS);
4402 }
4403 }
4404 catch (RecognitionException pe) {
4405 synPredMatched153 = false;
4406 }
4407 rewind(_m153);
4408inputState.guessing--;
4409 }
4410 if ( synPredMatched153 ) {
4411 rangeExpr();
4412 astFactory.addASTChild(currentAST, returnAST);
4413 }
4414 else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_63.member(LA(2)))) {
4415 constExpr();
4416 astFactory.addASTChild(currentAST, returnAST);
4417 }
4418 else {
4419 throw new NoViableAltException(LT(1), getFilename());
4420 }
4421
4422 }
4423 match(COLON);
4424 {
4425 if ((_tokenSet_62.member(LA(1))) && (_tokenSet_64.member(LA(2)))) {
4426 statement();
4427 astFactory.addASTChild(currentAST, returnAST);
4428 }
4429 else if ((_tokenSet_65.member(LA(1))) && (_tokenSet_66.member(LA(2)))) {
4430 }
4431 else {
4432 throw new NoViableAltException(LT(1), getFilename());
4433 }
4434
4435 }
4436 statement_AST = (TNode)currentAST.root;
4437 break;
4438 }
4439 case LITERAL_default:
4440 {
4441 TNode tmp144_AST = null;
4442 tmp144_AST = (TNode)astFactory.create(LT(1));
4443 astFactory.makeASTRoot(currentAST, tmp144_AST);
4445 match(COLON);
4446 {
4447 if ((_tokenSet_62.member(LA(1))) && (_tokenSet_64.member(LA(2)))) {
4448 statement();
4449 astFactory.addASTChild(currentAST, returnAST);
4450 }
4451 else if ((_tokenSet_65.member(LA(1))) && (_tokenSet_66.member(LA(2)))) {
4452 }
4453 else {
4454 throw new NoViableAltException(LT(1), getFilename());
4455 }
4456
4457 }
4458 statement_AST = (TNode)currentAST.root;
4459 break;
4460 }
4461 case LITERAL_if:
4462 {
4463 TNode tmp146_AST = null;
4464 tmp146_AST = (TNode)astFactory.create(LT(1));
4465 astFactory.makeASTRoot(currentAST, tmp146_AST);
4467 match(LPAREN);
4468 expr();
4469 astFactory.addASTChild(currentAST, returnAST);
4470 match(RPAREN);
4471 statement();
4472 astFactory.addASTChild(currentAST, returnAST);
4473 {
4474 if ((LA(1)==LITERAL_else) && (_tokenSet_62.member(LA(2)))) {
4475 TNode tmp149_AST = null;
4476 tmp149_AST = (TNode)astFactory.create(LT(1));
4477 astFactory.addASTChild(currentAST, tmp149_AST);
4479 statement();
4480 astFactory.addASTChild(currentAST, returnAST);
4481 }
4482 else if ((_tokenSet_65.member(LA(1))) && (_tokenSet_66.member(LA(2)))) {
4483 }
4484 else {
4485 throw new NoViableAltException(LT(1), getFilename());
4486 }
4487
4488 }
4489 statement_AST = (TNode)currentAST.root;
4490 break;
4491 }
4492 case LITERAL_switch:
4493 {
4494 TNode tmp150_AST = null;
4495 tmp150_AST = (TNode)astFactory.create(LT(1));
4496 astFactory.makeASTRoot(currentAST, tmp150_AST);
4498 match(LPAREN);
4499 expr();
4500 astFactory.addASTChild(currentAST, returnAST);
4501 match(RPAREN);
4502 statement();
4503 astFactory.addASTChild(currentAST, returnAST);
4504 statement_AST = (TNode)currentAST.root;
4505 break;
4506 }
4507 default:
4508 if ((_tokenSet_3.member(LA(1))) && (_tokenSet_67.member(LA(2)))) {
4509 expr();
4510 astFactory.addASTChild(currentAST, returnAST);
4511 match(SEMI);
4512 if ( inputState.guessing==0 ) {
4513 statement_AST = (TNode)currentAST.root;
4514 statement_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NStatementExpr)).add(statement_AST));
4515 currentAST.root = statement_AST;
4516 currentAST.child = statement_AST!=null &&statement_AST.getFirstChild()!=null ?
4517 statement_AST.getFirstChild() : statement_AST;
4518 currentAST.advanceChildToEnd();
4519 }
4520 statement_AST = (TNode)currentAST.root;
4521 }
4522 else if ((LA(1)==ID) && (LA(2)==COLON)) {
4523 TNode tmp154_AST = null;
4524 tmp154_AST = (TNode)astFactory.create(LT(1));
4525 astFactory.addASTChild(currentAST, tmp154_AST);
4526 match(ID);
4527 match(COLON);
4528 {
4529 if ((_tokenSet_62.member(LA(1))) && (_tokenSet_64.member(LA(2)))) {
4530 statement();
4531 astFactory.addASTChild(currentAST, returnAST);
4532 }
4533 else if ((_tokenSet_65.member(LA(1))) && (_tokenSet_66.member(LA(2)))) {
4534 }
4535 else {
4536 throw new NoViableAltException(LT(1), getFilename());
4537 }
4538
4539 }
4540 if ( inputState.guessing==0 ) {
4541 statement_AST = (TNode)currentAST.root;
4542 statement_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NLabel)).add(statement_AST));
4543 currentAST.root = statement_AST;
4544 currentAST.child = statement_AST!=null &&statement_AST.getFirstChild()!=null ?
4545 statement_AST.getFirstChild() : statement_AST;
4546 currentAST.advanceChildToEnd();
4547 }
4548 statement_AST = (TNode)currentAST.root;
4549 }
4550 else {
4551 throw new NoViableAltException(LT(1), getFilename());
4552 }
4553 }
4554 }
4555 catch (RecognitionException ex) {
4556 if (inputState.guessing==0) {
4557 reportError(ex);
4558 recover(ex,_tokenSet_65);
4559 } else {
4560 throw ex;
4561 }
4562 }
4563 returnAST = statement_AST;
4564 }
4565
4566 public final void conditionalExpr() throws RecognitionException, TokenStreamException {
4567
4568 returnAST = null;
4569 ASTPair currentAST = new ASTPair();
4570 TNode conditionalExpr_AST = null;
4571
4572 try { // for error handling
4573 logicalOrExpr();
4574 astFactory.addASTChild(currentAST, returnAST);
4575 {
4576 switch ( LA(1)) {
4577 case QUESTION:
4578 {
4579 TNode tmp156_AST = null;
4580 tmp156_AST = (TNode)astFactory.create(LT(1));
4581 astFactory.makeASTRoot(currentAST, tmp156_AST);
4582 match(QUESTION);
4583 {
4584 switch ( LA(1)) {
4585 case LITERAL_asm:
4586 case ID:
4587 case STAR:
4588 case LPAREN:
4589 case LAND:
4590 case BAND:
4591 case PLUS:
4592 case MINUS:
4593 case INC:
4594 case DEC:
4595 case LITERAL_sizeof:
4596 case BNOT:
4597 case LNOT:
4598 case CharLiteral:
4599 case StringLiteral:
4600 case Number:
4601 case LITERAL___alignof:
4602 case LITERAL___real:
4603 case LITERAL___imag:
4604 {
4605 expr();
4606 astFactory.addASTChild(currentAST, returnAST);
4607 break;
4608 }
4609 case COLON:
4610 {
4611 break;
4612 }
4613 default:
4614 {
4615 throw new NoViableAltException(LT(1), getFilename());
4616 }
4617 }
4618 }
4619 TNode tmp157_AST = null;
4620 tmp157_AST = (TNode)astFactory.create(LT(1));
4621 astFactory.addASTChild(currentAST, tmp157_AST);
4622 match(COLON);
4624 astFactory.addASTChild(currentAST, returnAST);
4625 break;
4626 }
4627 case LITERAL_asm:
4628 case RCURLY:
4629 case SEMI:
4630 case COMMA:
4631 case COLON:
4632 case ASSIGN:
4633 case RPAREN:
4634 case RBRACKET:
4635 case VARARGS:
4636 case DIV_ASSIGN:
4637 case PLUS_ASSIGN:
4638 case MINUS_ASSIGN:
4639 case STAR_ASSIGN:
4640 case MOD_ASSIGN:
4641 case RSHIFT_ASSIGN:
4642 case LSHIFT_ASSIGN:
4643 case BAND_ASSIGN:
4644 case BOR_ASSIGN:
4645 case BXOR_ASSIGN:
4647 {
4648 break;
4649 }
4650 default:
4651 {
4652 throw new NoViableAltException(LT(1), getFilename());
4653 }
4654 }
4655 }
4656 conditionalExpr_AST = (TNode)currentAST.root;
4657 }
4658 catch (RecognitionException ex) {
4659 if (inputState.guessing==0) {
4660 reportError(ex);
4661 recover(ex,_tokenSet_68);
4662 } else {
4663 throw ex;
4664 }
4665 }
4666 returnAST = conditionalExpr_AST;
4667 }
4668
4669 public final void logicalOrExpr() throws RecognitionException, TokenStreamException {
4670
4671 returnAST = null;
4672 ASTPair currentAST = new ASTPair();
4673 TNode logicalOrExpr_AST = null;
4674
4675 try { // for error handling
4677 astFactory.addASTChild(currentAST, returnAST);
4678 {
4679 _loop266:
4680 do {
4681 if ((LA(1)==LOR)) {
4682 TNode tmp158_AST = null;
4683 tmp158_AST = (TNode)astFactory.create(LT(1));
4684 astFactory.makeASTRoot(currentAST, tmp158_AST);
4685 match(LOR);
4687 astFactory.addASTChild(currentAST, returnAST);
4688 }
4689 else {
4690 break _loop266;
4691 }
4692
4693 } while (true);
4694 }
4695 logicalOrExpr_AST = (TNode)currentAST.root;
4696 }
4697 catch (RecognitionException ex) {
4698 if (inputState.guessing==0) {
4699 reportError(ex);
4700 recover(ex,_tokenSet_69);
4701 } else {
4702 throw ex;
4703 }
4704 }
4705 returnAST = logicalOrExpr_AST;
4706 }
4707
4708 public final void castExpr() throws RecognitionException, TokenStreamException {
4709
4710 returnAST = null;
4711 ASTPair currentAST = new ASTPair();
4712 TNode castExpr_AST = null;
4713
4714 try { // for error handling
4715 boolean synPredMatched163 = false;
4716 if (((LA(1)==LPAREN) && (_tokenSet_43.member(LA(2))))) {
4717 int _m163 = mark();
4718 synPredMatched163 = true;
4719 inputState.guessing++;
4720 try {
4721 {
4722 match(LPAREN);
4723 typeName();
4724 match(RPAREN);
4725 }
4726 }
4727 catch (RecognitionException pe) {
4728 synPredMatched163 = false;
4729 }
4730 rewind(_m163);
4731inputState.guessing--;
4732 }
4733 if ( synPredMatched163 ) {
4734 TNode tmp159_AST = null;
4735 tmp159_AST = (TNode)astFactory.create(LT(1));
4736 astFactory.makeASTRoot(currentAST, tmp159_AST);
4737 match(LPAREN);
4738 typeName();
4739 astFactory.addASTChild(currentAST, returnAST);
4740 TNode tmp160_AST = null;
4741 tmp160_AST = (TNode)astFactory.create(LT(1));
4742 astFactory.addASTChild(currentAST, tmp160_AST);
4743 match(RPAREN);
4744 {
4745 switch ( LA(1)) {
4746 case LITERAL_asm:
4747 case ID:
4748 case STAR:
4749 case LPAREN:
4750 case LAND:
4751 case BAND:
4752 case PLUS:
4753 case MINUS:
4754 case INC:
4755 case DEC:
4756 case LITERAL_sizeof:
4757 case BNOT:
4758 case LNOT:
4759 case CharLiteral:
4760 case StringLiteral:
4761 case Number:
4762 case LITERAL___alignof:
4763 case LITERAL___real:
4764 case LITERAL___imag:
4765 {
4766 castExpr();
4767 astFactory.addASTChild(currentAST, returnAST);
4768 break;
4769 }
4770 case LCURLY:
4771 {
4773 astFactory.addASTChild(currentAST, returnAST);
4774 break;
4775 }
4776 default:
4777 {
4778 throw new NoViableAltException(LT(1), getFilename());
4779 }
4780 }
4781 }
4782 if ( inputState.guessing==0 ) {
4783 castExpr_AST = (TNode)currentAST.root;
4784 castExpr_AST.setType(NCast);
4785 }
4786 castExpr_AST = (TNode)currentAST.root;
4787 }
4788 else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_70.member(LA(2)))) {
4789 unaryExpr();
4790 astFactory.addASTChild(currentAST, returnAST);
4791 castExpr_AST = (TNode)currentAST.root;
4792 }
4793 else {
4794 throw new NoViableAltException(LT(1), getFilename());
4795 }
4796
4797 }
4798 catch (RecognitionException ex) {
4799 if (inputState.guessing==0) {
4800 reportError(ex);
4801 recover(ex,_tokenSet_28);
4802 } else {
4803 throw ex;
4804 }
4805 }
4806 returnAST = castExpr_AST;
4807 }
4808
4809 public final void unaryExpr() throws RecognitionException, TokenStreamException {
4810
4811 returnAST = null;
4812 ASTPair currentAST = new ASTPair();
4813 TNode unaryExpr_AST = null;
4814 TNode u_AST = null;
4815
4816 try { // for error handling
4817 switch ( LA(1)) {
4818 case ID:
4819 case LPAREN:
4820 case CharLiteral:
4821 case StringLiteral:
4822 case Number:
4823 {
4824 postfixExpr();
4825 astFactory.addASTChild(currentAST, returnAST);
4826 unaryExpr_AST = (TNode)currentAST.root;
4827 break;
4828 }
4829 case INC:
4830 {
4831 TNode tmp161_AST = null;
4832 tmp161_AST = (TNode)astFactory.create(LT(1));
4833 astFactory.makeASTRoot(currentAST, tmp161_AST);
4834 match(INC);
4835 castExpr();
4836 astFactory.addASTChild(currentAST, returnAST);
4837 unaryExpr_AST = (TNode)currentAST.root;
4838 break;
4839 }
4840 case DEC:
4841 {
4842 TNode tmp162_AST = null;
4843 tmp162_AST = (TNode)astFactory.create(LT(1));
4844 astFactory.makeASTRoot(currentAST, tmp162_AST);
4845 match(DEC);
4846 castExpr();
4847 astFactory.addASTChild(currentAST, returnAST);
4848 unaryExpr_AST = (TNode)currentAST.root;
4849 break;
4850 }
4851 case STAR:
4852 case LAND:
4853 case BAND:
4854 case PLUS:
4855 case MINUS:
4856 case BNOT:
4857 case LNOT:
4858 case LITERAL___real:
4859 case LITERAL___imag:
4860 {
4861 unaryOperator();
4862 u_AST = (TNode)returnAST;
4863 astFactory.addASTChild(currentAST, returnAST);
4864 castExpr();
4865 astFactory.addASTChild(currentAST, returnAST);
4866 if ( inputState.guessing==0 ) {
4867 unaryExpr_AST = (TNode)currentAST.root;
4868 unaryExpr_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NUnaryExpr)).add(unaryExpr_AST));
4869 currentAST.root = unaryExpr_AST;
4870 currentAST.child = unaryExpr_AST!=null &&unaryExpr_AST.getFirstChild()!=null ?
4871 unaryExpr_AST.getFirstChild() : unaryExpr_AST;
4872 currentAST.advanceChildToEnd();
4873 }
4874 unaryExpr_AST = (TNode)currentAST.root;
4875 break;
4876 }
4877 case LITERAL_sizeof:
4878 {
4879 TNode tmp163_AST = null;
4880 tmp163_AST = (TNode)astFactory.create(LT(1));
4881 astFactory.makeASTRoot(currentAST, tmp163_AST);
4883 {
4884 boolean synPredMatched184 = false;
4885 if (((LA(1)==LPAREN) && (_tokenSet_43.member(LA(2))))) {
4886 int _m184 = mark();
4887 synPredMatched184 = true;
4888 inputState.guessing++;
4889 try {
4890 {
4891 match(LPAREN);
4892 typeName();
4893 }
4894 }
4895 catch (RecognitionException pe) {
4896 synPredMatched184 = false;
4897 }
4898 rewind(_m184);
4899inputState.guessing--;
4900 }
4901 if ( synPredMatched184 ) {
4902 TNode tmp164_AST = null;
4903 tmp164_AST = (TNode)astFactory.create(LT(1));
4904 astFactory.addASTChild(currentAST, tmp164_AST);
4905 match(LPAREN);
4906 typeName();
4907 astFactory.addASTChild(currentAST, returnAST);
4908 TNode tmp165_AST = null;
4909 tmp165_AST = (TNode)astFactory.create(LT(1));
4910 astFactory.addASTChild(currentAST, tmp165_AST);
4911 match(RPAREN);
4912 }
4913 else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_70.member(LA(2)))) {
4914 unaryExpr();
4915 astFactory.addASTChild(currentAST, returnAST);
4916 }
4917 else {
4918 throw new NoViableAltException(LT(1), getFilename());
4919 }
4920
4921 }
4922 unaryExpr_AST = (TNode)currentAST.root;
4923 break;
4924 }
4925 case LITERAL___alignof:
4926 {
4927 TNode tmp166_AST = null;
4928 tmp166_AST = (TNode)astFactory.create(LT(1));
4929 astFactory.makeASTRoot(currentAST, tmp166_AST);
4931 {
4932 boolean synPredMatched187 = false;
4933 if (((LA(1)==LPAREN) && (_tokenSet_43.member(LA(2))))) {
4934 int _m187 = mark();
4935 synPredMatched187 = true;
4936 inputState.guessing++;
4937 try {
4938 {
4939 match(LPAREN);
4940 typeName();
4941 }
4942 }
4943 catch (RecognitionException pe) {
4944 synPredMatched187 = false;
4945 }
4946 rewind(_m187);
4947inputState.guessing--;
4948 }
4949 if ( synPredMatched187 ) {
4950 TNode tmp167_AST = null;
4951 tmp167_AST = (TNode)astFactory.create(LT(1));
4952 astFactory.addASTChild(currentAST, tmp167_AST);
4953 match(LPAREN);
4954 typeName();
4955 astFactory.addASTChild(currentAST, returnAST);
4956 TNode tmp168_AST = null;
4957 tmp168_AST = (TNode)astFactory.create(LT(1));
4958 astFactory.addASTChild(currentAST, tmp168_AST);
4959 match(RPAREN);
4960 }
4961 else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_70.member(LA(2)))) {
4962 unaryExpr();
4963 astFactory.addASTChild(currentAST, returnAST);
4964 }
4965 else {
4966 throw new NoViableAltException(LT(1), getFilename());
4967 }
4968
4969 }
4970 unaryExpr_AST = (TNode)currentAST.root;
4971 break;
4972 }
4973 case LITERAL_asm:
4974 {
4975 gnuAsmExpr();
4976 astFactory.addASTChild(currentAST, returnAST);
4977 unaryExpr_AST = (TNode)currentAST.root;
4978 break;
4979 }
4980 default:
4981 {
4982 throw new NoViableAltException(LT(1), getFilename());
4983 }
4984 }
4985 }
4986 catch (RecognitionException ex) {
4987 if (inputState.guessing==0) {
4988 reportError(ex);
4989 recover(ex,_tokenSet_28);
4990 } else {
4991 throw ex;
4992 }
4993 }
4994 returnAST = unaryExpr_AST;
4995 }
4996
4997 public final void nonemptyAbstractDeclarator() throws RecognitionException, TokenStreamException {
4998
4999 returnAST = null;
5000 ASTPair currentAST = new ASTPair();
5001 TNode nonemptyAbstractDeclarator_AST = null;
5002
5003 try { // for error handling
5004 {
5005 switch ( LA(1)) {
5006 case STAR:
5007 {
5008 pointerGroup();
5009 astFactory.addASTChild(currentAST, returnAST);
5010 {
5011 _loop173:
5012 do {
5013 switch ( LA(1)) {
5014 case LPAREN:
5015 {
5016 {
5017 TNode tmp169_AST = null;
5018 tmp169_AST = (TNode)astFactory.create(LT(1));
5019 astFactory.addASTChild(currentAST, tmp169_AST);
5020 match(LPAREN);
5021 {
5022 switch ( LA(1)) {
5023 case STAR:
5024 case LPAREN:
5025 case LBRACKET:
5026 {
5028 astFactory.addASTChild(currentAST, returnAST);
5029 break;
5030 }
5031 case LITERAL_typedef:
5032 case LITERAL_volatile:
5033 case LITERAL_struct:
5034 case LITERAL_union:
5035 case LITERAL_enum:
5036 case LITERAL_auto:
5037 case LITERAL_register:
5038 case LITERAL_extern:
5039 case LITERAL_static:
5040 case LITERAL_const:
5041 case LITERAL_void:
5042 case LITERAL_char:
5043 case LITERAL_short:
5044 case LITERAL_int:
5045 case LITERAL_long:
5046 case LITERAL_float:
5047 case LITERAL_double:
5048 case LITERAL_signed:
5049 case LITERAL_unsigned:
5050 case 27:
5051 case 28:
5052 case 29:
5053 case 30:
5054 case 31:
5055 case 32:
5056 case LITERAL_wchar_t:
5057 case 34:
5058 case 35:
5059 case 36:
5060 case 37:
5061 case LITERAL_ptrdiff_t:
5062 case LITERAL_intptr_t:
5063 case LITERAL_size_t:
5064 case LITERAL_uintptr_t:
5065 case ID:
5066 case LITERAL_inline:
5067 case LITERAL_typeof:
5068 case LITERAL___complex:
5069 {
5071 astFactory.addASTChild(currentAST, returnAST);
5072 break;
5073 }
5074 case COMMA:
5075 case RPAREN:
5076 {
5077 break;
5078 }
5079 default:
5080 {
5081 throw new NoViableAltException(LT(1), getFilename());
5082 }
5083 }
5084 }
5085 {
5086 switch ( LA(1)) {
5087 case COMMA:
5088 {
5089 match(COMMA);
5090 break;
5091 }
5092 case RPAREN:
5093 {
5094 break;
5095 }
5096 default:
5097 {
5098 throw new NoViableAltException(LT(1), getFilename());
5099 }
5100 }
5101 }
5102 TNode tmp171_AST = null;
5103 tmp171_AST = (TNode)astFactory.create(LT(1));
5104 astFactory.addASTChild(currentAST, tmp171_AST);
5105 match(RPAREN);
5106 }
5107 break;
5108 }
5109 case LBRACKET:
5110 {
5111 {
5112 TNode tmp172_AST = null;
5113 tmp172_AST = (TNode)astFactory.create(LT(1));
5114 astFactory.addASTChild(currentAST, tmp172_AST);
5115 match(LBRACKET);
5116 {
5117 switch ( LA(1)) {
5118 case LITERAL_asm:
5119 case ID:
5120 case STAR:
5121 case LPAREN:
5122 case LAND:
5123 case BAND:
5124 case PLUS:
5125 case MINUS:
5126 case INC:
5127 case DEC:
5128 case LITERAL_sizeof:
5129 case BNOT:
5130 case LNOT:
5131 case CharLiteral:
5132 case StringLiteral:
5133 case Number:
5134 case LITERAL___alignof:
5135 case LITERAL___real:
5136 case LITERAL___imag:
5137 {
5138 expr();
5139 astFactory.addASTChild(currentAST, returnAST);
5140 break;
5141 }
5142 case RBRACKET:
5143 {
5144 break;
5145 }
5146 default:
5147 {
5148 throw new NoViableAltException(LT(1), getFilename());
5149 }
5150 }
5151 }
5152 TNode tmp173_AST = null;
5153 tmp173_AST = (TNode)astFactory.create(LT(1));
5154 astFactory.addASTChild(currentAST, tmp173_AST);
5155 match(RBRACKET);
5156 }
5157 break;
5158 }
5159 default:
5160 {
5161 break _loop173;
5162 }
5163 }
5164 } while (true);
5165 }
5166 break;
5167 }
5168 case LPAREN:
5169 case LBRACKET:
5170 {
5171 {
5172 int _cnt180=0;
5173 _loop180:
5174 do {
5175 switch ( LA(1)) {
5176 case LPAREN:
5177 {
5178 {
5179 TNode tmp174_AST = null;
5180 tmp174_AST = (TNode)astFactory.create(LT(1));
5181 astFactory.addASTChild(currentAST, tmp174_AST);
5182 match(LPAREN);
5183 {
5184 switch ( LA(1)) {
5185 case STAR:
5186 case LPAREN:
5187 case LBRACKET:
5188 {
5190 astFactory.addASTChild(currentAST, returnAST);
5191 break;
5192 }
5193 case LITERAL_typedef:
5194 case LITERAL_volatile:
5195 case LITERAL_struct:
5196 case LITERAL_union:
5197 case LITERAL_enum:
5198 case LITERAL_auto:
5199 case LITERAL_register:
5200 case LITERAL_extern:
5201 case LITERAL_static:
5202 case LITERAL_const:
5203 case LITERAL_void:
5204 case LITERAL_char:
5205 case LITERAL_short:
5206 case LITERAL_int:
5207 case LITERAL_long:
5208 case LITERAL_float:
5209 case LITERAL_double:
5210 case LITERAL_signed:
5211 case LITERAL_unsigned:
5212 case 27:
5213 case 28:
5214 case 29:
5215 case 30:
5216 case 31:
5217 case 32:
5218 case LITERAL_wchar_t:
5219 case 34:
5220 case 35:
5221 case 36:
5222 case 37:
5223 case LITERAL_ptrdiff_t:
5224 case LITERAL_intptr_t:
5225 case LITERAL_size_t:
5226 case LITERAL_uintptr_t:
5227 case ID:
5228 case LITERAL_inline:
5229 case LITERAL_typeof:
5230 case LITERAL___complex:
5231 {
5233 astFactory.addASTChild(currentAST, returnAST);
5234 break;
5235 }
5236 case COMMA:
5237 case RPAREN:
5238 {
5239 break;
5240 }
5241 default:
5242 {
5243 throw new NoViableAltException(LT(1), getFilename());
5244 }
5245 }
5246 }
5247 {
5248 switch ( LA(1)) {
5249 case COMMA:
5250 {
5251 match(COMMA);
5252 break;
5253 }
5254 case RPAREN:
5255 {
5256 break;
5257 }
5258 default:
5259 {
5260 throw new NoViableAltException(LT(1), getFilename());
5261 }
5262 }
5263 }
5264 TNode tmp176_AST = null;
5265 tmp176_AST = (TNode)astFactory.create(LT(1));
5266 astFactory.addASTChild(currentAST, tmp176_AST);
5267 match(RPAREN);
5268 }
5269 break;
5270 }
5271 case LBRACKET:
5272 {
5273 {
5274 TNode tmp177_AST = null;
5275 tmp177_AST = (TNode)astFactory.create(LT(1));
5276 astFactory.addASTChild(currentAST, tmp177_AST);
5277 match(LBRACKET);
5278 {
5279 switch ( LA(1)) {
5280 case LITERAL_asm:
5281 case ID:
5282 case STAR:
5283 case LPAREN:
5284 case LAND:
5285 case BAND:
5286 case PLUS:
5287 case MINUS:
5288 case INC:
5289 case DEC:
5290 case LITERAL_sizeof:
5291 case BNOT:
5292 case LNOT:
5293 case CharLiteral:
5294 case StringLiteral:
5295 case Number:
5296 case LITERAL___alignof:
5297 case LITERAL___real:
5298 case LITERAL___imag:
5299 {
5300 expr();
5301 astFactory.addASTChild(currentAST, returnAST);
5302 break;
5303 }
5304 case RBRACKET:
5305 {
5306 break;
5307 }
5308 default:
5309 {
5310 throw new NoViableAltException(LT(1), getFilename());
5311 }
5312 }
5313 }
5314 TNode tmp178_AST = null;
5315 tmp178_AST = (TNode)astFactory.create(LT(1));
5316 astFactory.addASTChild(currentAST, tmp178_AST);
5317 match(RBRACKET);
5318 }
5319 break;
5320 }
5321 default:
5322 {
5323 if ( _cnt180>=1 ) { break _loop180; } else {throw new NoViableAltException(LT(1), getFilename());}
5324 }
5325 }
5326 _cnt180++;
5327 } while (true);
5328 }
5329 break;
5330 }
5331 default:
5332 {
5333 throw new NoViableAltException(LT(1), getFilename());
5334 }
5335 }
5336 }
5337 if ( inputState.guessing==0 ) {
5338 nonemptyAbstractDeclarator_AST = (TNode)currentAST.root;
5339 nonemptyAbstractDeclarator_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NNonemptyAbstractDeclarator)).add(nonemptyAbstractDeclarator_AST));
5340 currentAST.root = nonemptyAbstractDeclarator_AST;
5341 currentAST.child = nonemptyAbstractDeclarator_AST!=null &&nonemptyAbstractDeclarator_AST.getFirstChild()!=null ?
5342 nonemptyAbstractDeclarator_AST.getFirstChild() : nonemptyAbstractDeclarator_AST;
5343 currentAST.advanceChildToEnd();
5344 }
5345 nonemptyAbstractDeclarator_AST = (TNode)currentAST.root;
5346 }
5347 catch (RecognitionException ex) {
5348 if (inputState.guessing==0) {
5349 reportError(ex);
5350 recover(ex,_tokenSet_40);
5351 } else {
5352 throw ex;
5353 }
5354 }
5355 returnAST = nonemptyAbstractDeclarator_AST;
5356 }
5357
5358 public final void postfixExpr() throws RecognitionException, TokenStreamException {
5359
5360 returnAST = null;
5361 ASTPair currentAST = new ASTPair();
5362 TNode postfixExpr_AST = null;
5363
5364 try { // for error handling
5365 primaryExpr();
5366 astFactory.addASTChild(currentAST, returnAST);
5367 {
5368 switch ( LA(1)) {
5369 case LPAREN:
5370 case LBRACKET:
5371 case INC:
5372 case DEC:
5373 case PTR:
5374 case DOT:
5375 {
5376 postfixSuffix();
5377 astFactory.addASTChild(currentAST, returnAST);
5378 if ( inputState.guessing==0 ) {
5379 postfixExpr_AST = (TNode)currentAST.root;
5380 postfixExpr_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NPostfixExpr)).add(postfixExpr_AST));
5381 currentAST.root = postfixExpr_AST;
5382 currentAST.child = postfixExpr_AST!=null &&postfixExpr_AST.getFirstChild()!=null ?
5383 postfixExpr_AST.getFirstChild() : postfixExpr_AST;
5384 currentAST.advanceChildToEnd();
5385 }
5386 break;
5387 }
5388 case LITERAL_asm:
5389 case RCURLY:
5390 case SEMI:
5391 case COMMA:
5392 case COLON:
5393 case ASSIGN:
5394 case STAR:
5395 case RPAREN:
5396 case RBRACKET:
5397 case VARARGS:
5398 case DIV_ASSIGN:
5399 case PLUS_ASSIGN:
5400 case MINUS_ASSIGN:
5401 case STAR_ASSIGN:
5402 case MOD_ASSIGN:
5403 case RSHIFT_ASSIGN:
5404 case LSHIFT_ASSIGN:
5405 case BAND_ASSIGN:
5406 case BOR_ASSIGN:
5407 case BXOR_ASSIGN:
5408 case QUESTION:
5409 case LOR:
5410 case LAND:
5411 case BOR:
5412 case BXOR:
5413 case BAND:
5414 case EQUAL:
5415 case NOT_EQUAL:
5416 case LT:
5417 case LTE:
5418 case GT:
5419 case GTE:
5420 case LSHIFT:
5421 case RSHIFT:
5422 case PLUS:
5423 case MINUS:
5424 case DIV:
5425 case MOD:
5427 {
5428 break;
5429 }
5430 default:
5431 {
5432 throw new NoViableAltException(LT(1), getFilename());
5433 }
5434 }
5435 }
5436 postfixExpr_AST = (TNode)currentAST.root;
5437 }
5438 catch (RecognitionException ex) {
5439 if (inputState.guessing==0) {
5440 reportError(ex);
5441 recover(ex,_tokenSet_28);
5442 } else {
5443 throw ex;
5444 }
5445 }
5446 returnAST = postfixExpr_AST;
5447 }
5448
5449 public final void unaryOperator() throws RecognitionException, TokenStreamException {
5450
5451 returnAST = null;
5452 ASTPair currentAST = new ASTPair();
5453 TNode unaryOperator_AST = null;
5454
5455 try { // for error handling
5456 switch ( LA(1)) {
5457 case BAND:
5458 {
5459 TNode tmp179_AST = null;
5460 tmp179_AST = (TNode)astFactory.create(LT(1));
5461 astFactory.addASTChild(currentAST, tmp179_AST);
5462 match(BAND);
5463 unaryOperator_AST = (TNode)currentAST.root;
5464 break;
5465 }
5466 case STAR:
5467 {
5468 TNode tmp180_AST = null;
5469 tmp180_AST = (TNode)astFactory.create(LT(1));
5470 astFactory.addASTChild(currentAST, tmp180_AST);
5471 match(STAR);
5472 unaryOperator_AST = (TNode)currentAST.root;
5473 break;
5474 }
5475 case PLUS:
5476 {
5477 TNode tmp181_AST = null;
5478 tmp181_AST = (TNode)astFactory.create(LT(1));
5479 astFactory.addASTChild(currentAST, tmp181_AST);
5480 match(PLUS);
5481 unaryOperator_AST = (TNode)currentAST.root;
5482 break;
5483 }
5484 case MINUS:
5485 {
5486 TNode tmp182_AST = null;
5487 tmp182_AST = (TNode)astFactory.create(LT(1));
5488 astFactory.addASTChild(currentAST, tmp182_AST);
5489 match(MINUS);
5490 unaryOperator_AST = (TNode)currentAST.root;
5491 break;
5492 }
5493 case BNOT:
5494 {
5495 TNode tmp183_AST = null;
5496 tmp183_AST = (TNode)astFactory.create(LT(1));
5497 astFactory.addASTChild(currentAST, tmp183_AST);
5498 match(BNOT);
5499 unaryOperator_AST = (TNode)currentAST.root;
5500 break;
5501 }
5502 case LNOT:
5503 {
5504 TNode tmp184_AST = null;
5505 tmp184_AST = (TNode)astFactory.create(LT(1));
5506 astFactory.addASTChild(currentAST, tmp184_AST);
5507 match(LNOT);
5508 unaryOperator_AST = (TNode)currentAST.root;
5509 break;
5510 }
5511 case LAND:
5512 {
5513 TNode tmp185_AST = null;
5514 tmp185_AST = (TNode)astFactory.create(LT(1));
5515 astFactory.addASTChild(currentAST, tmp185_AST);
5516 match(LAND);
5517 unaryOperator_AST = (TNode)currentAST.root;
5518 break;
5519 }
5520 case LITERAL___real:
5521 {
5522 TNode tmp186_AST = null;
5523 tmp186_AST = (TNode)astFactory.create(LT(1));
5524 astFactory.addASTChild(currentAST, tmp186_AST);
5526 unaryOperator_AST = (TNode)currentAST.root;
5527 break;
5528 }
5529 case LITERAL___imag:
5530 {
5531 TNode tmp187_AST = null;
5532 tmp187_AST = (TNode)astFactory.create(LT(1));
5533 astFactory.addASTChild(currentAST, tmp187_AST);
5535 unaryOperator_AST = (TNode)currentAST.root;
5536 break;
5537 }
5538 default:
5539 {
5540 throw new NoViableAltException(LT(1), getFilename());
5541 }
5542 }
5543 }
5544 catch (RecognitionException ex) {
5545 if (inputState.guessing==0) {
5546 reportError(ex);
5547 recover(ex,_tokenSet_3);
5548 } else {
5549 throw ex;
5550 }
5551 }
5552 returnAST = unaryOperator_AST;
5553 }
5554
5555 public final void gnuAsmExpr() throws RecognitionException, TokenStreamException {
5556
5557 returnAST = null;
5558 ASTPair currentAST = new ASTPair();
5559 TNode gnuAsmExpr_AST = null;
5560
5561 try { // for error handling
5562 TNode tmp188_AST = null;
5563 tmp188_AST = (TNode)astFactory.create(LT(1));
5564 astFactory.makeASTRoot(currentAST, tmp188_AST);
5566 {
5567 switch ( LA(1)) {
5568 case LITERAL_volatile:
5569 {
5570 TNode tmp189_AST = null;
5571 tmp189_AST = (TNode)astFactory.create(LT(1));
5572 astFactory.addASTChild(currentAST, tmp189_AST);
5574 break;
5575 }
5576 case LPAREN:
5577 {
5578 break;
5579 }
5580 default:
5581 {
5582 throw new NoViableAltException(LT(1), getFilename());
5583 }
5584 }
5585 }
5586 TNode tmp190_AST = null;
5587 tmp190_AST = (TNode)astFactory.create(LT(1));
5588 astFactory.addASTChild(currentAST, tmp190_AST);
5589 match(LPAREN);
5590 stringConst();
5591 astFactory.addASTChild(currentAST, returnAST);
5592 {
5593 if ((LA(1)==COLON) && (_tokenSet_71.member(LA(2)))) {
5594 TNode tmp191_AST = null;
5595 tmp191_AST = (TNode)astFactory.create(LT(1));
5596 astFactory.addASTChild(currentAST, tmp191_AST);
5597 match(COLON);
5598 {
5599 switch ( LA(1)) {
5600 case StringLiteral:
5601 {
5603 astFactory.addASTChild(currentAST, returnAST);
5604 {
5605 _loop194:
5606 do {
5607 if ((LA(1)==COMMA)) {
5608 TNode tmp192_AST = null;
5609 tmp192_AST = (TNode)astFactory.create(LT(1));
5610 astFactory.addASTChild(currentAST, tmp192_AST);
5611 match(COMMA);
5613 astFactory.addASTChild(currentAST, returnAST);
5614 }
5615 else {
5616 break _loop194;
5617 }
5618
5619 } while (true);
5620 }
5621 break;
5622 }
5623 case COLON:
5624 case RPAREN:
5625 {
5626 break;
5627 }
5628 default:
5629 {
5630 throw new NoViableAltException(LT(1), getFilename());
5631 }
5632 }
5633 }
5634 {
5635 if ((LA(1)==COLON) && (_tokenSet_71.member(LA(2)))) {
5636 TNode tmp193_AST = null;
5637 tmp193_AST = (TNode)astFactory.create(LT(1));
5638 astFactory.addASTChild(currentAST, tmp193_AST);
5639 match(COLON);
5640 {
5641 switch ( LA(1)) {
5642 case StringLiteral:
5643 {
5645 astFactory.addASTChild(currentAST, returnAST);
5646 {
5647 _loop198:
5648 do {
5649 if ((LA(1)==COMMA)) {
5650 TNode tmp194_AST = null;
5651 tmp194_AST = (TNode)astFactory.create(LT(1));
5652 astFactory.addASTChild(currentAST, tmp194_AST);
5653 match(COMMA);
5655 astFactory.addASTChild(currentAST, returnAST);
5656 }
5657 else {
5658 break _loop198;
5659 }
5660
5661 } while (true);
5662 }
5663 break;
5664 }
5665 case COLON:
5666 case RPAREN:
5667 {
5668 break;
5669 }
5670 default:
5671 {
5672 throw new NoViableAltException(LT(1), getFilename());
5673 }
5674 }
5675 }
5676 }
5677 else if ((LA(1)==COLON||LA(1)==RPAREN) && (_tokenSet_72.member(LA(2)))) {
5678 }
5679 else {
5680 throw new NoViableAltException(LT(1), getFilename());
5681 }
5682
5683 }
5684 }
5685 else if ((LA(1)==COLON||LA(1)==RPAREN) && (_tokenSet_72.member(LA(2)))) {
5686 }
5687 else {
5688 throw new NoViableAltException(LT(1), getFilename());
5689 }
5690
5691 }
5692 {
5693 switch ( LA(1)) {
5694 case COLON:
5695 {
5696 TNode tmp195_AST = null;
5697 tmp195_AST = (TNode)astFactory.create(LT(1));
5698 astFactory.addASTChild(currentAST, tmp195_AST);
5699 match(COLON);
5700 stringConst();
5701 astFactory.addASTChild(currentAST, returnAST);
5702 {
5703 _loop201:
5704 do {
5705 if ((LA(1)==COMMA)) {
5706 TNode tmp196_AST = null;
5707 tmp196_AST = (TNode)astFactory.create(LT(1));
5708 astFactory.addASTChild(currentAST, tmp196_AST);
5709 match(COMMA);
5710 stringConst();
5711 astFactory.addASTChild(currentAST, returnAST);
5712 }
5713 else {
5714 break _loop201;
5715 }
5716
5717 } while (true);
5718 }
5719 break;
5720 }
5721 case RPAREN:
5722 {
5723 break;
5724 }
5725 default:
5726 {
5727 throw new NoViableAltException(LT(1), getFilename());
5728 }
5729 }
5730 }
5731 TNode tmp197_AST = null;
5732 tmp197_AST = (TNode)astFactory.create(LT(1));
5733 astFactory.addASTChild(currentAST, tmp197_AST);
5734 match(RPAREN);
5735 if ( inputState.guessing==0 ) {
5736 gnuAsmExpr_AST = (TNode)currentAST.root;
5737 gnuAsmExpr_AST.setType(NGnuAsmExpr);
5738 }
5739 gnuAsmExpr_AST = (TNode)currentAST.root;
5740 }
5741 catch (RecognitionException ex) {
5742 if (inputState.guessing==0) {
5743 reportError(ex);
5744 recover(ex,_tokenSet_28);
5745 } else {
5746 throw ex;
5747 }
5748 }
5749 returnAST = gnuAsmExpr_AST;
5750 }
5751
5752 public final void strOptExprPair() throws RecognitionException, TokenStreamException {
5753
5754 returnAST = null;
5755 ASTPair currentAST = new ASTPair();
5756 TNode strOptExprPair_AST = null;
5757
5758 try { // for error handling
5759 stringConst();
5760 astFactory.addASTChild(currentAST, returnAST);
5761 {
5762 switch ( LA(1)) {
5763 case LPAREN:
5764 {
5765 TNode tmp198_AST = null;
5766 tmp198_AST = (TNode)astFactory.create(LT(1));
5767 astFactory.addASTChild(currentAST, tmp198_AST);
5768 match(LPAREN);
5769 expr();
5770 astFactory.addASTChild(currentAST, returnAST);
5771 TNode tmp199_AST = null;
5772 tmp199_AST = (TNode)astFactory.create(LT(1));
5773 astFactory.addASTChild(currentAST, tmp199_AST);
5774 match(RPAREN);
5775 break;
5776 }
5777 case COMMA:
5778 case COLON:
5779 case RPAREN:
5780 {
5781 break;
5782 }
5783 default:
5784 {
5785 throw new NoViableAltException(LT(1), getFilename());
5786 }
5787 }
5788 }
5789 strOptExprPair_AST = (TNode)currentAST.root;
5790 }
5791 catch (RecognitionException ex) {
5792 if (inputState.guessing==0) {
5793 reportError(ex);
5794 recover(ex,_tokenSet_73);
5795 } else {
5796 throw ex;
5797 }
5798 }
5799 returnAST = strOptExprPair_AST;
5800 }
5801
5802 public final void primaryExpr() throws RecognitionException, TokenStreamException {
5803
5804 returnAST = null;
5805 ASTPair currentAST = new ASTPair();
5806 TNode primaryExpr_AST = null;
5807
5808 try { // for error handling
5809 switch ( LA(1)) {
5810 case ID:
5811 {
5812 TNode tmp200_AST = null;
5813 tmp200_AST = (TNode)astFactory.create(LT(1));
5814 astFactory.addASTChild(currentAST, tmp200_AST);
5815 match(ID);
5816 primaryExpr_AST = (TNode)currentAST.root;
5817 break;
5818 }
5819 case Number:
5820 {
5821 TNode tmp201_AST = null;
5822 tmp201_AST = (TNode)astFactory.create(LT(1));
5823 astFactory.addASTChild(currentAST, tmp201_AST);
5824 match(Number);
5825 primaryExpr_AST = (TNode)currentAST.root;
5826 break;
5827 }
5828 case CharLiteral:
5829 {
5830 charConst();
5831 astFactory.addASTChild(currentAST, returnAST);
5832 primaryExpr_AST = (TNode)currentAST.root;
5833 break;
5834 }
5835 case StringLiteral:
5836 {
5837 stringConst();
5838 astFactory.addASTChild(currentAST, returnAST);
5839 primaryExpr_AST = (TNode)currentAST.root;
5840 break;
5841 }
5842 default:
5843 boolean synPredMatched206 = false;
5844 if (((LA(1)==LPAREN) && (LA(2)==LCURLY))) {
5845 int _m206 = mark();
5846 synPredMatched206 = true;
5847 inputState.guessing++;
5848 try {
5849 {
5850 match(LPAREN);
5851 match(LCURLY);
5852 }
5853 }
5854 catch (RecognitionException pe) {
5855 synPredMatched206 = false;
5856 }
5857 rewind(_m206);
5858inputState.guessing--;
5859 }
5860 if ( synPredMatched206 ) {
5861 TNode tmp202_AST = null;
5862 tmp202_AST = (TNode)astFactory.create(LT(1));
5863 astFactory.makeASTRoot(currentAST, tmp202_AST);
5864 match(LPAREN);
5866 astFactory.addASTChild(currentAST, returnAST);
5867 TNode tmp203_AST = null;
5868 tmp203_AST = (TNode)astFactory.create(LT(1));
5869 astFactory.addASTChild(currentAST, tmp203_AST);
5870 match(RPAREN);
5871 primaryExpr_AST = (TNode)currentAST.root;
5872 }
5873 else if ((LA(1)==LPAREN) && (_tokenSet_3.member(LA(2)))) {
5874 TNode tmp204_AST = null;
5875 tmp204_AST = (TNode)astFactory.create(LT(1));
5876 astFactory.makeASTRoot(currentAST, tmp204_AST);
5877 match(LPAREN);
5878 expr();
5879 astFactory.addASTChild(currentAST, returnAST);
5880 TNode tmp205_AST = null;
5881 tmp205_AST = (TNode)astFactory.create(LT(1));
5882 astFactory.addASTChild(currentAST, tmp205_AST);
5883 match(RPAREN);
5884 if ( inputState.guessing==0 ) {
5885 primaryExpr_AST = (TNode)currentAST.root;
5886 primaryExpr_AST.setType(NExpressionGroup);
5887 }
5888 primaryExpr_AST = (TNode)currentAST.root;
5889 }
5890 else {
5891 throw new NoViableAltException(LT(1), getFilename());
5892 }
5893 }
5894 }
5895 catch (RecognitionException ex) {
5896 if (inputState.guessing==0) {
5897 reportError(ex);
5898 recover(ex,_tokenSet_56);
5899 } else {
5900 throw ex;
5901 }
5902 }
5903 returnAST = primaryExpr_AST;
5904 }
5905
5906 protected final void charConst() throws RecognitionException, TokenStreamException {
5907
5908 returnAST = null;
5909 ASTPair currentAST = new ASTPair();
5910 TNode charConst_AST = null;
5911
5912 try { // for error handling
5913 TNode tmp206_AST = null;
5914 tmp206_AST = (TNode)astFactory.create(LT(1));
5915 astFactory.addASTChild(currentAST, tmp206_AST);
5917 charConst_AST = (TNode)currentAST.root;
5918 }
5919 catch (RecognitionException ex) {
5920 if (inputState.guessing==0) {
5921 reportError(ex);
5922 recover(ex,_tokenSet_56);
5923 } else {
5924 throw ex;
5925 }
5926 }
5927 returnAST = charConst_AST;
5928 }
5929
5930 public final void storageClassSpecifier() throws RecognitionException, TokenStreamException {
5931
5932 returnAST = null;
5933 ASTPair currentAST = new ASTPair();
5934 TNode storageClassSpecifier_AST = null;
5935
5936 try { // for error handling
5937 switch ( LA(1)) {
5938 case LITERAL_auto:
5939 {
5940 TNode tmp207_AST = null;
5941 tmp207_AST = (TNode)astFactory.create(LT(1));
5942 astFactory.addASTChild(currentAST, tmp207_AST);
5944 storageClassSpecifier_AST = (TNode)currentAST.root;
5945 break;
5946 }
5947 case LITERAL_register:
5948 {
5949 TNode tmp208_AST = null;
5950 tmp208_AST = (TNode)astFactory.create(LT(1));
5951 astFactory.addASTChild(currentAST, tmp208_AST);
5953 storageClassSpecifier_AST = (TNode)currentAST.root;
5954 break;
5955 }
5956 case LITERAL_typedef:
5957 {
5958 TNode tmp209_AST = null;
5959 tmp209_AST = (TNode)astFactory.create(LT(1));
5960 astFactory.addASTChild(currentAST, tmp209_AST);
5962 storageClassSpecifier_AST = (TNode)currentAST.root;
5963 break;
5964 }
5965 case LITERAL_extern:
5966 case LITERAL_static:
5967 case LITERAL_inline:
5968 {
5970 astFactory.addASTChild(currentAST, returnAST);
5971 storageClassSpecifier_AST = (TNode)currentAST.root;
5972 break;
5973 }
5974 default:
5975 {
5976 throw new NoViableAltException(LT(1), getFilename());
5977 }
5978 }
5979 }
5980 catch (RecognitionException ex) {
5981 if (inputState.guessing==0) {
5982 reportError(ex);
5983 recover(ex,_tokenSet_42);
5984 } else {
5985 throw ex;
5986 }
5987 }
5988 returnAST = storageClassSpecifier_AST;
5989 }
5990
5991 public final void typeQualifier() throws RecognitionException, TokenStreamException {
5992
5993 returnAST = null;
5994 ASTPair currentAST = new ASTPair();
5995 TNode typeQualifier_AST = null;
5996
5997 try { // for error handling
5998 switch ( LA(1)) {
5999 case LITERAL_const:
6000 {
6001 TNode tmp210_AST = null;
6002 tmp210_AST = (TNode)astFactory.create(LT(1));
6003 astFactory.addASTChild(currentAST, tmp210_AST);
6005 typeQualifier_AST = (TNode)currentAST.root;
6006 break;
6007 }
6008 case LITERAL_volatile:
6009 {
6010 TNode tmp211_AST = null;
6011 tmp211_AST = (TNode)astFactory.create(LT(1));
6012 astFactory.addASTChild(currentAST, tmp211_AST);
6014 typeQualifier_AST = (TNode)currentAST.root;
6015 break;
6016 }
6017 default:
6018 {
6019 throw new NoViableAltException(LT(1), getFilename());
6020 }
6021 }
6022 }
6023 catch (RecognitionException ex) {
6024 if (inputState.guessing==0) {
6025 reportError(ex);
6026 recover(ex,_tokenSet_46);
6027 } else {
6028 throw ex;
6029 }
6030 }
6031 returnAST = typeQualifier_AST;
6032 }
6033
6034 public final void assignOperator() throws RecognitionException, TokenStreamException {
6035
6036 returnAST = null;
6037 ASTPair currentAST = new ASTPair();
6038 TNode assignOperator_AST = null;
6039
6040 try { // for error handling
6041 switch ( LA(1)) {
6042 case ASSIGN:
6043 {
6044 TNode tmp212_AST = null;
6045 tmp212_AST = (TNode)astFactory.create(LT(1));
6046 astFactory.addASTChild(currentAST, tmp212_AST);
6047 match(ASSIGN);
6048 assignOperator_AST = (TNode)currentAST.root;
6049 break;
6050 }
6051 case DIV_ASSIGN:
6052 {
6053 TNode tmp213_AST = null;
6054 tmp213_AST = (TNode)astFactory.create(LT(1));
6055 astFactory.addASTChild(currentAST, tmp213_AST);
6057 assignOperator_AST = (TNode)currentAST.root;
6058 break;
6059 }
6060 case PLUS_ASSIGN:
6061 {
6062 TNode tmp214_AST = null;
6063 tmp214_AST = (TNode)astFactory.create(LT(1));
6064 astFactory.addASTChild(currentAST, tmp214_AST);
6066 assignOperator_AST = (TNode)currentAST.root;
6067 break;
6068 }
6069 case MINUS_ASSIGN:
6070 {
6071 TNode tmp215_AST = null;
6072 tmp215_AST = (TNode)astFactory.create(LT(1));
6073 astFactory.addASTChild(currentAST, tmp215_AST);
6075 assignOperator_AST = (TNode)currentAST.root;
6076 break;
6077 }
6078 case STAR_ASSIGN:
6079 {
6080 TNode tmp216_AST = null;
6081 tmp216_AST = (TNode)astFactory.create(LT(1));
6082 astFactory.addASTChild(currentAST, tmp216_AST);
6084 assignOperator_AST = (TNode)currentAST.root;
6085 break;
6086 }
6087 case MOD_ASSIGN:
6088 {
6089 TNode tmp217_AST = null;
6090 tmp217_AST = (TNode)astFactory.create(LT(1));
6091 astFactory.addASTChild(currentAST, tmp217_AST);
6093 assignOperator_AST = (TNode)currentAST.root;
6094 break;
6095 }
6096 case RSHIFT_ASSIGN:
6097 {
6098 TNode tmp218_AST = null;
6099 tmp218_AST = (TNode)astFactory.create(LT(1));
6100 astFactory.addASTChild(currentAST, tmp218_AST);
6102 assignOperator_AST = (TNode)currentAST.root;
6103 break;
6104 }
6105 case LSHIFT_ASSIGN:
6106 {
6107 TNode tmp219_AST = null;
6108 tmp219_AST = (TNode)astFactory.create(LT(1));
6109 astFactory.addASTChild(currentAST, tmp219_AST);
6111 assignOperator_AST = (TNode)currentAST.root;
6112 break;
6113 }
6114 case BAND_ASSIGN:
6115 {
6116 TNode tmp220_AST = null;
6117 tmp220_AST = (TNode)astFactory.create(LT(1));
6118 astFactory.addASTChild(currentAST, tmp220_AST);
6120 assignOperator_AST = (TNode)currentAST.root;
6121 break;
6122 }
6123 case BOR_ASSIGN:
6124 {
6125 TNode tmp221_AST = null;
6126 tmp221_AST = (TNode)astFactory.create(LT(1));
6127 astFactory.addASTChild(currentAST, tmp221_AST);
6129 assignOperator_AST = (TNode)currentAST.root;
6130 break;
6131 }
6132 case BXOR_ASSIGN:
6133 {
6134 TNode tmp222_AST = null;
6135 tmp222_AST = (TNode)astFactory.create(LT(1));
6136 astFactory.addASTChild(currentAST, tmp222_AST);
6138 assignOperator_AST = (TNode)currentAST.root;
6139 break;
6140 }
6141 default:
6142 {
6143 throw new NoViableAltException(LT(1), getFilename());
6144 }
6145 }
6146 }
6147 catch (RecognitionException ex) {
6148 if (inputState.guessing==0) {
6149 reportError(ex);
6150 recover(ex,_tokenSet_3);
6151 } else {
6152 throw ex;
6153 }
6154 }
6155 returnAST = assignOperator_AST;
6156 }
6157
6158 public final void logicalAndExpr() throws RecognitionException, TokenStreamException {
6159
6160 returnAST = null;
6161 ASTPair currentAST = new ASTPair();
6162 TNode logicalAndExpr_AST = null;
6163
6164 try { // for error handling
6166 astFactory.addASTChild(currentAST, returnAST);
6167 {
6168 _loop269:
6169 do {
6170 if ((LA(1)==LAND)) {
6171 TNode tmp223_AST = null;
6172 tmp223_AST = (TNode)astFactory.create(LT(1));
6173 astFactory.makeASTRoot(currentAST, tmp223_AST);
6174 match(LAND);
6176 astFactory.addASTChild(currentAST, returnAST);
6177 }
6178 else {
6179 break _loop269;
6180 }
6181
6182 } while (true);
6183 }
6184 logicalAndExpr_AST = (TNode)currentAST.root;
6185 }
6186 catch (RecognitionException ex) {
6187 if (inputState.guessing==0) {
6188 reportError(ex);
6189 recover(ex,_tokenSet_74);
6190 } else {
6191 throw ex;
6192 }
6193 }
6194 returnAST = logicalAndExpr_AST;
6195 }
6196
6197 public final void inclusiveOrExpr() throws RecognitionException, TokenStreamException {
6198
6199 returnAST = null;
6200 ASTPair currentAST = new ASTPair();
6201 TNode inclusiveOrExpr_AST = null;
6202
6203 try { // for error handling
6205 astFactory.addASTChild(currentAST, returnAST);
6206 {
6207 _loop272:
6208 do {
6209 if ((LA(1)==BOR)) {
6210 TNode tmp224_AST = null;
6211 tmp224_AST = (TNode)astFactory.create(LT(1));
6212 astFactory.makeASTRoot(currentAST, tmp224_AST);
6213 match(BOR);
6215 astFactory.addASTChild(currentAST, returnAST);
6216 }
6217 else {
6218 break _loop272;
6219 }
6220
6221 } while (true);
6222 }
6223 inclusiveOrExpr_AST = (TNode)currentAST.root;
6224 }
6225 catch (RecognitionException ex) {
6226 if (inputState.guessing==0) {
6227 reportError(ex);
6228 recover(ex,_tokenSet_75);
6229 } else {
6230 throw ex;
6231 }
6232 }
6233 returnAST = inclusiveOrExpr_AST;
6234 }
6235
6236 public final void exclusiveOrExpr() throws RecognitionException, TokenStreamException {
6237
6238 returnAST = null;
6239 ASTPair currentAST = new ASTPair();
6240 TNode exclusiveOrExpr_AST = null;
6241
6242 try { // for error handling
6243 bitAndExpr();
6244 astFactory.addASTChild(currentAST, returnAST);
6245 {
6246 _loop275:
6247 do {
6248 if ((LA(1)==BXOR)) {
6249 TNode tmp225_AST = null;
6250 tmp225_AST = (TNode)astFactory.create(LT(1));
6251 astFactory.makeASTRoot(currentAST, tmp225_AST);
6252 match(BXOR);
6253 bitAndExpr();
6254 astFactory.addASTChild(currentAST, returnAST);
6255 }
6256 else {
6257 break _loop275;
6258 }
6259
6260 } while (true);
6261 }
6262 exclusiveOrExpr_AST = (TNode)currentAST.root;
6263 }
6264 catch (RecognitionException ex) {
6265 if (inputState.guessing==0) {
6266 reportError(ex);
6267 recover(ex,_tokenSet_76);
6268 } else {
6269 throw ex;
6270 }
6271 }
6272 returnAST = exclusiveOrExpr_AST;
6273 }
6274
6275 public final void bitAndExpr() throws RecognitionException, TokenStreamException {
6276
6277 returnAST = null;
6278 ASTPair currentAST = new ASTPair();
6279 TNode bitAndExpr_AST = null;
6280
6281 try { // for error handling
6282 equalityExpr();
6283 astFactory.addASTChild(currentAST, returnAST);
6284 {
6285 _loop278:
6286 do {
6287 if ((LA(1)==BAND)) {
6288 TNode tmp226_AST = null;
6289 tmp226_AST = (TNode)astFactory.create(LT(1));
6290 astFactory.makeASTRoot(currentAST, tmp226_AST);
6291 match(BAND);
6292 equalityExpr();
6293 astFactory.addASTChild(currentAST, returnAST);
6294 }
6295 else {
6296 break _loop278;
6297 }
6298
6299 } while (true);
6300 }
6301 bitAndExpr_AST = (TNode)currentAST.root;
6302 }
6303 catch (RecognitionException ex) {
6304 if (inputState.guessing==0) {
6305 reportError(ex);
6306 recover(ex,_tokenSet_77);
6307 } else {
6308 throw ex;
6309 }
6310 }
6311 returnAST = bitAndExpr_AST;
6312 }
6313
6314 public final void equalityExpr() throws RecognitionException, TokenStreamException {
6315
6316 returnAST = null;
6317 ASTPair currentAST = new ASTPair();
6318 TNode equalityExpr_AST = null;
6319
6320 try { // for error handling
6322 astFactory.addASTChild(currentAST, returnAST);
6323 {
6324 _loop282:
6325 do {
6326 if ((LA(1)==EQUAL||LA(1)==NOT_EQUAL)) {
6327 {
6328 switch ( LA(1)) {
6329 case EQUAL:
6330 {
6331 TNode tmp227_AST = null;
6332 tmp227_AST = (TNode)astFactory.create(LT(1));
6333 astFactory.makeASTRoot(currentAST, tmp227_AST);
6334 match(EQUAL);
6335 break;
6336 }
6337 case NOT_EQUAL:
6338 {
6339 TNode tmp228_AST = null;
6340 tmp228_AST = (TNode)astFactory.create(LT(1));
6341 astFactory.makeASTRoot(currentAST, tmp228_AST);
6343 break;
6344 }
6345 default:
6346 {
6347 throw new NoViableAltException(LT(1), getFilename());
6348 }
6349 }
6350 }
6352 astFactory.addASTChild(currentAST, returnAST);
6353 }
6354 else {
6355 break _loop282;
6356 }
6357
6358 } while (true);
6359 }
6360 equalityExpr_AST = (TNode)currentAST.root;
6361 }
6362 catch (RecognitionException ex) {
6363 if (inputState.guessing==0) {
6364 reportError(ex);
6365 recover(ex,_tokenSet_78);
6366 } else {
6367 throw ex;
6368 }
6369 }
6370 returnAST = equalityExpr_AST;
6371 }
6372
6373 public final void relationalExpr() throws RecognitionException, TokenStreamException {
6374
6375 returnAST = null;
6376 ASTPair currentAST = new ASTPair();
6377 TNode relationalExpr_AST = null;
6378
6379 try { // for error handling
6380 shiftExpr();
6381 astFactory.addASTChild(currentAST, returnAST);
6382 {
6383 _loop286:
6384 do {
6385 if (((LA(1) >= LT && LA(1) <= GTE))) {
6386 {
6387 switch ( LA(1)) {
6388 case LT:
6389 {
6390 TNode tmp229_AST = null;
6391 tmp229_AST = (TNode)astFactory.create(LT(1));
6392 astFactory.makeASTRoot(currentAST, tmp229_AST);
6393 match(LT);
6394 break;
6395 }
6396 case LTE:
6397 {
6398 TNode tmp230_AST = null;
6399 tmp230_AST = (TNode)astFactory.create(LT(1));
6400 astFactory.makeASTRoot(currentAST, tmp230_AST);
6401 match(LTE);
6402 break;
6403 }
6404 case GT:
6405 {
6406 TNode tmp231_AST = null;
6407 tmp231_AST = (TNode)astFactory.create(LT(1));
6408 astFactory.makeASTRoot(currentAST, tmp231_AST);
6409 match(GT);
6410 break;
6411 }
6412 case GTE:
6413 {
6414 TNode tmp232_AST = null;
6415 tmp232_AST = (TNode)astFactory.create(LT(1));
6416 astFactory.makeASTRoot(currentAST, tmp232_AST);
6417 match(GTE);
6418 break;
6419 }
6420 default:
6421 {
6422 throw new NoViableAltException(LT(1), getFilename());
6423 }
6424 }
6425 }
6426 shiftExpr();
6427 astFactory.addASTChild(currentAST, returnAST);
6428 }
6429 else {
6430 break _loop286;
6431 }
6432
6433 } while (true);
6434 }
6435 relationalExpr_AST = (TNode)currentAST.root;
6436 }
6437 catch (RecognitionException ex) {
6438 if (inputState.guessing==0) {
6439 reportError(ex);
6440 recover(ex,_tokenSet_79);
6441 } else {
6442 throw ex;
6443 }
6444 }
6445 returnAST = relationalExpr_AST;
6446 }
6447
6448 public final void shiftExpr() throws RecognitionException, TokenStreamException {
6449
6450 returnAST = null;
6451 ASTPair currentAST = new ASTPair();
6452 TNode shiftExpr_AST = null;
6453
6454 try { // for error handling
6455 additiveExpr();
6456 astFactory.addASTChild(currentAST, returnAST);
6457 {
6458 _loop290:
6459 do {
6460 if ((LA(1)==LSHIFT||LA(1)==RSHIFT)) {
6461 {
6462 switch ( LA(1)) {
6463 case LSHIFT:
6464 {
6465 TNode tmp233_AST = null;
6466 tmp233_AST = (TNode)astFactory.create(LT(1));
6467 astFactory.makeASTRoot(currentAST, tmp233_AST);
6468 match(LSHIFT);
6469 break;
6470 }
6471 case RSHIFT:
6472 {
6473 TNode tmp234_AST = null;
6474 tmp234_AST = (TNode)astFactory.create(LT(1));
6475 astFactory.makeASTRoot(currentAST, tmp234_AST);
6476 match(RSHIFT);
6477 break;
6478 }
6479 default:
6480 {
6481 throw new NoViableAltException(LT(1), getFilename());
6482 }
6483 }
6484 }
6485 additiveExpr();
6486 astFactory.addASTChild(currentAST, returnAST);
6487 }
6488 else {
6489 break _loop290;
6490 }
6491
6492 } while (true);
6493 }
6494 shiftExpr_AST = (TNode)currentAST.root;
6495 }
6496 catch (RecognitionException ex) {
6497 if (inputState.guessing==0) {
6498 reportError(ex);
6499 recover(ex,_tokenSet_80);
6500 } else {
6501 throw ex;
6502 }
6503 }
6504 returnAST = shiftExpr_AST;
6505 }
6506
6507 public final void additiveExpr() throws RecognitionException, TokenStreamException {
6508
6509 returnAST = null;
6510 ASTPair currentAST = new ASTPair();
6511 TNode additiveExpr_AST = null;
6512
6513 try { // for error handling
6514 multExpr();
6515 astFactory.addASTChild(currentAST, returnAST);
6516 {
6517 _loop294:
6518 do {
6519 if ((LA(1)==PLUS||LA(1)==MINUS)) {
6520 {
6521 switch ( LA(1)) {
6522 case PLUS:
6523 {
6524 TNode tmp235_AST = null;
6525 tmp235_AST = (TNode)astFactory.create(LT(1));
6526 astFactory.makeASTRoot(currentAST, tmp235_AST);
6527 match(PLUS);
6528 break;
6529 }
6530 case MINUS:
6531 {
6532 TNode tmp236_AST = null;
6533 tmp236_AST = (TNode)astFactory.create(LT(1));
6534 astFactory.makeASTRoot(currentAST, tmp236_AST);
6535 match(MINUS);
6536 break;
6537 }
6538 default:
6539 {
6540 throw new NoViableAltException(LT(1), getFilename());
6541 }
6542 }
6543 }
6544 multExpr();
6545 astFactory.addASTChild(currentAST, returnAST);
6546 }
6547 else {
6548 break _loop294;
6549 }
6550
6551 } while (true);
6552 }
6553 additiveExpr_AST = (TNode)currentAST.root;
6554 }
6555 catch (RecognitionException ex) {
6556 if (inputState.guessing==0) {
6557 reportError(ex);
6558 recover(ex,_tokenSet_81);
6559 } else {
6560 throw ex;
6561 }
6562 }
6563 returnAST = additiveExpr_AST;
6564 }
6565
6566 public final void multExpr() throws RecognitionException, TokenStreamException {
6567
6568 returnAST = null;
6569 ASTPair currentAST = new ASTPair();
6570 TNode multExpr_AST = null;
6571
6572 try { // for error handling
6573 castExpr();
6574 astFactory.addASTChild(currentAST, returnAST);
6575 {
6576 _loop298:
6577 do {
6578 if ((_tokenSet_82.member(LA(1)))) {
6579 {
6580 switch ( LA(1)) {
6581 case STAR:
6582 {
6583 TNode tmp237_AST = null;
6584 tmp237_AST = (TNode)astFactory.create(LT(1));
6585 astFactory.makeASTRoot(currentAST, tmp237_AST);
6586 match(STAR);
6587 break;
6588 }
6589 case DIV:
6590 {
6591 TNode tmp238_AST = null;
6592 tmp238_AST = (TNode)astFactory.create(LT(1));
6593 astFactory.makeASTRoot(currentAST, tmp238_AST);
6594 match(DIV);
6595 break;
6596 }
6597 case MOD:
6598 {
6599 TNode tmp239_AST = null;
6600 tmp239_AST = (TNode)astFactory.create(LT(1));
6601 astFactory.makeASTRoot(currentAST, tmp239_AST);
6602 match(MOD);
6603 break;
6604 }
6605 default:
6606 {
6607 throw new NoViableAltException(LT(1), getFilename());
6608 }
6609 }
6610 }
6611 castExpr();
6612 astFactory.addASTChild(currentAST, returnAST);
6613 }
6614 else {
6615 break _loop298;
6616 }
6617
6618 } while (true);
6619 }
6620 multExpr_AST = (TNode)currentAST.root;
6621 }
6622 catch (RecognitionException ex) {
6623 if (inputState.guessing==0) {
6624 reportError(ex);
6625 recover(ex,_tokenSet_83);
6626 } else {
6627 throw ex;
6628 }
6629 }
6630 returnAST = multExpr_AST;
6631 }
6632
6633 public final void postfixSuffix() throws RecognitionException, TokenStreamException {
6634
6635 returnAST = null;
6636 ASTPair currentAST = new ASTPair();
6637 TNode postfixSuffix_AST = null;
6638
6639 try { // for error handling
6640 {
6641 int _cnt305=0;
6642 _loop305:
6643 do {
6644 switch ( LA(1)) {
6645 case PTR:
6646 {
6647 TNode tmp240_AST = null;
6648 tmp240_AST = (TNode)astFactory.create(LT(1));
6649 astFactory.addASTChild(currentAST, tmp240_AST);
6650 match(PTR);
6651 TNode tmp241_AST = null;
6652 tmp241_AST = (TNode)astFactory.create(LT(1));
6653 astFactory.addASTChild(currentAST, tmp241_AST);
6654 match(ID);
6655 break;
6656 }
6657 case DOT:
6658 {
6659 TNode tmp242_AST = null;
6660 tmp242_AST = (TNode)astFactory.create(LT(1));
6661 astFactory.addASTChild(currentAST, tmp242_AST);
6662 match(DOT);
6663 TNode tmp243_AST = null;
6664 tmp243_AST = (TNode)astFactory.create(LT(1));
6665 astFactory.addASTChild(currentAST, tmp243_AST);
6666 match(ID);
6667 break;
6668 }
6669 case LPAREN:
6670 {
6671 functionCall();
6672 astFactory.addASTChild(currentAST, returnAST);
6673 break;
6674 }
6675 case LBRACKET:
6676 {
6677 TNode tmp244_AST = null;
6678 tmp244_AST = (TNode)astFactory.create(LT(1));
6679 astFactory.addASTChild(currentAST, tmp244_AST);
6680 match(LBRACKET);
6681 expr();
6682 astFactory.addASTChild(currentAST, returnAST);
6683 TNode tmp245_AST = null;
6684 tmp245_AST = (TNode)astFactory.create(LT(1));
6685 astFactory.addASTChild(currentAST, tmp245_AST);
6686 match(RBRACKET);
6687 break;
6688 }
6689 case INC:
6690 {
6691 TNode tmp246_AST = null;
6692 tmp246_AST = (TNode)astFactory.create(LT(1));
6693 astFactory.addASTChild(currentAST, tmp246_AST);
6694 match(INC);
6695 break;
6696 }
6697 case DEC:
6698 {
6699 TNode tmp247_AST = null;
6700 tmp247_AST = (TNode)astFactory.create(LT(1));
6701 astFactory.addASTChild(currentAST, tmp247_AST);
6702 match(DEC);
6703 break;
6704 }
6705 default:
6706 {
6707 if ( _cnt305>=1 ) { break _loop305; } else {throw new NoViableAltException(LT(1), getFilename());}
6708 }
6709 }
6710 _cnt305++;
6711 } while (true);
6712 }
6713 postfixSuffix_AST = (TNode)currentAST.root;
6714 }
6715 catch (RecognitionException ex) {
6716 if (inputState.guessing==0) {
6717 reportError(ex);
6718 recover(ex,_tokenSet_28);
6719 } else {
6720 throw ex;
6721 }
6722 }
6723 returnAST = postfixSuffix_AST;
6724 }
6725
6726 public final void functionCall() throws RecognitionException, TokenStreamException {
6727
6728 returnAST = null;
6729 ASTPair currentAST = new ASTPair();
6730 TNode functionCall_AST = null;
6731 TNode a_AST = null;
6732
6733 try { // for error handling
6734 TNode tmp248_AST = null;
6735 tmp248_AST = (TNode)astFactory.create(LT(1));
6736 astFactory.makeASTRoot(currentAST, tmp248_AST);
6737 match(LPAREN);
6738 {
6739 switch ( LA(1)) {
6740 case LITERAL_asm:
6741 case ID:
6742 case STAR:
6743 case LPAREN:
6744 case LAND:
6745 case BAND:
6746 case PLUS:
6747 case MINUS:
6748 case INC:
6749 case DEC:
6750 case LITERAL_sizeof:
6751 case BNOT:
6752 case LNOT:
6753 case CharLiteral:
6754 case StringLiteral:
6755 case Number:
6756 case LITERAL___alignof:
6757 case LITERAL___real:
6758 case LITERAL___imag:
6759 {
6760 argExprList();
6761 a_AST = (TNode)returnAST;
6762 astFactory.addASTChild(currentAST, returnAST);
6763 break;
6764 }
6765 case RPAREN:
6766 {
6767 break;
6768 }
6769 default:
6770 {
6771 throw new NoViableAltException(LT(1), getFilename());
6772 }
6773 }
6774 }
6775 TNode tmp249_AST = null;
6776 tmp249_AST = (TNode)astFactory.create(LT(1));
6777 astFactory.addASTChild(currentAST, tmp249_AST);
6778 match(RPAREN);
6779 if ( inputState.guessing==0 ) {
6780 functionCall_AST = (TNode)currentAST.root;
6781
6782 functionCall_AST.setType( NFunctionCallArgs );
6783
6784 }
6785 functionCall_AST = (TNode)currentAST.root;
6786 }
6787 catch (RecognitionException ex) {
6788 if (inputState.guessing==0) {
6789 reportError(ex);
6790 recover(ex,_tokenSet_56);
6791 } else {
6792 throw ex;
6793 }
6794 }
6795 returnAST = functionCall_AST;
6796 }
6797
6798 public final void argExprList() throws RecognitionException, TokenStreamException {
6799
6800 returnAST = null;
6801 ASTPair currentAST = new ASTPair();
6802 TNode argExprList_AST = null;
6803
6804 try { // for error handling
6805 assignExpr();
6806 astFactory.addASTChild(currentAST, returnAST);
6807 {
6808 _loop310:
6809 do {
6810 if ((LA(1)==COMMA)) {
6811 match(COMMA);
6812 assignExpr();
6813 astFactory.addASTChild(currentAST, returnAST);
6814 }
6815 else {
6816 break _loop310;
6817 }
6818
6819 } while (true);
6820 }
6821 argExprList_AST = (TNode)currentAST.root;
6822 }
6823 catch (RecognitionException ex) {
6824 if (inputState.guessing==0) {
6825 reportError(ex);
6826 recover(ex,_tokenSet_48);
6827 } else {
6828 throw ex;
6829 }
6830 }
6831 returnAST = argExprList_AST;
6832 }
6833
6834 protected final void intConst() throws RecognitionException, TokenStreamException {
6835
6836 returnAST = null;
6837 ASTPair currentAST = new ASTPair();
6838 TNode intConst_AST = null;
6839
6840 try { // for error handling
6841 switch ( LA(1)) {
6842 case IntOctalConst:
6843 {
6844 TNode tmp251_AST = null;
6845 tmp251_AST = (TNode)astFactory.create(LT(1));
6846 astFactory.addASTChild(currentAST, tmp251_AST);
6848 intConst_AST = (TNode)currentAST.root;
6849 break;
6850 }
6851 case LongOctalConst:
6852 {
6853 TNode tmp252_AST = null;
6854 tmp252_AST = (TNode)astFactory.create(LT(1));
6855 astFactory.addASTChild(currentAST, tmp252_AST);
6857 intConst_AST = (TNode)currentAST.root;
6858 break;
6859 }
6860 case UnsignedOctalConst:
6861 {
6862 TNode tmp253_AST = null;
6863 tmp253_AST = (TNode)astFactory.create(LT(1));
6864 astFactory.addASTChild(currentAST, tmp253_AST);
6866 intConst_AST = (TNode)currentAST.root;
6867 break;
6868 }
6869 case IntIntConst:
6870 {
6871 TNode tmp254_AST = null;
6872 tmp254_AST = (TNode)astFactory.create(LT(1));
6873 astFactory.addASTChild(currentAST, tmp254_AST);
6875 intConst_AST = (TNode)currentAST.root;
6876 break;
6877 }
6878 case LongIntConst:
6879 {
6880 TNode tmp255_AST = null;
6881 tmp255_AST = (TNode)astFactory.create(LT(1));
6882 astFactory.addASTChild(currentAST, tmp255_AST);
6884 intConst_AST = (TNode)currentAST.root;
6885 break;
6886 }
6887 case UnsignedIntConst:
6888 {
6889 TNode tmp256_AST = null;
6890 tmp256_AST = (TNode)astFactory.create(LT(1));
6891 astFactory.addASTChild(currentAST, tmp256_AST);
6893 intConst_AST = (TNode)currentAST.root;
6894 break;
6895 }
6896 case IntHexConst:
6897 {
6898 TNode tmp257_AST = null;
6899 tmp257_AST = (TNode)astFactory.create(LT(1));
6900 astFactory.addASTChild(currentAST, tmp257_AST);
6902 intConst_AST = (TNode)currentAST.root;
6903 break;
6904 }
6905 case LongHexConst:
6906 {
6907 TNode tmp258_AST = null;
6908 tmp258_AST = (TNode)astFactory.create(LT(1));
6909 astFactory.addASTChild(currentAST, tmp258_AST);
6911 intConst_AST = (TNode)currentAST.root;
6912 break;
6913 }
6914 case UnsignedHexConst:
6915 {
6916 TNode tmp259_AST = null;
6917 tmp259_AST = (TNode)astFactory.create(LT(1));
6918 astFactory.addASTChild(currentAST, tmp259_AST);
6920 intConst_AST = (TNode)currentAST.root;
6921 break;
6922 }
6923 default:
6924 {
6925 throw new NoViableAltException(LT(1), getFilename());
6926 }
6927 }
6928 }
6929 catch (RecognitionException ex) {
6930 if (inputState.guessing==0) {
6931 reportError(ex);
6932 recover(ex,_tokenSet_0);
6933 } else {
6934 throw ex;
6935 }
6936 }
6937 returnAST = intConst_AST;
6938 }
6939
6940 protected final void floatConst() throws RecognitionException, TokenStreamException {
6941
6942 returnAST = null;
6943 ASTPair currentAST = new ASTPair();
6944 TNode floatConst_AST = null;
6945
6946 try { // for error handling
6947 switch ( LA(1)) {
6948 case FloatDoubleConst:
6949 {
6950 TNode tmp260_AST = null;
6951 tmp260_AST = (TNode)astFactory.create(LT(1));
6952 astFactory.addASTChild(currentAST, tmp260_AST);
6954 floatConst_AST = (TNode)currentAST.root;
6955 break;
6956 }
6957 case DoubleDoubleConst:
6958 {
6959 TNode tmp261_AST = null;
6960 tmp261_AST = (TNode)astFactory.create(LT(1));
6961 astFactory.addASTChild(currentAST, tmp261_AST);
6963 floatConst_AST = (TNode)currentAST.root;
6964 break;
6965 }
6966 case LongDoubleConst:
6967 {
6968 TNode tmp262_AST = null;
6969 tmp262_AST = (TNode)astFactory.create(LT(1));
6970 astFactory.addASTChild(currentAST, tmp262_AST);
6972 floatConst_AST = (TNode)currentAST.root;
6973 break;
6974 }
6975 default:
6976 {
6977 throw new NoViableAltException(LT(1), getFilename());
6978 }
6979 }
6980 }
6981 catch (RecognitionException ex) {
6982 if (inputState.guessing==0) {
6983 reportError(ex);
6984 recover(ex,_tokenSet_0);
6985 } else {
6986 throw ex;
6987 }
6988 }
6989 returnAST = floatConst_AST;
6990 }
6991
6992 public final void dummy() throws RecognitionException, TokenStreamException {
6993
6994 returnAST = null;
6995 ASTPair currentAST = new ASTPair();
6996 TNode dummy_AST = null;
6997
6998 try { // for error handling
6999 switch ( LA(1)) {
7000 case NTypedefName:
7001 {
7002 TNode tmp263_AST = null;
7003 tmp263_AST = (TNode)astFactory.create(LT(1));
7004 astFactory.addASTChild(currentAST, tmp263_AST);
7006 dummy_AST = (TNode)currentAST.root;
7007 break;
7008 }
7009 case NInitDecl:
7010 {
7011 TNode tmp264_AST = null;
7012 tmp264_AST = (TNode)astFactory.create(LT(1));
7013 astFactory.addASTChild(currentAST, tmp264_AST);
7015 dummy_AST = (TNode)currentAST.root;
7016 break;
7017 }
7018 case NDeclarator:
7019 {
7020 TNode tmp265_AST = null;
7021 tmp265_AST = (TNode)astFactory.create(LT(1));
7022 astFactory.addASTChild(currentAST, tmp265_AST);
7024 dummy_AST = (TNode)currentAST.root;
7025 break;
7026 }
7027 case NStructDeclarator:
7028 {
7029 TNode tmp266_AST = null;
7030 tmp266_AST = (TNode)astFactory.create(LT(1));
7031 astFactory.addASTChild(currentAST, tmp266_AST);
7033 dummy_AST = (TNode)currentAST.root;
7034 break;
7035 }
7036 case NDeclaration:
7037 {
7038 TNode tmp267_AST = null;
7039 tmp267_AST = (TNode)astFactory.create(LT(1));
7040 astFactory.addASTChild(currentAST, tmp267_AST);
7042 dummy_AST = (TNode)currentAST.root;
7043 break;
7044 }
7045 case NCast:
7046 {
7047 TNode tmp268_AST = null;
7048 tmp268_AST = (TNode)astFactory.create(LT(1));
7049 astFactory.addASTChild(currentAST, tmp268_AST);
7050 match(NCast);
7051 dummy_AST = (TNode)currentAST.root;
7052 break;
7053 }
7054 case NPointerGroup:
7055 {
7056 TNode tmp269_AST = null;
7057 tmp269_AST = (TNode)astFactory.create(LT(1));
7058 astFactory.addASTChild(currentAST, tmp269_AST);
7060 dummy_AST = (TNode)currentAST.root;
7061 break;
7062 }
7063 case NExpressionGroup:
7064 {
7065 TNode tmp270_AST = null;
7066 tmp270_AST = (TNode)astFactory.create(LT(1));
7067 astFactory.addASTChild(currentAST, tmp270_AST);
7069 dummy_AST = (TNode)currentAST.root;
7070 break;
7071 }
7072 case NFunctionCallArgs:
7073 {
7074 TNode tmp271_AST = null;
7075 tmp271_AST = (TNode)astFactory.create(LT(1));
7076 astFactory.addASTChild(currentAST, tmp271_AST);
7078 dummy_AST = (TNode)currentAST.root;
7079 break;
7080 }
7082 {
7083 TNode tmp272_AST = null;
7084 tmp272_AST = (TNode)astFactory.create(LT(1));
7085 astFactory.addASTChild(currentAST, tmp272_AST);
7087 dummy_AST = (TNode)currentAST.root;
7088 break;
7089 }
7090 case NInitializer:
7091 {
7092 TNode tmp273_AST = null;
7093 tmp273_AST = (TNode)astFactory.create(LT(1));
7094 astFactory.addASTChild(currentAST, tmp273_AST);
7096 dummy_AST = (TNode)currentAST.root;
7097 break;
7098 }
7099 case NStatementExpr:
7100 {
7101 TNode tmp274_AST = null;
7102 tmp274_AST = (TNode)astFactory.create(LT(1));
7103 astFactory.addASTChild(currentAST, tmp274_AST);
7105 dummy_AST = (TNode)currentAST.root;
7106 break;
7107 }
7108 case NEmptyExpression:
7109 {
7110 TNode tmp275_AST = null;
7111 tmp275_AST = (TNode)astFactory.create(LT(1));
7112 astFactory.addASTChild(currentAST, tmp275_AST);
7114 dummy_AST = (TNode)currentAST.root;
7115 break;
7116 }
7117 case NParameterTypeList:
7118 {
7119 TNode tmp276_AST = null;
7120 tmp276_AST = (TNode)astFactory.create(LT(1));
7121 astFactory.addASTChild(currentAST, tmp276_AST);
7123 dummy_AST = (TNode)currentAST.root;
7124 break;
7125 }
7126 case NFunctionDef:
7127 {
7128 TNode tmp277_AST = null;
7129 tmp277_AST = (TNode)astFactory.create(LT(1));
7130 astFactory.addASTChild(currentAST, tmp277_AST);
7132 dummy_AST = (TNode)currentAST.root;
7133 break;
7134 }
7135 case NCompoundStatement:
7136 {
7137 TNode tmp278_AST = null;
7138 tmp278_AST = (TNode)astFactory.create(LT(1));
7139 astFactory.addASTChild(currentAST, tmp278_AST);
7141 dummy_AST = (TNode)currentAST.root;
7142 break;
7143 }
7145 {
7146 TNode tmp279_AST = null;
7147 tmp279_AST = (TNode)astFactory.create(LT(1));
7148 astFactory.addASTChild(currentAST, tmp279_AST);
7150 dummy_AST = (TNode)currentAST.root;
7151 break;
7152 }
7153 case NCommaExpr:
7154 {
7155 TNode tmp280_AST = null;
7156 tmp280_AST = (TNode)astFactory.create(LT(1));
7157 astFactory.addASTChild(currentAST, tmp280_AST);
7159 dummy_AST = (TNode)currentAST.root;
7160 break;
7161 }
7162 case NUnaryExpr:
7163 {
7164 TNode tmp281_AST = null;
7165 tmp281_AST = (TNode)astFactory.create(LT(1));
7166 astFactory.addASTChild(currentAST, tmp281_AST);
7168 dummy_AST = (TNode)currentAST.root;
7169 break;
7170 }
7171 case NLabel:
7172 {
7173 TNode tmp282_AST = null;
7174 tmp282_AST = (TNode)astFactory.create(LT(1));
7175 astFactory.addASTChild(currentAST, tmp282_AST);
7176 match(NLabel);
7177 dummy_AST = (TNode)currentAST.root;
7178 break;
7179 }
7180 case NPostfixExpr:
7181 {
7182 TNode tmp283_AST = null;
7183 tmp283_AST = (TNode)astFactory.create(LT(1));
7184 astFactory.addASTChild(currentAST, tmp283_AST);
7186 dummy_AST = (TNode)currentAST.root;
7187 break;
7188 }
7189 case NRangeExpr:
7190 {
7191 TNode tmp284_AST = null;
7192 tmp284_AST = (TNode)astFactory.create(LT(1));
7193 astFactory.addASTChild(currentAST, tmp284_AST);
7195 dummy_AST = (TNode)currentAST.root;
7196 break;
7197 }
7198 case NStringSeq:
7199 {
7200 TNode tmp285_AST = null;
7201 tmp285_AST = (TNode)astFactory.create(LT(1));
7202 astFactory.addASTChild(currentAST, tmp285_AST);
7204 dummy_AST = (TNode)currentAST.root;
7205 break;
7206 }
7208 {
7209 TNode tmp286_AST = null;
7210 tmp286_AST = (TNode)astFactory.create(LT(1));
7211 astFactory.addASTChild(currentAST, tmp286_AST);
7213 dummy_AST = (TNode)currentAST.root;
7214 break;
7215 }
7216 case NLcurlyInitializer:
7217 {
7218 TNode tmp287_AST = null;
7219 tmp287_AST = (TNode)astFactory.create(LT(1));
7220 astFactory.addASTChild(currentAST, tmp287_AST);
7222 dummy_AST = (TNode)currentAST.root;
7223 break;
7224 }
7225 case NAsmAttribute:
7226 {
7227 TNode tmp288_AST = null;
7228 tmp288_AST = (TNode)astFactory.create(LT(1));
7229 astFactory.addASTChild(currentAST, tmp288_AST);
7231 dummy_AST = (TNode)currentAST.root;
7232 break;
7233 }
7234 case NGnuAsmExpr:
7235 {
7236 TNode tmp289_AST = null;
7237 tmp289_AST = (TNode)astFactory.create(LT(1));
7238 astFactory.addASTChild(currentAST, tmp289_AST);
7240 dummy_AST = (TNode)currentAST.root;
7241 break;
7242 }
7243 case NTypeMissing:
7244 {
7245 TNode tmp290_AST = null;
7246 tmp290_AST = (TNode)astFactory.create(LT(1));
7247 astFactory.addASTChild(currentAST, tmp290_AST);
7249 dummy_AST = (TNode)currentAST.root;
7250 break;
7251 }
7252 default:
7253 {
7254 throw new NoViableAltException(LT(1), getFilename());
7255 }
7256 }
7257 }
7258 catch (RecognitionException ex) {
7259 if (inputState.guessing==0) {
7260 reportError(ex);
7261 recover(ex,_tokenSet_0);
7262 } else {
7263 throw ex;
7264 }
7265 }
7266 returnAST = dummy_AST;
7267 }
7268
7269
7270 public static final String[] _tokenNames = {
7271 "<0>",
7272 "EOF",
7273 "<2>",
7274 "NULL_TREE_LOOKAHEAD",
7275 "\"typedef\"",
7276 "\"asm\"",
7277 "\"volatile\"",
7278 "LCURLY",
7279 "RCURLY",
7280 "SEMI",
7281 "\"struct\"",
7282 "\"union\"",
7283 "\"enum\"",
7284 "\"auto\"",
7285 "\"register\"",
7286 "\"extern\"",
7287 "\"static\"",
7288 "\"const\"",
7289 "\"void\"",
7290 "\"char\"",
7291 "\"short\"",
7292 "\"int\"",
7293 "\"long\"",
7294 "\"float\"",
7295 "\"double\"",
7296 "\"signed\"",
7297 "\"unsigned\"",
7298 "\"int8_t\"",
7299 "\"uint8_t\"",
7300 "\"int16_t\"",
7301 "\"uint16_t\"",
7302 "\"__int32\"",
7303 "\"int32_t\"",
7304 "\"wchar_t\"",
7305 "\"uint32_t\"",
7306 "\"__int64\"",
7307 "\"int64_t\"",
7308 "\"uint64_t\"",
7309 "\"ptrdiff_t\"",
7310 "\"intptr_t\"",
7311 "\"size_t\"",
7312 "\"uintptr_t\"",
7313 "ID",
7314 "COMMA",
7315 "COLON",
7316 "ASSIGN",
7317 "STAR",
7318 "LPAREN",
7319 "RPAREN",
7320 "LBRACKET",
7321 "RBRACKET",
7322 "VARARGS",
7323 "\"while\"",
7324 "\"do\"",
7325 "\"for\"",
7326 "\"goto\"",
7327 "\"continue\"",
7328 "\"break\"",
7329 "\"return\"",
7330 "\"case\"",
7331 "\"default\"",
7332 "\"if\"",
7333 "\"else\"",
7334 "\"switch\"",
7335 "DIV_ASSIGN",
7336 "PLUS_ASSIGN",
7337 "MINUS_ASSIGN",
7338 "STAR_ASSIGN",
7339 "MOD_ASSIGN",
7340 "RSHIFT_ASSIGN",
7341 "LSHIFT_ASSIGN",
7342 "BAND_ASSIGN",
7343 "BOR_ASSIGN",
7344 "BXOR_ASSIGN",
7345 "QUESTION",
7346 "LOR",
7347 "LAND",
7348 "BOR",
7349 "BXOR",
7350 "BAND",
7351 "EQUAL",
7352 "NOT_EQUAL",
7353 "LT",
7354 "LTE",
7355 "GT",
7356 "GTE",
7357 "LSHIFT",
7358 "RSHIFT",
7359 "PLUS",
7360 "MINUS",
7361 "DIV",
7362 "MOD",
7363 "INC",
7364 "DEC",
7365 "\"sizeof\"",
7366 "BNOT",
7367 "LNOT",
7368 "PTR",
7369 "DOT",
7370 "CharLiteral",
7371 "StringLiteral",
7372 "IntOctalConst",
7373 "LongOctalConst",
7374 "UnsignedOctalConst",
7375 "IntIntConst",
7376 "LongIntConst",
7377 "UnsignedIntConst",
7378 "IntHexConst",
7379 "LongHexConst",
7380 "UnsignedHexConst",
7381 "FloatDoubleConst",
7382 "DoubleDoubleConst",
7383 "LongDoubleConst",
7384 "NTypedefName",
7385 "NInitDecl",
7386 "NDeclarator",
7387 "NStructDeclarator",
7388 "NDeclaration",
7389 "NCast",
7390 "NPointerGroup",
7391 "NExpressionGroup",
7392 "NFunctionCallArgs",
7393 "NNonemptyAbstractDeclarator",
7394 "NInitializer",
7395 "NStatementExpr",
7396 "NEmptyExpression",
7397 "NParameterTypeList",
7398 "NFunctionDef",
7399 "NCompoundStatement",
7400 "NParameterDeclaration",
7401 "NCommaExpr",
7402 "NUnaryExpr",
7403 "NLabel",
7404 "NPostfixExpr",
7405 "NRangeExpr",
7406 "NStringSeq",
7407 "NInitializerElementLabel",
7408 "NLcurlyInitializer",
7409 "NAsmAttribute",
7410 "NGnuAsmExpr",
7411 "NTypeMissing",
7412 "Vocabulary",
7413 "Whitespace",
7414 "Comment",
7415 "CPPComment",
7416 "NonWhitespace",
7417 "a line directive",
7418 "DefineExpr",
7419 "DefineExpr2",
7420 "Space",
7421 "LineDirective",
7422 "BadStringLiteral",
7423 "Escape",
7424 "Digit",
7425 "LongSuffix",
7426 "UnsignedSuffix",
7427 "FloatSuffix",
7428 "Exponent",
7429 "Number",
7430 "\"__label__\"",
7431 "\"inline\"",
7432 "\"typeof\"",
7433 "\"__complex\"",
7434 "\"__attribute\"",
7435 "\"__alignof\"",
7436 "\"__real\"",
7437 "\"__imag\""
7438 };
7439
7440 protected void buildTokenTypeASTClassMap() {
7441 tokenTypeToASTClassMap=null;
7442 };
7443
7444 private static final long[] mk_tokenSet_0() {
7445 long[] data = { 2L, 0L, 0L};
7446 return data;
7447 }
7448 public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
7449 private static final long[] mk_tokenSet_1() {
7450 long[] data = { 219902325554800L, 0L, 30064771072L, 0L, 0L, 0L};
7451 return data;
7452 }
7453 public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
7454 private static final long[] mk_tokenSet_2() {
7455 long[] data = { 219902325554802L, 0L, 30064771072L, 0L, 0L, 0L};
7456 return data;
7457 }
7458 public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
7459 private static final long[] mk_tokenSet_3() {
7460 long[] data = { 215504279044128L, 111451082752L, 482110078976L, 0L, 0L, 0L};
7461 return data;
7462 }
7463 public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
7464 private static final long[] mk_tokenSet_4() {
7465 long[] data = { 1433763162620672L, 0L, 0L};
7466 return data;
7467 }
7468 public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
7469 private static final long[] mk_tokenSet_5() {
7470 long[] data = { 290271069732864L, 0L, 0L};
7471 return data;
7472 }
7473 public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
7474 private static final long[] mk_tokenSet_6() {
7475 long[] data = { 8796093021264L, 0L, 30064771072L, 0L, 0L, 0L};
7476 return data;
7477 }
7478 public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
7479 private static final long[] mk_tokenSet_7() {
7480 long[] data = { 219902325554896L, 0L, 30064771072L, 0L, 0L, 0L};
7481 return data;
7482 }
7483 public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
7484 private static final long[] mk_tokenSet_8() {
7485 long[] data = { 219902325529664L, 0L, 30064771072L, 0L, 0L, 0L};
7486 return data;
7487 }
7488 public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
7489 private static final long[] mk_tokenSet_9() {
7490 long[] data = { 3034652092661456L, 0L, 30064771072L, 0L, 0L, 0L};
7491 return data;
7492 }
7493 public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
7494 private static final long[] mk_tokenSet_10() {
7495 long[] data = { 215504279044096L, 0L, 0L};
7496 return data;
7497 }
7498 public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());
7499 private static final long[] mk_tokenSet_11() {
7500 long[] data = { 840026883752544L, 0L, 34359738368L, 0L, 0L, 0L};
7501 return data;
7502 }
7503 public static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11());
7504 private static final long[] mk_tokenSet_12() {
7505 long[] data = { -4613717915915517966L, 111451082752L, 514322333696L, 0L, 0L, 0L};
7506 return data;
7507 }
7508 public static final BitSet _tokenSet_12 = new BitSet(mk_tokenSet_12());
7509 private static final long[] mk_tokenSet_13() {
7510 long[] data = { 8796092996672L, 0L, 30064771072L, 0L, 0L, 0L};
7511 return data;
7512 }
7513 public static final BitSet _tokenSet_13 = new BitSet(mk_tokenSet_13());
7514 private static final long[] mk_tokenSet_14() {
7515 long[] data = { 219902325529792L, 0L, 30064771072L, 0L, 0L, 0L};
7516 return data;
7517 }
7518 public static final BitSet _tokenSet_14 = new BitSet(mk_tokenSet_14());
7519 private static final long[] mk_tokenSet_15() {
7520 long[] data = { 8796092767232L, 0L, 25769803776L, 0L, 0L, 0L};
7521 return data;
7522 }
7523 public static final BitSet _tokenSet_15 = new BitSet(mk_tokenSet_15());
7524 private static final long[] mk_tokenSet_16() {
7525 long[] data = { 2603643534573296L, 0L, 64424509440L, 0L, 0L, 0L};
7526 return data;
7527 }
7528 public static final BitSet _tokenSet_16 = new BitSet(mk_tokenSet_16());
7529 private static final long[] mk_tokenSet_17() {
7530 long[] data = { 512L, 0L, 0L};
7531 return data;
7532 }
7533 public static final BitSet _tokenSet_17 = new BitSet(mk_tokenSet_17());
7534 private static final long[] mk_tokenSet_18() {
7535 long[] data = { 778454232465568L, 128630951936L, 482110078976L, 0L, 0L, 0L};
7536 return data;
7537 }
7538 public static final BitSet _tokenSet_18 = new BitSet(mk_tokenSet_18());
7539 private static final long[] mk_tokenSet_19() {
7540 long[] data = { 844424930009056L, 137438953471L, 507879882752L, 0L, 0L, 0L};
7541 return data;
7542 }
7543 public static final BitSet _tokenSet_19 = new BitSet(mk_tokenSet_19());
7544 private static final long[] mk_tokenSet_20() {
7545 long[] data = { 567347999932416L, 17179869184L, 0L, 0L};
7546 return data;
7547 }
7548 public static final BitSet _tokenSet_20 = new BitSet(mk_tokenSet_20());
7549 private static final long[] mk_tokenSet_21() {
7550 long[] data = { 233096465088544L, 111451082752L, 482110078976L, 0L, 0L, 0L};
7551 return data;
7552 }
7553 public static final BitSet _tokenSet_21 = new BitSet(mk_tokenSet_21());
7554 private static final long[] mk_tokenSet_22() {
7555 long[] data = { 215504279044256L, 111451082752L, 482110078976L, 0L, 0L, 0L};
7556 return data;
7557 }
7558 public static final BitSet _tokenSet_22 = new BitSet(mk_tokenSet_22());
7559 private static final long[] mk_tokenSet_23() {
7560 long[] data = { 826832743964640L, 137438953471L, 507879882752L, 0L, 0L, 0L};
7561 return data;
7562 }
7563 public static final BitSet _tokenSet_23 = new BitSet(mk_tokenSet_23());
7564 private static final long[] mk_tokenSet_24() {
7565 long[] data = { 778454232465824L, 128630951936L, 482110078976L, 0L, 0L, 0L};
7566 return data;
7567 }
7568 public static final BitSet _tokenSet_24 = new BitSet(mk_tokenSet_24());
7569 private static final long[] mk_tokenSet_25() {
7570 long[] data = { 8796093022976L, 0L, 0L};
7571 return data;
7572 }
7573 public static final BitSet _tokenSet_25 = new BitSet(mk_tokenSet_25());
7574 private static final long[] mk_tokenSet_26() {
7575 long[] data = { 3034652092538080L, 137438952448L, 507879882752L, 0L, 0L, 0L};
7576 return data;
7577 }
7578 public static final BitSet _tokenSet_26 = new BitSet(mk_tokenSet_26());
7579 private static final long[] mk_tokenSet_27() {
7580 long[] data = { 1908752185695456L, 137438952448L, 507879882752L, 0L, 0L, 0L};
7581 return data;
7582 }
7583 public static final BitSet _tokenSet_27 = new BitSet(mk_tokenSet_27());
7584 private static final long[] mk_tokenSet_28() {
7585 long[] data = { 3791116092572448L, 268435455L, 34359738368L, 0L, 0L, 0L};
7586 return data;
7587 }
7588 public static final BitSet _tokenSet_28 = new BitSet(mk_tokenSet_28());
7589 private static final long[] mk_tokenSet_29() {
7590 long[] data = { 3404087999595296L, 0L, 34359738368L, 0L, 0L, 0L};
7591 return data;
7592 }
7593 public static final BitSet _tokenSet_29 = new BitSet(mk_tokenSet_29());
7594 private static final long[] mk_tokenSet_30() {
7595 long[] data = { 1143492092887040L, 0L, 0L};
7596 return data;
7597 }
7598 public static final BitSet _tokenSet_30 = new BitSet(mk_tokenSet_30());
7599 private static final long[] mk_tokenSet_31() {
7600 long[] data = { 8796093022464L, 0L, 0L};
7601 return data;
7602 }
7603 public static final BitSet _tokenSet_31 = new BitSet(mk_tokenSet_31());
7604 private static final long[] mk_tokenSet_32() {
7605 long[] data = { 998356558021120L, 0L, 0L};
7606 return data;
7607 }
7608 public static final BitSet _tokenSet_32 = new BitSet(mk_tokenSet_32());
7609 private static final long[] mk_tokenSet_33() {
7610 long[] data = { 1073123348709072L, 0L, 30064771072L, 0L, 0L, 0L};
7611 return data;
7612 }
7613 public static final BitSet _tokenSet_33 = new BitSet(mk_tokenSet_33());
7614 private static final long[] mk_tokenSet_34() {
7615 long[] data = { 294669116243968L, 0L, 0L};
7616 return data;
7617 }
7618 public static final BitSet _tokenSet_34 = new BitSet(mk_tokenSet_34());
7619 private static final long[] mk_tokenSet_35() {
7620 long[] data = { 3307330976349936L, 0L, 64424509440L, 0L, 0L, 0L};
7621 return data;
7622 }
7623 public static final BitSet _tokenSet_35 = new BitSet(mk_tokenSet_35());
7624 private static final long[] mk_tokenSet_36() {
7625 long[] data = { 1068725302198784L, 0L, 0L};
7626 return data;
7627 }
7628 public static final BitSet _tokenSet_36 = new BitSet(mk_tokenSet_36());
7629 private static final long[] mk_tokenSet_37() {
7630 long[] data = { 1068725302329920L, 0L, 0L};
7631 return data;
7632 }
7633 public static final BitSet _tokenSet_37 = new BitSet(mk_tokenSet_37());
7634 private static final long[] mk_tokenSet_38() {
7635 long[] data = { 774056185954304L, 0L, 0L};
7636 return data;
7637 }
7638 public static final BitSet _tokenSet_38 = new BitSet(mk_tokenSet_38());
7639 private static final long[] mk_tokenSet_39() {
7640 long[] data = { 2199023255551600L, 111451082752L, 512174850048L, 0L, 0L, 0L};
7641 return data;
7642 }
7643 public static final BitSet _tokenSet_39 = new BitSet(mk_tokenSet_39());
7644 private static final long[] mk_tokenSet_40() {
7645 long[] data = { 290271069733376L, 0L, 0L};
7646 return data;
7647 }
7648 public static final BitSet _tokenSet_40 = new BitSet(mk_tokenSet_40());
7649 private static final long[] mk_tokenSet_41() {
7650 long[] data = { -4615969715729203216L, 111451082752L, 514322333696L, 0L, 0L, 0L};
7651 return data;
7652 }
7653 public static final BitSet _tokenSet_41 = new BitSet(mk_tokenSet_41());
7654 private static final long[] mk_tokenSet_42() {
7655 long[] data = { 1073123348708944L, 0L, 30064771072L, 0L, 0L, 0L};
7656 return data;
7657 }
7658 public static final BitSet _tokenSet_42 = new BitSet(mk_tokenSet_42());
7659 private static final long[] mk_tokenSet_43() {
7660 long[] data = { 8796092898368L, 0L, 25769803776L, 0L, 0L, 0L};
7661 return data;
7662 }
7663 public static final BitSet _tokenSet_43 = new BitSet(mk_tokenSet_43());
7664 private static final long[] mk_tokenSet_44() {
7665 long[] data = { 1064327255563456L, 0L, 25769803776L, 0L, 0L, 0L};
7666 return data;
7667 }
7668 public static final BitSet _tokenSet_44 = new BitSet(mk_tokenSet_44());
7669 private static final long[] mk_tokenSet_45() {
7670 long[] data = { 1108307720674528L, 137438953471L, 507879882752L, 0L, 0L, 0L};
7671 return data;
7672 }
7673 public static final BitSet _tokenSet_45 = new BitSet(mk_tokenSet_45());
7674 private static final long[] mk_tokenSet_46() {
7675 long[] data = { 1090715534753392L, 0L, 64424509440L, 0L, 0L, 0L};
7676 return data;
7677 }
7678 public static final BitSet _tokenSet_46 = new BitSet(mk_tokenSet_46());
7679 private static final long[] mk_tokenSet_47() {
7680 long[] data = { 1125899906842224L, 0L, 64424509440L, 0L, 0L, 0L};
7681 return data;
7682 }
7683 public static final BitSet _tokenSet_47 = new BitSet(mk_tokenSet_47());
7684 private static final long[] mk_tokenSet_48() {
7685 long[] data = { 281474976710656L, 0L, 0L};
7686 return data;
7687 }
7688 public static final BitSet _tokenSet_48 = new BitSet(mk_tokenSet_48());
7689 private static final long[] mk_tokenSet_49() {
7690 long[] data = { 4398046511232L, 0L, 0L};
7691 return data;
7692 }
7693 public static final BitSet _tokenSet_49 = new BitSet(mk_tokenSet_49());
7694 private static final long[] mk_tokenSet_50() {
7695 long[] data = { 256L, 0L, 0L};
7696 return data;
7697 }
7698 public static final BitSet _tokenSet_50 = new BitSet(mk_tokenSet_50());
7699 private static final long[] mk_tokenSet_51() {
7700 long[] data = { 8796092898624L, 0L, 25769803776L, 0L, 0L, 0L};
7701 return data;
7702 }
7703 public static final BitSet _tokenSet_51 = new BitSet(mk_tokenSet_51());
7704 private static final long[] mk_tokenSet_52() {
7705 long[] data = { 1090715534630624L, 0L, 60129542144L, 0L, 0L, 0L};
7706 return data;
7707 }
7708 public static final BitSet _tokenSet_52 = new BitSet(mk_tokenSet_52());
7709 private static final long[] mk_tokenSet_53() {
7710 long[] data = { 1086317488243232L, 0L, 34359738368L, 0L, 0L, 0L};
7711 return data;
7712 }
7713 public static final BitSet _tokenSet_53 = new BitSet(mk_tokenSet_53());
7714 private static final long[] mk_tokenSet_54() {
7715 long[] data = { 241892558111264L, 0L, 34359738368L, 0L, 0L, 0L};
7716 return data;
7717 }
7718 public static final BitSet _tokenSet_54 = new BitSet(mk_tokenSet_54());
7719 private static final long[] mk_tokenSet_55() {
7720 long[] data = { 8796093022720L, 0L, 0L};
7721 return data;
7722 }
7723 public static final BitSet _tokenSet_55 = new BitSet(mk_tokenSet_55());
7724 private static final long[] mk_tokenSet_56() {
7725 long[] data = { 4494803534349088L, 26843545599L, 34359738368L, 0L, 0L, 0L};
7726 return data;
7727 }
7728 public static final BitSet _tokenSet_56 = new BitSet(mk_tokenSet_56());
7729 private static final long[] mk_tokenSet_57() {
7730 long[] data = { -431008558088208L, -1L, 549755813887L, 0L, 0L, 0L};
7731 return data;
7732 }
7733 public static final BitSet _tokenSet_57 = new BitSet(mk_tokenSet_57());
7734 private static final long[] mk_tokenSet_58() {
7735 long[] data = { 8796093021264L, 0L, 32212254720L, 0L, 0L, 0L};
7736 return data;
7737 }
7738 public static final BitSet _tokenSet_58 = new BitSet(mk_tokenSet_58());
7739 private static final long[] mk_tokenSet_59() {
7740 long[] data = { 219902325537856L, 0L, 30064771072L, 0L, 0L, 0L};
7741 return data;
7742 }
7743 public static final BitSet _tokenSet_59 = new BitSet(mk_tokenSet_59());
7744 private static final long[] mk_tokenSet_60() {
7745 long[] data = { 782852278975696L, 0L, 30064771072L, 0L, 0L, 0L};
7746 return data;
7747 }
7748 public static final BitSet _tokenSet_60 = new BitSet(mk_tokenSet_60());
7749 private static final long[] mk_tokenSet_61() {
7750 long[] data = { -4002222325104654L, 111451082752L, 514322333696L, 0L, 0L, 0L};
7751 return data;
7752 }
7753 public static final BitSet _tokenSet_61 = new BitSet(mk_tokenSet_61());
7754 private static final long[] mk_tokenSet_62() {
7755 long[] data = { -4615974113775713632L, 111451082752L, 482110078976L, 0L, 0L, 0L};
7756 return data;
7757 }
7758 public static final BitSet _tokenSet_62 = new BitSet(mk_tokenSet_62());
7759 private static final long[] mk_tokenSet_63() {
7760 long[] data = { 800444464897248L, 137438952448L, 507879882752L, 0L, 0L, 0L};
7761 return data;
7762 }
7763 public static final BitSet _tokenSet_63 = new BitSet(mk_tokenSet_63());
7764 private static final long[] mk_tokenSet_64() {
7765 long[] data = { -3659174697238544L, 137438953471L, 514322333696L, 0L, 0L, 0L};
7766 return data;
7767 }
7768 public static final BitSet _tokenSet_64 = new BitSet(mk_tokenSet_64());
7769 private static final long[] mk_tokenSet_65() {
7770 long[] data = { -4288095348325472L, 111451082752L, 482110078976L, 0L, 0L, 0L};
7771 return data;
7772 }
7773 public static final BitSet _tokenSet_65 = new BitSet(mk_tokenSet_65());
7774 private static final long[] mk_tokenSet_66() {
7775 long[] data = { -3377699720527886L, 137438953471L, 514322333696L, 0L, 0L, 0L};
7776 return data;
7777 }
7778 public static final BitSet _tokenSet_66 = new BitSet(mk_tokenSet_66());
7779 private static final long[] mk_tokenSet_67() {
7780 long[] data = { 826832743964384L, 137438953471L, 507879882752L, 0L, 0L, 0L};
7781 return data;
7782 }
7783 public static final BitSet _tokenSet_67 = new BitSet(mk_tokenSet_67());
7784 private static final long[] mk_tokenSet_68() {
7785 long[] data = { 3720747348394784L, 1023L, 34359738368L, 0L, 0L, 0L};
7786 return data;
7787 }
7788 public static final BitSet _tokenSet_68 = new BitSet(mk_tokenSet_68());
7789 private static final long[] mk_tokenSet_69() {
7790 long[] data = { 3720747348394784L, 2047L, 34359738368L, 0L, 0L, 0L};
7791 return data;
7792 }
7793 public static final BitSet _tokenSet_69 = new BitSet(mk_tokenSet_69());
7794 private static final long[] mk_tokenSet_70() {
7795 long[] data = { 4499201580860384L, 137438953471L, 516469817344L, 0L, 0L, 0L};
7796 return data;
7797 }
7798 public static final BitSet _tokenSet_70 = new BitSet(mk_tokenSet_70());
7799 private static final long[] mk_tokenSet_71() {
7800 long[] data = { 299067162755072L, 68719476736L, 0L, 0L};
7801 return data;
7802 }
7803 public static final BitSet _tokenSet_71 = new BitSet(mk_tokenSet_71());
7804 private static final long[] mk_tokenSet_72() {
7805 long[] data = { 3791116092572448L, 68987912191L, 34359738368L, 0L, 0L, 0L};
7806 return data;
7807 }
7808 public static final BitSet _tokenSet_72 = new BitSet(mk_tokenSet_72());
7809 private static final long[] mk_tokenSet_73() {
7810 long[] data = { 307863255777280L, 0L, 0L};
7811 return data;
7812 }
7813 public static final BitSet _tokenSet_73 = new BitSet(mk_tokenSet_73());
7814 private static final long[] mk_tokenSet_74() {
7815 long[] data = { 3720747348394784L, 4095L, 34359738368L, 0L, 0L, 0L};
7816 return data;
7817 }
7818 public static final BitSet _tokenSet_74 = new BitSet(mk_tokenSet_74());
7819 private static final long[] mk_tokenSet_75() {
7820 long[] data = { 3720747348394784L, 8191L, 34359738368L, 0L, 0L, 0L};
7821 return data;
7822 }
7823 public static final BitSet _tokenSet_75 = new BitSet(mk_tokenSet_75());
7824 private static final long[] mk_tokenSet_76() {
7825 long[] data = { 3720747348394784L, 16383L, 34359738368L, 0L, 0L, 0L};
7826 return data;
7827 }
7828 public static final BitSet _tokenSet_76 = new BitSet(mk_tokenSet_76());
7829 private static final long[] mk_tokenSet_77() {
7830 long[] data = { 3720747348394784L, 32767L, 34359738368L, 0L, 0L, 0L};
7831 return data;
7832 }
7833 public static final BitSet _tokenSet_77 = new BitSet(mk_tokenSet_77());
7834 private static final long[] mk_tokenSet_78() {
7835 long[] data = { 3720747348394784L, 65535L, 34359738368L, 0L, 0L, 0L};
7836 return data;
7837 }
7838 public static final BitSet _tokenSet_78 = new BitSet(mk_tokenSet_78());
7839 private static final long[] mk_tokenSet_79() {
7840 long[] data = { 3720747348394784L, 262143L, 34359738368L, 0L, 0L, 0L};
7841 return data;
7842 }
7843 public static final BitSet _tokenSet_79 = new BitSet(mk_tokenSet_79());
7844 private static final long[] mk_tokenSet_80() {
7845 long[] data = { 3720747348394784L, 4194303L, 34359738368L, 0L, 0L, 0L};
7846 return data;
7847 }
7848 public static final BitSet _tokenSet_80 = new BitSet(mk_tokenSet_80());
7849 private static final long[] mk_tokenSet_81() {
7850 long[] data = { 3720747348394784L, 16777215L, 34359738368L, 0L, 0L, 0L};
7851 return data;
7852 }
7853 public static final BitSet _tokenSet_81 = new BitSet(mk_tokenSet_81());
7854 private static final long[] mk_tokenSet_82() {
7855 long[] data = { 70368744177664L, 201326592L, 0L, 0L};
7856 return data;
7857 }
7858 public static final BitSet _tokenSet_82 = new BitSet(mk_tokenSet_82());
7859 private static final long[] mk_tokenSet_83() {
7860 long[] data = { 3720747348394784L, 67108863L, 34359738368L, 0L, 0L, 0L};
7861 return data;
7862 }
7863 public static final BitSet _tokenSet_83 = new BitSet(mk_tokenSet_83());
7864
7865 }
void popScope()
pop the last scope off the scope stack.
TNode add(final String name, final TNode node)
add a node to the table with it's key as the current scope and the name
TNode lookupNameInCurrentScope(final String name)
lookup an unscoped name in the table by prepending the current scope.
void pushScope(final String s)
push a new scope onto the scope stack.
final void initDeclList(AST declarationSpecifiers)
final void declaratorParamaterList(boolean isFunctionDefinition, String declName)
final void enumList(String enumName)
GnuCParser(ParserSharedInputState state)
GnuCParser(TokenStream lexer, int k)
final String declarator(boolean isFunctionDefinition)
void reportError(RecognitionException ex)
Definition: GnuCParser.java:78
GnuCParser(TokenBuffer tokenBuf, int k)
boolean isTypedefName(String name)
Definition: GnuCParser.java:42
static final String[] _tokenNames
final void compoundStatement(String scopeName)
void pushScope(String scopeName)
Definition: GnuCParser.java:59
final int typeSpecifier(int specCount)
GnuCParser(TokenBuffer tokenBuf)
final void enumerator(String enumName)
final void initDecl(AST declarationSpecifiers)
Class TNode is an implementation of the AST interface and adds many useful features:
Definition: TNode.java:38
int getType()
Get the token type for this node.
Definition: TNode.java:97
void setText(final String text_)
Set the token text for this node.
Definition: TNode.java:179
void setAttribute(final String attrName, final Object value)
set an attribute in the attribute table.
Definition: TNode.java:127
String getText()
Get the token text for this node.
Definition: TNode.java:175
void setType(final int ttype_)
Set the token type for this node.
Definition: TNode.java:101