GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java™ (public API).
GnuCEmitter.java
Go to the documentation of this file.
1// $ANTLR 2.7.7 (2006-11-01): "expandedGnuCEmitter.g" -> "GnuCEmitter.java"$
2
3 package com.jogamp.gluegen.cgram;
4
5 import java.io.*;
6 import java.util.*;
7
8 import antlr.CommonAST;
9 import antlr.DumpASTVisitor;
10
11import antlr.TreeParser;
12import antlr.Token;
13import antlr.collections.AST;
14import antlr.RecognitionException;
15import antlr.ANTLRException;
16import antlr.NoViableAltException;
17import antlr.MismatchedTokenException;
18import antlr.SemanticException;
19import antlr.collections.impl.BitSet;
20import antlr.ASTPair;
21import antlr.collections.impl.ASTArray;
22
23
24public class GnuCEmitter extends antlr.TreeParser implements GnuCEmitterTokenTypes
25 {
26
27
28
29int tabs = 0;
30PrintStream currentOutput = System.out;
31int lineNum = 1;
32String currentSource = "";
33LineObject trueSourceFile;
34final int lineDirectiveThreshold = Integer.MAX_VALUE;
35PreprocessorInfoChannel preprocessorInfoChannel = null;
36Stack sourceFiles = new Stack();
37
38public GnuCEmitter( PreprocessorInfoChannel preprocChannel )
39{
40 preprocessorInfoChannel = preprocChannel;
41}
42
43void initializePrinting()
44{
45 Vector preprocs = preprocessorInfoChannel.extractLinesPrecedingTokenNumber( new Integer(1) );
46 printPreprocs(preprocs);
47/* if ( currentSource.equals("") ) {
48 trueSourceFile = new LineObject(currentSource);
49 currentOutput.println("# 1 \"" + currentSource + "\"\n");
50 sourceFiles.push(trueSourceFile);
51 }
52*/
53}
54
55void finalizePrinting() {
56 // flush any leftover preprocessing instructions to the stream
57
58 printPreprocs(
59 preprocessorInfoChannel.extractLinesPrecedingTokenNumber(
60 new Integer( preprocessorInfoChannel.getMaxTokenNumber() + 1 ) ));
61 //print a newline so file ends at a new line
62 currentOutput.println();
63}
64
65void printPreprocs( Vector preprocs )
66{
67 // if there was a preprocessingDirective previous to this token then
68 // print a newline and the directive, line numbers handled later
69 if ( preprocs.size() > 0 ) {
70 if ( trueSourceFile != null ) {
71 currentOutput.println(); //make sure we're starting a new line unless this is the first line directive
72 }
73 lineNum++;
74 Enumeration e = preprocs.elements();
75 while (e.hasMoreElements())
76 {
77 Object o = e.nextElement();
78 if ( o.getClass().getName().equals("LineObject") ) {
79 LineObject l = (LineObject) o;
80
81 // we always return to the trueSourceFile, we never enter it from another file
82 // force it to be returning if in fact we aren't currently in trueSourceFile
83 if (( trueSourceFile != null ) //trueSource exists
84 && ( !currentSource.equals(trueSourceFile.getSource()) ) //currently not in trueSource
85 && ( trueSourceFile.getSource().equals(l.getSource()) ) ) { //returning to trueSource
86 l.setEnteringFile( false );
87 l.setReturningToFile( true );
88 }
89
90
91 // print the line directive
92 currentOutput.println(l);
93 lineNum = l.getLine();
94 currentSource = l.getSource();
95
96
97 // the very first line directive always represents the true sourcefile
98 if ( trueSourceFile == null ) {
99 trueSourceFile = new LineObject(currentSource);
100 sourceFiles.push(trueSourceFile);
101 }
102
103 // keep our own stack of files entered
104 if ( l.getEnteringFile() ) {
105 sourceFiles.push(l);
106 }
107
108 // if returning to a file, pop the exited files off the stack
109 if ( l.getReturningToFile() ) {
110 LineObject top = (LineObject) sourceFiles.peek();
111 while (( top != trueSourceFile ) && (! l.getSource().equals(top.getSource()) )) {
112 sourceFiles.pop();
113 top = (LineObject) sourceFiles.peek();
114 }
115 }
116 }
117 else { // it was a #pragma or such
118 currentOutput.println(o);
119 lineNum++;
120 }
121 }
122 }
123
124}
125
126void print( TNode t ) {
127 int tLineNum = t.getLocalLineNum();
128 if ( tLineNum == 0 ) tLineNum = lineNum;
129
130 Vector preprocs = preprocessorInfoChannel.extractLinesPrecedingTokenNumber((Integer)t.getAttribute("tokenNumber"));
131 printPreprocs(preprocs);
132
133 if ( (lineNum != tLineNum) ) {
134 // we know we'll be newlines or a line directive or it probably
135 // is just the case that this token is on the next line
136 // either way start a new line and indent it
137 currentOutput.println();
138 lineNum++;
139 printTabs();
140 }
141
142 if ( lineNum == tLineNum ){
143 // do nothing special, we're at the right place
144 }
145 else {
146 int diff = tLineNum - lineNum;
147 if ( lineNum < tLineNum ) {
148 // print out the blank lines to bring us up to right line number
149 for ( ; lineNum < tLineNum ; lineNum++ ) {
150 currentOutput.println();
151 }
152 printTabs();
153 }
154 else { // just reset lineNum
155 lineNum = tLineNum;
156 }
157 }
158 currentOutput.print( t.getText() + " " );
159}
160
161
162/* This was my attempt at being smart about line numbers
163 It didn't work quite right but I don't know why, I didn't
164 have enough test cases. Worked ok compiling rcs and ghostscript
165*/
166void printAddingLineDirectives( TNode t ) {
167 int tLineNum = t.getLocalLineNum();
168 String tSource = (String) t.getAttribute("source");
169
170 if ( tSource == null ) tSource = currentSource;
171 if ( tLineNum == 0 ) tLineNum = lineNum;
172
173 Vector preprocs = preprocessorInfoChannel.extractLinesPrecedingTokenNumber((Integer)t.getAttribute("tokenNumber"));
174 printPreprocs(preprocs);
175
176 if ( (lineNum != tLineNum) || !currentSource.equals(tSource) ) {
177 // we know we'll be newlines or a line directive or it probably
178 // is just the case that this token is on the next line
179 // either way start a new line and indent it
180 currentOutput.println();
181 lineNum++;
182 printTabs();
183 }
184
185 if ( ( lineNum == tLineNum ) && ( currentSource.equals(tSource) ) ){
186 // do nothing special, we're at the right place
187 }
188 else if ( currentSource.equals(tSource) ) {
189 int diff = tLineNum - lineNum;
190 if (diff > 0 && diff < lineDirectiveThreshold) {
191 // print out the blank lines to bring us up to right line number
192 for ( ; lineNum < tLineNum ; lineNum++ ) {
193 currentOutput.println();
194 }
195 }
196 else { // print line directive to get us to right line number
197 // preserve flags 3 and 4 if present in current file
198 if ( ! sourceFiles.empty() ) {
199 LineObject l = (LineObject) sourceFiles.peek();
200 StringBuilder tFlags = new StringBuilder("");
201 if (l.getSystemHeader()) {
202 tFlags.append(" 3");
203 }
204 if (l.getTreatAsC()) {
205 tFlags.append(" 4");
206 }
207 currentOutput.println("# " + tLineNum + " \"" + tSource + "\"" + tFlags.toString());
208 lineNum = tLineNum;
209 }
210 }
211
212 printTabs();
213 }
214 else { // different source
215 Enumeration sources = sourceFiles.elements();
216 // see if we're returning to a file we entered earlier
217 boolean returningToEarlierFile = false;
218 while (sources.hasMoreElements()) {
219 LineObject l = (LineObject) sources.nextElement();
220 if (l.getSource().equals(tSource)) {
221 returningToEarlierFile = true;
222 break;
223 }
224 }
225 if (returningToEarlierFile) {
226 // pop off the files we're exiting, but never pop the trueSourceFile
227 LineObject l = (LineObject) sourceFiles.peek();
228 while ( ( l != trueSourceFile ) &&(! l.getSource().equals(tSource) ) ) {
229 sourceFiles.pop();
230 l = (LineObject) sourceFiles.peek();
231 }
232
233 // put in the return flag, plus others as needed
234 StringBuilder tFlags = new StringBuilder(" 2");
235 if (l.getSystemHeader()) {
236 tFlags.append(" 3");
237 }
238 if (l.getTreatAsC()) {
239 tFlags.append(" 4");
240 }
241
242 currentOutput.println("# " + tLineNum + " \"" + tSource + "\"" + tFlags);
243 lineNum = tLineNum;
244 currentSource = tSource;
245 printTabs();
246 }
247 else { // entering a file that wasn't in the original source
248 // pretend we're entering it from top of stack
249 currentOutput.println("# " + tLineNum + " \"" + tSource + "\"" + " 1");
250 lineNum = tLineNum;
251 currentSource = tSource;
252 printTabs();
253 }
254 }
255 currentOutput.print( t.getText() + " " );
256}
257
258/** It is not ok to print newlines from the String passed in as
259it will screw up the line number handling **/
260void print( String s ) {
261 currentOutput.print( s + " " );
262}
263
264void printTabs() {
265 for ( int i = 0; i< tabs; i++ ) {
266 currentOutput.print( "\t" );
267 }
268}
269
270void commaSep( TNode t ) {
271 print( t );
272 if ( t.getNextSibling() != null ) {
273 print( "," );
274 }
275}
276
277 int traceDepth = 0;
278 public void reportError(RecognitionException ex) {
279 if ( ex != null) {
280 System.err.println("ANTLR Tree Parsing RecognitionException Error: " + ex.getClass().getName() + " " + ex );
281 ex.printStackTrace(System.err);
282 }
283 }
284 public void reportError(NoViableAltException ex) {
285 System.err.println("ANTLR Tree Parsing NoViableAltException Error: " + ex.toString());
286 TNode.printTree( ex.node );
287 ex.printStackTrace(System.err);
288 }
289 public void reportError(MismatchedTokenException ex) {
290 if ( ex != null) {
291 TNode.printTree( ex.node );
292 System.err.println("ANTLR Tree Parsing MismatchedTokenException Error: " + ex );
293 ex.printStackTrace(System.err);
294 }
295 }
296 public void reportError(String s) {
297 System.err.println("ANTLR Error from String: " + s);
298 }
299 public void reportWarning(String s) {
300 System.err.println("ANTLR Warning from String: " + s);
301 }
302 protected void match(AST t, int ttype) throws MismatchedTokenException {
303 //System.out.println("match("+ttype+"); cursor is "+t);
304 super.match(t, ttype);
305 }
306 public void match(AST t, BitSet b) throws MismatchedTokenException {
307 //System.out.println("match("+b+"); cursor is "+t);
308 super.match(t, b);
309 }
310 protected void matchNot(AST t, int ttype) throws MismatchedTokenException {
311 //System.out.println("matchNot("+ttype+"); cursor is "+t);
312 super.matchNot(t, ttype);
313 }
314 public void traceIn(String rname, AST t) {
315 traceDepth += 1;
316 for (int x=0; x<traceDepth; x++) System.out.print(" ");
317 super.traceIn(rname, t);
318 }
319 public void traceOut(String rname, AST t) {
320 for (int x=0; x<traceDepth; x++) System.out.print(" ");
321 super.traceOut(rname, t);
322 traceDepth -= 1;
323 }
324
325
326
327public GnuCEmitter() {
328 tokenNames = _tokenNames;
329}
330
331 public final void translationUnit(AST _t) throws RecognitionException {
332
333 TNode translationUnit_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
334
335 if ( inputState.guessing==0 ) {
336 initializePrinting();
337 }
338 {
339 if (_t==null) _t=ASTNULL;
340 switch ( _t.getType()) {
341 case LITERAL_asm:
342 case SEMI:
343 case NDeclaration:
344 case NFunctionDef:
345 case NTypeMissing:
346 {
347 externalList(_t);
348 _t = _retTree;
349 break;
350 }
351 case 3:
352 {
353 break;
354 }
355 default:
356 {
357 throw new NoViableAltException(_t);
358 }
359 }
360 }
361 if ( inputState.guessing==0 ) {
362 finalizePrinting();
363 }
364 _retTree = _t;
365 }
366
367 public final void externalList(AST _t) throws RecognitionException {
368
369 TNode externalList_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
370
371 try { // for error handling
372 {
373 int _cnt5=0;
374 _loop5:
375 do {
376 if (_t==null) _t=ASTNULL;
377 if ((_tokenSet_0.member(_t.getType()))) {
378 externalDef(_t);
379 _t = _retTree;
380 }
381 else {
382 if ( _cnt5>=1 ) { break _loop5; } else {throw new NoViableAltException(_t);}
383 }
384
385 _cnt5++;
386 } while (true);
387 }
388 }
389 catch (RecognitionException ex) {
390 if (inputState.guessing==0) {
391 reportError(ex);
392 if (_t!=null) {_t = _t.getNextSibling();}
393 } else {
394 throw ex;
395 }
396 }
397 _retTree = _t;
398 }
399
400 public final void externalDef(AST _t) throws RecognitionException {
401
402 TNode externalDef_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
403 TNode s = null;
404
405 try { // for error handling
406 if (_t==null) _t=ASTNULL;
407 switch ( _t.getType()) {
408 case NDeclaration:
409 {
410 declaration(_t);
411 _t = _retTree;
412 break;
413 }
414 case NFunctionDef:
415 {
416 functionDef(_t);
417 _t = _retTree;
418 break;
419 }
420 case LITERAL_asm:
421 {
422 asm_expr(_t);
423 _t = _retTree;
424 break;
425 }
426 case NTypeMissing:
427 {
429 _t = _retTree;
430 break;
431 }
432 case SEMI:
433 {
434 s = (TNode)_t;
435 match(_t,SEMI);
436 _t = _t.getNextSibling();
437 if ( inputState.guessing==0 ) {
438 print( s );
439 }
440 break;
441 }
442 default:
443 {
444 throw new NoViableAltException(_t);
445 }
446 }
447 }
448 catch (RecognitionException ex) {
449 if (inputState.guessing==0) {
450 reportError(ex);
451 if (_t!=null) {_t = _t.getNextSibling();}
452 } else {
453 throw ex;
454 }
455 }
456 _retTree = _t;
457 }
458
459 public final void declaration(AST _t) throws RecognitionException {
460
461 TNode declaration_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
462 TNode s = null;
463
464 try { // for error handling
465 AST __t13 = _t;
466 TNode tmp1_AST_in = (TNode)_t;
468 _t = _t.getFirstChild();
469 declSpecifiers(_t);
470 _t = _retTree;
471 {
472 if (_t==null) _t=ASTNULL;
473 switch ( _t.getType()) {
474 case NInitDecl:
475 {
476 initDeclList(_t);
477 _t = _retTree;
478 break;
479 }
480 case SEMI:
481 {
482 break;
483 }
484 default:
485 {
486 throw new NoViableAltException(_t);
487 }
488 }
489 }
490 {
491 int _cnt16=0;
492 _loop16:
493 do {
494 if (_t==null) _t=ASTNULL;
495 if ((_t.getType()==SEMI)) {
496 s = (TNode)_t;
497 match(_t,SEMI);
498 _t = _t.getNextSibling();
499 if ( inputState.guessing==0 ) {
500 print( s );
501 }
502 }
503 else {
504 if ( _cnt16>=1 ) { break _loop16; } else {throw new NoViableAltException(_t);}
505 }
506
507 _cnt16++;
508 } while (true);
509 }
510 _t = __t13;
511 _t = _t.getNextSibling();
512 }
513 catch (RecognitionException ex) {
514 if (inputState.guessing==0) {
515 reportError(ex);
516 if (_t!=null) {_t = _t.getNextSibling();}
517 } else {
518 throw ex;
519 }
520 }
521 _retTree = _t;
522 }
523
524 public final void functionDef(AST _t) throws RecognitionException {
525
526 TNode functionDef_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
527 TNode v = null;
528
529 try { // for error handling
530 AST __t123 = _t;
531 TNode tmp2_AST_in = (TNode)_t;
533 _t = _t.getFirstChild();
534 {
535 if (_t==null) _t=ASTNULL;
536 switch ( _t.getType()) {
537 case LITERAL_volatile:
538 case LITERAL_struct:
539 case LITERAL_union:
540 case LITERAL_enum:
541 case LITERAL_extern:
542 case LITERAL_static:
543 case LITERAL_const:
544 case LITERAL_void:
545 case LITERAL_char:
546 case LITERAL_short:
547 case LITERAL_int:
548 case LITERAL_long:
549 case LITERAL_float:
550 case LITERAL_double:
551 case LITERAL_signed:
552 case LITERAL_unsigned:
553 case NTypedefName:
554 case LITERAL_inline:
555 case LITERAL_typeof:
557 {
559 _t = _retTree;
560 break;
561 }
562 case NDeclarator:
563 {
564 break;
565 }
566 default:
567 {
568 throw new NoViableAltException(_t);
569 }
570 }
571 }
572 declarator(_t);
573 _t = _retTree;
574 {
575 _loop126:
576 do {
577 if (_t==null) _t=ASTNULL;
578 switch ( _t.getType()) {
579 case NDeclaration:
580 {
581 declaration(_t);
582 _t = _retTree;
583 break;
584 }
585 case VARARGS:
586 {
587 v = (TNode)_t;
588 match(_t,VARARGS);
589 _t = _t.getNextSibling();
590 if ( inputState.guessing==0 ) {
591 print( v );
592 }
593 break;
594 }
595 default:
596 {
597 break _loop126;
598 }
599 }
600 } while (true);
601 }
603 _t = _retTree;
604 _t = __t123;
605 _t = _t.getNextSibling();
606 }
607 catch (RecognitionException ex) {
608 if (inputState.guessing==0) {
609 reportError(ex);
610 if (_t!=null) {_t = _t.getNextSibling();}
611 } else {
612 throw ex;
613 }
614 }
615 _retTree = _t;
616 }
617
618 public final void asm_expr(AST _t) throws RecognitionException {
619
620 TNode asm_expr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
621 TNode a = null;
622 TNode v = null;
623 TNode lc = null;
624 TNode rc = null;
625 TNode s = null;
626
627 try { // for error handling
628 AST __t10 = _t;
629 a = _t==ASTNULL ? null :(TNode)_t;
630 match(_t,LITERAL_asm);
631 _t = _t.getFirstChild();
632 if ( inputState.guessing==0 ) {
633 print( a );
634 }
635 {
636 if (_t==null) _t=ASTNULL;
637 switch ( _t.getType()) {
638 case LITERAL_volatile:
639 {
640 v = (TNode)_t;
642 _t = _t.getNextSibling();
643 if ( inputState.guessing==0 ) {
644 print( v );
645 }
646 break;
647 }
648 case LCURLY:
649 {
650 break;
651 }
652 default:
653 {
654 throw new NoViableAltException(_t);
655 }
656 }
657 }
658 lc = (TNode)_t;
659 match(_t,LCURLY);
660 _t = _t.getNextSibling();
661 if ( inputState.guessing==0 ) {
662 print( lc ); tabs++;
663 }
664 expr(_t);
665 _t = _retTree;
666 rc = (TNode)_t;
667 match(_t,RCURLY);
668 _t = _t.getNextSibling();
669 if ( inputState.guessing==0 ) {
670 tabs--; print( rc );
671 }
672 s = (TNode)_t;
673 match(_t,SEMI);
674 _t = _t.getNextSibling();
675 if ( inputState.guessing==0 ) {
676 print( s );
677 }
678 _t = __t10;
679 _t = _t.getNextSibling();
680 }
681 catch (RecognitionException ex) {
682 if (inputState.guessing==0) {
683 reportError(ex);
684 if (_t!=null) {_t = _t.getNextSibling();}
685 } else {
686 throw ex;
687 }
688 }
689 _retTree = _t;
690 }
691
692 public final void typelessDeclaration(AST _t) throws RecognitionException {
693
694 TNode typelessDeclaration_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
695 TNode s = null;
696
697 try { // for error handling
698 AST __t8 = _t;
699 TNode tmp3_AST_in = (TNode)_t;
701 _t = _t.getFirstChild();
702 initDeclList(_t);
703 _t = _retTree;
704 s = (TNode)_t;
705 match(_t,SEMI);
706 _t = _t.getNextSibling();
707 _t = __t8;
708 _t = _t.getNextSibling();
709 if ( inputState.guessing==0 ) {
710 print( s );
711 }
712 }
713 catch (RecognitionException ex) {
714 if (inputState.guessing==0) {
715 reportError(ex);
716 if (_t!=null) {_t = _t.getNextSibling();}
717 } else {
718 throw ex;
719 }
720 }
721 _retTree = _t;
722 }
723
724 public final void initDeclList(AST _t) throws RecognitionException {
725
726 TNode initDeclList_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
727
728 try { // for error handling
729 initDecl(_t);
730 _t = _retTree;
731 {
732 _loop76:
733 do {
734 if (_t==null) _t=ASTNULL;
735 if ((_t.getType()==NInitDecl)) {
736 if ( inputState.guessing==0 ) {
737 print( "," );
738 }
739 initDecl(_t);
740 _t = _retTree;
741 }
742 else {
743 break _loop76;
744 }
745
746 } while (true);
747 }
748 }
749 catch (RecognitionException ex) {
750 if (inputState.guessing==0) {
751 reportError(ex);
752 if (_t!=null) {_t = _t.getNextSibling();}
753 } else {
754 throw ex;
755 }
756 }
757 _retTree = _t;
758 }
759
760 public final void expr(AST _t) throws RecognitionException {
761
762 TNode expr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
763
764 try { // for error handling
765 if (_t==null) _t=ASTNULL;
766 switch ( _t.getType()) {
767 case ASSIGN:
768 case STAR:
769 case DIV_ASSIGN:
770 case PLUS_ASSIGN:
771 case MINUS_ASSIGN:
772 case STAR_ASSIGN:
773 case MOD_ASSIGN:
774 case RSHIFT_ASSIGN:
775 case LSHIFT_ASSIGN:
776 case BAND_ASSIGN:
777 case BOR_ASSIGN:
778 case BXOR_ASSIGN:
779 case LOR:
780 case LAND:
781 case BOR:
782 case BXOR:
783 case BAND:
784 case EQUAL:
785 case NOT_EQUAL:
786 case LT:
787 case LTE:
788 case GT:
789 case GTE:
790 case LSHIFT:
791 case RSHIFT:
792 case PLUS:
793 case MINUS:
794 case DIV:
795 case MOD:
796 case NCommaExpr:
797 {
798 binaryExpr(_t);
799 _t = _retTree;
800 break;
801 }
802 case QUESTION:
803 {
804 conditionalExpr(_t);
805 _t = _retTree;
806 break;
807 }
808 case NCast:
809 {
810 castExpr(_t);
811 _t = _retTree;
812 break;
813 }
814 case INC:
815 case DEC:
816 case LITERAL_sizeof:
817 case NUnaryExpr:
819 {
820 unaryExpr(_t);
821 _t = _retTree;
822 break;
823 }
824 case NPostfixExpr:
825 {
826 postfixExpr(_t);
827 _t = _retTree;
828 break;
829 }
830 case ID:
831 case CharLiteral:
832 case NExpressionGroup:
833 case NStringSeq:
834 case Number:
835 {
836 primaryExpr(_t);
837 _t = _retTree;
838 break;
839 }
840 case NEmptyExpression:
841 {
842 emptyExpr(_t);
843 _t = _retTree;
844 break;
845 }
846 case LPAREN:
847 {
849 _t = _retTree;
850 break;
851 }
852 case NInitializer:
854 {
855 initializer(_t);
856 _t = _retTree;
857 break;
858 }
859 case NRangeExpr:
860 {
861 rangeExpr(_t);
862 _t = _retTree;
863 break;
864 }
865 case NGnuAsmExpr:
866 {
867 gnuAsmExpr(_t);
868 _t = _retTree;
869 break;
870 }
871 default:
872 {
873 throw new NoViableAltException(_t);
874 }
875 }
876 }
877 catch (RecognitionException ex) {
878 if (inputState.guessing==0) {
879 reportError(ex);
880 if (_t!=null) {_t = _t.getNextSibling();}
881 } else {
882 throw ex;
883 }
884 }
885 _retTree = _t;
886 }
887
888 public final void declSpecifiers(AST _t) throws RecognitionException {
889
890 TNode declSpecifiers_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
891
892 try { // for error handling
893 {
894 int _cnt19=0;
895 _loop19:
896 do {
897 if (_t==null) _t=ASTNULL;
898 switch ( _t.getType()) {
899 case LITERAL_typedef:
900 case LITERAL_auto:
901 case LITERAL_register:
902 case LITERAL_extern:
903 case LITERAL_static:
904 case LITERAL_inline:
905 {
907 _t = _retTree;
908 break;
909 }
910 case LITERAL_volatile:
911 case LITERAL_const:
912 {
913 typeQualifier(_t);
914 _t = _retTree;
915 break;
916 }
917 case LITERAL_struct:
918 case LITERAL_union:
919 case LITERAL_enum:
920 case LITERAL_void:
921 case LITERAL_char:
922 case LITERAL_short:
923 case LITERAL_int:
924 case LITERAL_long:
925 case LITERAL_float:
926 case LITERAL_double:
927 case LITERAL_signed:
928 case LITERAL_unsigned:
929 case NTypedefName:
930 case LITERAL_typeof:
932 {
933 typeSpecifier(_t);
934 _t = _retTree;
935 break;
936 }
937 default:
938 {
939 if ( _cnt19>=1 ) { break _loop19; } else {throw new NoViableAltException(_t);}
940 }
941 }
942 _cnt19++;
943 } while (true);
944 }
945 }
946 catch (RecognitionException ex) {
947 if (inputState.guessing==0) {
948 reportError(ex);
949 if (_t!=null) {_t = _t.getNextSibling();}
950 } else {
951 throw ex;
952 }
953 }
954 _retTree = _t;
955 }
956
957 public final void storageClassSpecifier(AST _t) throws RecognitionException {
958
959 TNode storageClassSpecifier_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
960 TNode a = null;
961 TNode b = null;
962 TNode c = null;
963
964 try { // for error handling
965 if (_t==null) _t=ASTNULL;
966 switch ( _t.getType()) {
967 case LITERAL_auto:
968 {
969 a = (TNode)_t;
971 _t = _t.getNextSibling();
972 if ( inputState.guessing==0 ) {
973 print( a );
974 }
975 break;
976 }
977 case LITERAL_register:
978 {
979 b = (TNode)_t;
981 _t = _t.getNextSibling();
982 if ( inputState.guessing==0 ) {
983 print( b );
984 }
985 break;
986 }
987 case LITERAL_typedef:
988 {
989 c = (TNode)_t;
991 _t = _t.getNextSibling();
992 if ( inputState.guessing==0 ) {
993 print( c );
994 }
995 break;
996 }
997 case LITERAL_extern:
998 case LITERAL_static:
999 case LITERAL_inline:
1000 {
1002 _t = _retTree;
1003 break;
1004 }
1005 default:
1006 {
1007 throw new NoViableAltException(_t);
1008 }
1009 }
1010 }
1011 catch (RecognitionException ex) {
1012 if (inputState.guessing==0) {
1013 reportError(ex);
1014 if (_t!=null) {_t = _t.getNextSibling();}
1015 } else {
1016 throw ex;
1017 }
1018 }
1019 _retTree = _t;
1020 }
1021
1022 public final void typeQualifier(AST _t) throws RecognitionException {
1023
1024 TNode typeQualifier_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
1025 TNode a = null;
1026 TNode b = null;
1027
1028 try { // for error handling
1029 if (_t==null) _t=ASTNULL;
1030 switch ( _t.getType()) {
1031 case LITERAL_const:
1032 {
1033 a = (TNode)_t;
1034 match(_t,LITERAL_const);
1035 _t = _t.getNextSibling();
1036 if ( inputState.guessing==0 ) {
1037 print( a );
1038 }
1039 break;
1040 }
1041 case LITERAL_volatile:
1042 {
1043 b = (TNode)_t;
1045 _t = _t.getNextSibling();
1046 if ( inputState.guessing==0 ) {
1047 print( b );
1048 }
1049 break;
1050 }
1051 default:
1052 {
1053 throw new NoViableAltException(_t);
1054 }
1055 }
1056 }
1057 catch (RecognitionException ex) {
1058 if (inputState.guessing==0) {
1059 reportError(ex);
1060 if (_t!=null) {_t = _t.getNextSibling();}
1061 } else {
1062 throw ex;
1063 }
1064 }
1065 _retTree = _t;
1066 }
1067
1068 public final void typeSpecifier(AST _t) throws RecognitionException {
1069
1070 TNode typeSpecifier_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
1071 TNode a = null;
1072 TNode b = null;
1073 TNode c = null;
1074 TNode d = null;
1075 TNode e = null;
1076 TNode f = null;
1077 TNode g = null;
1078 TNode h = null;
1079 TNode i = null;
1080 TNode n = null;
1081 TNode lp = null;
1082 TNode rp = null;
1083 TNode p = null;
1084
1085 try { // for error handling
1086 if (_t==null) _t=ASTNULL;
1087 switch ( _t.getType()) {
1088 case LITERAL_void:
1089 {
1090 a = (TNode)_t;
1091 match(_t,LITERAL_void);
1092 _t = _t.getNextSibling();
1093 if ( inputState.guessing==0 ) {
1094 print( a );
1095 }
1096 break;
1097 }
1098 case LITERAL_char:
1099 {
1100 b = (TNode)_t;
1101 match(_t,LITERAL_char);
1102 _t = _t.getNextSibling();
1103 if ( inputState.guessing==0 ) {
1104 print( b );
1105 }
1106 break;
1107 }
1108 case LITERAL_short:
1109 {
1110 c = (TNode)_t;
1111 match(_t,LITERAL_short);
1112 _t = _t.getNextSibling();
1113 if ( inputState.guessing==0 ) {
1114 print( c );
1115 }
1116 break;
1117 }
1118 case LITERAL_int:
1119 {
1120 d = (TNode)_t;
1121 match(_t,LITERAL_int);
1122 _t = _t.getNextSibling();
1123 if ( inputState.guessing==0 ) {
1124 print( d );
1125 }
1126 break;
1127 }
1128 case LITERAL_long:
1129 {
1130 e = (TNode)_t;
1131 match(_t,LITERAL_long);
1132 _t = _t.getNextSibling();
1133 if ( inputState.guessing==0 ) {
1134 print( e );
1135 }
1136 break;
1137 }
1138 case LITERAL_float:
1139 {
1140 f = (TNode)_t;
1141 match(_t,LITERAL_float);
1142 _t = _t.getNextSibling();
1143 if ( inputState.guessing==0 ) {
1144 print( f );
1145 }
1146 break;
1147 }
1148 case LITERAL_double:
1149 {
1150 g = (TNode)_t;
1152 _t = _t.getNextSibling();
1153 if ( inputState.guessing==0 ) {
1154 print( g );
1155 }
1156 break;
1157 }
1158 case LITERAL_signed:
1159 {
1160 h = (TNode)_t;
1162 _t = _t.getNextSibling();
1163 if ( inputState.guessing==0 ) {
1164 print( h );
1165 }
1166 break;
1167 }
1168 case LITERAL_unsigned:
1169 {
1170 i = (TNode)_t;
1172 _t = _t.getNextSibling();
1173 if ( inputState.guessing==0 ) {
1174 print( i );
1175 }
1176 break;
1177 }
1178 case LITERAL_struct:
1179 {
1180 structSpecifier(_t);
1181 _t = _retTree;
1182 {
1183 _loop25:
1184 do {
1185 if (_t==null) _t=ASTNULL;
1186 if ((_t.getType()==NAsmAttribute||_t.getType()==LITERAL___attribute)) {
1187 attributeDecl(_t);
1188 _t = _retTree;
1189 }
1190 else {
1191 break _loop25;
1192 }
1193
1194 } while (true);
1195 }
1196 break;
1197 }
1198 case LITERAL_union:
1199 {
1200 unionSpecifier(_t);
1201 _t = _retTree;
1202 {
1203 _loop27:
1204 do {
1205 if (_t==null) _t=ASTNULL;
1206 if ((_t.getType()==NAsmAttribute||_t.getType()==LITERAL___attribute)) {
1207 attributeDecl(_t);
1208 _t = _retTree;
1209 }
1210 else {
1211 break _loop27;
1212 }
1213
1214 } while (true);
1215 }
1216 break;
1217 }
1218 case LITERAL_enum:
1219 {
1220 enumSpecifier(_t);
1221 _t = _retTree;
1222 break;
1223 }
1224 case NTypedefName:
1225 {
1226 typedefName(_t);
1227 _t = _retTree;
1228 break;
1229 }
1230 case LITERAL_typeof:
1231 {
1232 AST __t28 = _t;
1233 n = _t==ASTNULL ? null :(TNode)_t;
1235 _t = _t.getFirstChild();
1236 lp = (TNode)_t;
1237 match(_t,LPAREN);
1238 _t = _t.getNextSibling();
1239 if ( inputState.guessing==0 ) {
1240 print( n ); print( lp );
1241 }
1242 {
1243 if (_t==null) _t=ASTNULL;
1244 switch ( _t.getType()) {
1245 case LITERAL_volatile:
1246 case LITERAL_struct:
1247 case LITERAL_union:
1248 case LITERAL_enum:
1249 case LITERAL_const:
1250 case LITERAL_void:
1251 case LITERAL_char:
1252 case LITERAL_short:
1253 case LITERAL_int:
1254 case LITERAL_long:
1255 case LITERAL_float:
1256 case LITERAL_double:
1257 case LITERAL_signed:
1258 case LITERAL_unsigned:
1259 case NTypedefName:
1260 case LITERAL_typeof:
1261 case LITERAL___complex:
1262 {
1263 typeName(_t);
1264 _t = _retTree;
1265 break;
1266 }
1267 case ID:
1268 case ASSIGN:
1269 case STAR:
1270 case LPAREN:
1271 case DIV_ASSIGN:
1272 case PLUS_ASSIGN:
1273 case MINUS_ASSIGN:
1274 case STAR_ASSIGN:
1275 case MOD_ASSIGN:
1276 case RSHIFT_ASSIGN:
1277 case LSHIFT_ASSIGN:
1278 case BAND_ASSIGN:
1279 case BOR_ASSIGN:
1280 case BXOR_ASSIGN:
1281 case QUESTION:
1282 case LOR:
1283 case LAND:
1284 case BOR:
1285 case BXOR:
1286 case BAND:
1287 case EQUAL:
1288 case NOT_EQUAL:
1289 case LT:
1290 case LTE:
1291 case GT:
1292 case GTE:
1293 case LSHIFT:
1294 case RSHIFT:
1295 case PLUS:
1296 case MINUS:
1297 case DIV:
1298 case MOD:
1299 case INC:
1300 case DEC:
1301 case LITERAL_sizeof:
1302 case CharLiteral:
1303 case NCast:
1304 case NExpressionGroup:
1305 case NInitializer:
1306 case NEmptyExpression:
1307 case NCommaExpr:
1308 case NUnaryExpr:
1309 case NPostfixExpr:
1310 case NRangeExpr:
1311 case NStringSeq:
1312 case NLcurlyInitializer:
1313 case NGnuAsmExpr:
1314 case Number:
1315 case LITERAL___alignof:
1316 {
1317 expr(_t);
1318 _t = _retTree;
1319 break;
1320 }
1321 default:
1322 {
1323 throw new NoViableAltException(_t);
1324 }
1325 }
1326 }
1327 rp = (TNode)_t;
1328 match(_t,RPAREN);
1329 _t = _t.getNextSibling();
1330 if ( inputState.guessing==0 ) {
1331 print( rp );
1332 }
1333 _t = __t28;
1334 _t = _t.getNextSibling();
1335 break;
1336 }
1337 case LITERAL___complex:
1338 {
1339 p = (TNode)_t;
1341 _t = _t.getNextSibling();
1342 if ( inputState.guessing==0 ) {
1343 print( p );
1344 }
1345 break;
1346 }
1347 default:
1348 {
1349 throw new NoViableAltException(_t);
1350 }
1351 }
1352 }
1353 catch (RecognitionException ex) {
1354 if (inputState.guessing==0) {
1355 reportError(ex);
1356 if (_t!=null) {_t = _t.getNextSibling();}
1357 } else {
1358 throw ex;
1359 }
1360 }
1361 _retTree = _t;
1362 }
1363
1364 public final void functionStorageClassSpecifier(AST _t) throws RecognitionException {
1365
1366 TNode functionStorageClassSpecifier_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
1367 TNode a = null;
1368 TNode b = null;
1369 TNode c = null;
1370
1371 try { // for error handling
1372 if (_t==null) _t=ASTNULL;
1373 switch ( _t.getType()) {
1374 case LITERAL_extern:
1375 {
1376 a = (TNode)_t;
1378 _t = _t.getNextSibling();
1379 if ( inputState.guessing==0 ) {
1380 print( a );
1381 }
1382 break;
1383 }
1384 case LITERAL_static:
1385 {
1386 b = (TNode)_t;
1388 _t = _t.getNextSibling();
1389 if ( inputState.guessing==0 ) {
1390 print( b );
1391 }
1392 break;
1393 }
1394 case LITERAL_inline:
1395 {
1396 c = (TNode)_t;
1398 _t = _t.getNextSibling();
1399 if ( inputState.guessing==0 ) {
1400 print( c );
1401 }
1402 break;
1403 }
1404 default:
1405 {
1406 throw new NoViableAltException(_t);
1407 }
1408 }
1409 }
1410 catch (RecognitionException ex) {
1411 if (inputState.guessing==0) {
1412 reportError(ex);
1413 if (_t!=null) {_t = _t.getNextSibling();}
1414 } else {
1415 throw ex;
1416 }
1417 }
1418 _retTree = _t;
1419 }
1420
1421 public final void structSpecifier(AST _t) throws RecognitionException {
1422
1423 TNode structSpecifier_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
1424 TNode a = null;
1425
1426 try { // for error handling
1427 AST __t35 = _t;
1428 a = _t==ASTNULL ? null :(TNode)_t;
1430 _t = _t.getFirstChild();
1431 if ( inputState.guessing==0 ) {
1432 print( a );
1433 }
1435 _t = _retTree;
1436 _t = __t35;
1437 _t = _t.getNextSibling();
1438 }
1439 catch (RecognitionException ex) {
1440 if (inputState.guessing==0) {
1441 reportError(ex);
1442 if (_t!=null) {_t = _t.getNextSibling();}
1443 } else {
1444 throw ex;
1445 }
1446 }
1447 _retTree = _t;
1448 }
1449
1450 public final void attributeDecl(AST _t) throws RecognitionException {
1451
1452 TNode attributeDecl_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
1453 TNode a = null;
1454 TNode b = null;
1455 TNode n = null;
1456 TNode lp = null;
1457 TNode rp = null;
1458
1459 try { // for error handling
1460 if (_t==null) _t=ASTNULL;
1461 switch ( _t.getType()) {
1463 {
1464 AST __t70 = _t;
1465 a = _t==ASTNULL ? null :(TNode)_t;
1467 _t = _t.getFirstChild();
1468 if ( inputState.guessing==0 ) {
1469 print( a );
1470 }
1471 {
1472 _loop72:
1473 do {
1474 if (_t==null) _t=ASTNULL;
1475 if (((_t.getType() >= LITERAL_typedef && _t.getType() <= LITERAL___imag))) {
1476 b = (TNode)_t;
1477 if ( _t==null ) throw new MismatchedTokenException();
1478 _t = _t.getNextSibling();
1479 if ( inputState.guessing==0 ) {
1480 print( b );
1481 }
1482 }
1483 else {
1484 break _loop72;
1485 }
1486
1487 } while (true);
1488 }
1489 _t = __t70;
1490 _t = _t.getNextSibling();
1491 break;
1492 }
1493 case NAsmAttribute:
1494 {
1495 AST __t73 = _t;
1496 n = _t==ASTNULL ? null :(TNode)_t;
1497 match(_t,NAsmAttribute);
1498 _t = _t.getFirstChild();
1499 if ( inputState.guessing==0 ) {
1500 print( n );
1501 }
1502 lp = (TNode)_t;
1503 match(_t,LPAREN);
1504 _t = _t.getNextSibling();
1505 if ( inputState.guessing==0 ) {
1506 print( lp );
1507 }
1508 expr(_t);
1509 _t = _retTree;
1510 if ( inputState.guessing==0 ) {
1511 print( ")" );
1512 }
1513 rp = (TNode)_t;
1514 match(_t,RPAREN);
1515 _t = _t.getNextSibling();
1516 if ( inputState.guessing==0 ) {
1517 print( rp );
1518 }
1519 _t = __t73;
1520 _t = _t.getNextSibling();
1521 break;
1522 }
1523 default:
1524 {
1525 throw new NoViableAltException(_t);
1526 }
1527 }
1528 }
1529 catch (RecognitionException ex) {
1530 if (inputState.guessing==0) {
1531 reportError(ex);
1532 if (_t!=null) {_t = _t.getNextSibling();}
1533 } else {
1534 throw ex;
1535 }
1536 }
1537 _retTree = _t;
1538 }
1539
1540 public final void unionSpecifier(AST _t) throws RecognitionException {
1541
1542 TNode unionSpecifier_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
1543 TNode a = null;
1544
1545 try { // for error handling
1546 AST __t37 = _t;
1547 a = _t==ASTNULL ? null :(TNode)_t;
1548 match(_t,LITERAL_union);
1549 _t = _t.getFirstChild();
1550 if ( inputState.guessing==0 ) {
1551 print( a );
1552 }
1554 _t = _retTree;
1555 _t = __t37;
1556 _t = _t.getNextSibling();
1557 }
1558 catch (RecognitionException ex) {
1559 if (inputState.guessing==0) {
1560 reportError(ex);
1561 if (_t!=null) {_t = _t.getNextSibling();}
1562 } else {
1563 throw ex;
1564 }
1565 }
1566 _retTree = _t;
1567 }
1568
1569 public final void enumSpecifier(AST _t) throws RecognitionException {
1570
1571 TNode enumSpecifier_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
1572 TNode a = null;
1573 TNode i = null;
1574 TNode lc = null;
1575 TNode rc = null;
1576
1577 try { // for error handling
1578 AST __t61 = _t;
1579 a = _t==ASTNULL ? null :(TNode)_t;
1580 match(_t,LITERAL_enum);
1581 _t = _t.getFirstChild();
1582 if ( inputState.guessing==0 ) {
1583 print( a );
1584 }
1585 {
1586 if (_t==null) _t=ASTNULL;
1587 switch ( _t.getType()) {
1588 case ID:
1589 {
1590 i = (TNode)_t;
1591 match(_t,ID);
1592 _t = _t.getNextSibling();
1593 if ( inputState.guessing==0 ) {
1594 print( i );
1595 }
1596 break;
1597 }
1598 case 3:
1599 case LCURLY:
1600 {
1601 break;
1602 }
1603 default:
1604 {
1605 throw new NoViableAltException(_t);
1606 }
1607 }
1608 }
1609 {
1610 if (_t==null) _t=ASTNULL;
1611 switch ( _t.getType()) {
1612 case LCURLY:
1613 {
1614 lc = (TNode)_t;
1615 match(_t,LCURLY);
1616 _t = _t.getNextSibling();
1617 if ( inputState.guessing==0 ) {
1618 print( lc ); tabs++;
1619 }
1620 enumList(_t);
1621 _t = _retTree;
1622 rc = (TNode)_t;
1623 match(_t,RCURLY);
1624 _t = _t.getNextSibling();
1625 if ( inputState.guessing==0 ) {
1626 tabs--; print( rc );
1627 }
1628 break;
1629 }
1630 case 3:
1631 {
1632 break;
1633 }
1634 default:
1635 {
1636 throw new NoViableAltException(_t);
1637 }
1638 }
1639 }
1640 _t = __t61;
1641 _t = _t.getNextSibling();
1642 }
1643 catch (RecognitionException ex) {
1644 if (inputState.guessing==0) {
1645 reportError(ex);
1646 if (_t!=null) {_t = _t.getNextSibling();}
1647 } else {
1648 throw ex;
1649 }
1650 }
1651 _retTree = _t;
1652 }
1653
1654 public final void typedefName(AST _t) throws RecognitionException {
1655
1656 TNode typedefName_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
1657 TNode i = null;
1658
1659 try { // for error handling
1660 AST __t33 = _t;
1661 TNode tmp4_AST_in = (TNode)_t;
1662 match(_t,NTypedefName);
1663 _t = _t.getFirstChild();
1664 i = (TNode)_t;
1665 match(_t,ID);
1666 _t = _t.getNextSibling();
1667 if ( inputState.guessing==0 ) {
1668 print( i );
1669 }
1670 _t = __t33;
1671 _t = _t.getNextSibling();
1672 }
1673 catch (RecognitionException ex) {
1674 if (inputState.guessing==0) {
1675 reportError(ex);
1676 if (_t!=null) {_t = _t.getNextSibling();}
1677 } else {
1678 throw ex;
1679 }
1680 }
1681 _retTree = _t;
1682 }
1683
1684 public final void typeName(AST _t) throws RecognitionException {
1685
1686 TNode typeName_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
1687
1688 try { // for error handling
1690 _t = _retTree;
1691 {
1692 if (_t==null) _t=ASTNULL;
1693 switch ( _t.getType()) {
1695 {
1697 _t = _retTree;
1698 break;
1699 }
1700 case RPAREN:
1701 {
1702 break;
1703 }
1704 default:
1705 {
1706 throw new NoViableAltException(_t);
1707 }
1708 }
1709 }
1710 }
1711 catch (RecognitionException ex) {
1712 if (inputState.guessing==0) {
1713 reportError(ex);
1714 if (_t!=null) {_t = _t.getNextSibling();}
1715 } else {
1716 throw ex;
1717 }
1718 }
1719 _retTree = _t;
1720 }
1721
1722 public final void structOrUnionBody(AST _t) throws RecognitionException {
1723
1724 TNode structOrUnionBody_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
1725 TNode i1 = null;
1726 TNode lc1 = null;
1727 TNode rc1 = null;
1728 TNode lc2 = null;
1729 TNode rc2 = null;
1730 TNode i2 = null;
1731
1732 try { // for error handling
1733 {
1734 boolean synPredMatched41 = false;
1735 if (_t==null) _t=ASTNULL;
1736 if (((_t.getType()==ID))) {
1737 AST __t41 = _t;
1738 synPredMatched41 = true;
1739 inputState.guessing++;
1740 try {
1741 {
1742 TNode tmp5_AST_in = (TNode)_t;
1743 match(_t,ID);
1744 _t = _t.getNextSibling();
1745 TNode tmp6_AST_in = (TNode)_t;
1746 match(_t,LCURLY);
1747 _t = _t.getNextSibling();
1748 }
1749 }
1750 catch (RecognitionException pe) {
1751 synPredMatched41 = false;
1752 }
1753 _t = __t41;
1754inputState.guessing--;
1755 }
1756 if ( synPredMatched41 ) {
1757 i1 = (TNode)_t;
1758 match(_t,ID);
1759 _t = _t.getNextSibling();
1760 lc1 = (TNode)_t;
1761 match(_t,LCURLY);
1762 _t = _t.getNextSibling();
1763 if ( inputState.guessing==0 ) {
1764 print( i1 ); print ( "{" ); tabs++;
1765 }
1766 {
1767 if (_t==null) _t=ASTNULL;
1768 switch ( _t.getType()) {
1769 case LITERAL_volatile:
1770 case LITERAL_struct:
1771 case LITERAL_union:
1772 case LITERAL_enum:
1773 case LITERAL_const:
1774 case LITERAL_void:
1775 case LITERAL_char:
1776 case LITERAL_short:
1777 case LITERAL_int:
1778 case LITERAL_long:
1779 case LITERAL_float:
1780 case LITERAL_double:
1781 case LITERAL_signed:
1782 case LITERAL_unsigned:
1783 case NTypedefName:
1784 case LITERAL_typeof:
1785 case LITERAL___complex:
1786 {
1788 _t = _retTree;
1789 break;
1790 }
1791 case RCURLY:
1792 {
1793 break;
1794 }
1795 default:
1796 {
1797 throw new NoViableAltException(_t);
1798 }
1799 }
1800 }
1801 rc1 = (TNode)_t;
1802 match(_t,RCURLY);
1803 _t = _t.getNextSibling();
1804 if ( inputState.guessing==0 ) {
1805 tabs--; print( rc1 );
1806 }
1807 }
1808 else if ((_t.getType()==LCURLY)) {
1809 lc2 = (TNode)_t;
1810 match(_t,LCURLY);
1811 _t = _t.getNextSibling();
1812 if ( inputState.guessing==0 ) {
1813 print( lc2 ); tabs++;
1814 }
1815 {
1816 if (_t==null) _t=ASTNULL;
1817 switch ( _t.getType()) {
1818 case LITERAL_volatile:
1819 case LITERAL_struct:
1820 case LITERAL_union:
1821 case LITERAL_enum:
1822 case LITERAL_const:
1823 case LITERAL_void:
1824 case LITERAL_char:
1825 case LITERAL_short:
1826 case LITERAL_int:
1827 case LITERAL_long:
1828 case LITERAL_float:
1829 case LITERAL_double:
1830 case LITERAL_signed:
1831 case LITERAL_unsigned:
1832 case NTypedefName:
1833 case LITERAL_typeof:
1834 case LITERAL___complex:
1835 {
1837 _t = _retTree;
1838 break;
1839 }
1840 case RCURLY:
1841 {
1842 break;
1843 }
1844 default:
1845 {
1846 throw new NoViableAltException(_t);
1847 }
1848 }
1849 }
1850 rc2 = (TNode)_t;
1851 match(_t,RCURLY);
1852 _t = _t.getNextSibling();
1853 if ( inputState.guessing==0 ) {
1854 tabs--; print( rc2 );
1855 }
1856 }
1857 else if ((_t.getType()==ID)) {
1858 i2 = (TNode)_t;
1859 match(_t,ID);
1860 _t = _t.getNextSibling();
1861 if ( inputState.guessing==0 ) {
1862 print( i2 );
1863 }
1864 }
1865 else {
1866 throw new NoViableAltException(_t);
1867 }
1868
1869 }
1870 }
1871 catch (RecognitionException ex) {
1872 if (inputState.guessing==0) {
1873 reportError(ex);
1874 if (_t!=null) {_t = _t.getNextSibling();}
1875 } else {
1876 throw ex;
1877 }
1878 }
1879 _retTree = _t;
1880 }
1881
1882 public final void structDeclarationList(AST _t) throws RecognitionException {
1883
1884 TNode structDeclarationList_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
1885
1886 try { // for error handling
1887 {
1888 int _cnt46=0;
1889 _loop46:
1890 do {
1891 if (_t==null) _t=ASTNULL;
1892 if ((_tokenSet_1.member(_t.getType()))) {
1894 _t = _retTree;
1895 if ( inputState.guessing==0 ) {
1896 print( ";" );
1897 }
1898 }
1899 else {
1900 if ( _cnt46>=1 ) { break _loop46; } else {throw new NoViableAltException(_t);}
1901 }
1902
1903 _cnt46++;
1904 } while (true);
1905 }
1906 }
1907 catch (RecognitionException ex) {
1908 if (inputState.guessing==0) {
1909 reportError(ex);
1910 if (_t!=null) {_t = _t.getNextSibling();}
1911 } else {
1912 throw ex;
1913 }
1914 }
1915 _retTree = _t;
1916 }
1917
1918 public final void structDeclaration(AST _t) throws RecognitionException {
1919
1920 TNode structDeclaration_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
1921
1922 try { // for error handling
1924 _t = _retTree;
1926 _t = _retTree;
1927 }
1928 catch (RecognitionException ex) {
1929 if (inputState.guessing==0) {
1930 reportError(ex);
1931 if (_t!=null) {_t = _t.getNextSibling();}
1932 } else {
1933 throw ex;
1934 }
1935 }
1936 _retTree = _t;
1937 }
1938
1939 public final void specifierQualifierList(AST _t) throws RecognitionException {
1940
1941 TNode specifierQualifierList_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
1942
1943 try { // for error handling
1944 {
1945 int _cnt50=0;
1946 _loop50:
1947 do {
1948 if (_t==null) _t=ASTNULL;
1949 switch ( _t.getType()) {
1950 case LITERAL_struct:
1951 case LITERAL_union:
1952 case LITERAL_enum:
1953 case LITERAL_void:
1954 case LITERAL_char:
1955 case LITERAL_short:
1956 case LITERAL_int:
1957 case LITERAL_long:
1958 case LITERAL_float:
1959 case LITERAL_double:
1960 case LITERAL_signed:
1961 case LITERAL_unsigned:
1962 case NTypedefName:
1963 case LITERAL_typeof:
1964 case LITERAL___complex:
1965 {
1966 typeSpecifier(_t);
1967 _t = _retTree;
1968 break;
1969 }
1970 case LITERAL_volatile:
1971 case LITERAL_const:
1972 {
1973 typeQualifier(_t);
1974 _t = _retTree;
1975 break;
1976 }
1977 default:
1978 {
1979 if ( _cnt50>=1 ) { break _loop50; } else {throw new NoViableAltException(_t);}
1980 }
1981 }
1982 _cnt50++;
1983 } while (true);
1984 }
1985 }
1986 catch (RecognitionException ex) {
1987 if (inputState.guessing==0) {
1988 reportError(ex);
1989 if (_t!=null) {_t = _t.getNextSibling();}
1990 } else {
1991 throw ex;
1992 }
1993 }
1994 _retTree = _t;
1995 }
1996
1997 public final void structDeclaratorList(AST _t) throws RecognitionException {
1998
1999 TNode structDeclaratorList_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
2000
2001 try { // for error handling
2002 structDeclarator(_t);
2003 _t = _retTree;
2004 {
2005 _loop53:
2006 do {
2007 if (_t==null) _t=ASTNULL;
2008 if ((_t.getType()==NStructDeclarator)) {
2009 if ( inputState.guessing==0 ) {
2010 print(",");
2011 }
2012 structDeclarator(_t);
2013 _t = _retTree;
2014 }
2015 else {
2016 break _loop53;
2017 }
2018
2019 } while (true);
2020 }
2021 }
2022 catch (RecognitionException ex) {
2023 if (inputState.guessing==0) {
2024 reportError(ex);
2025 if (_t!=null) {_t = _t.getNextSibling();}
2026 } else {
2027 throw ex;
2028 }
2029 }
2030 _retTree = _t;
2031 }
2032
2033 public final void structDeclarator(AST _t) throws RecognitionException {
2034
2035 TNode structDeclarator_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
2036 TNode c = null;
2037
2038 try { // for error handling
2039 AST __t55 = _t;
2040 TNode tmp7_AST_in = (TNode)_t;
2042 _t = _t.getFirstChild();
2043 {
2044 if (_t==null) _t=ASTNULL;
2045 switch ( _t.getType()) {
2046 case NDeclarator:
2047 {
2048 declarator(_t);
2049 _t = _retTree;
2050 break;
2051 }
2052 case 3:
2053 case COLON:
2054 case NAsmAttribute:
2056 {
2057 break;
2058 }
2059 default:
2060 {
2061 throw new NoViableAltException(_t);
2062 }
2063 }
2064 }
2065 {
2066 if (_t==null) _t=ASTNULL;
2067 switch ( _t.getType()) {
2068 case COLON:
2069 {
2070 c = (TNode)_t;
2071 match(_t,COLON);
2072 _t = _t.getNextSibling();
2073 if ( inputState.guessing==0 ) {
2074 print( c );
2075 }
2076 expr(_t);
2077 _t = _retTree;
2078 break;
2079 }
2080 case 3:
2081 case NAsmAttribute:
2083 {
2084 break;
2085 }
2086 default:
2087 {
2088 throw new NoViableAltException(_t);
2089 }
2090 }
2091 }
2092 {
2093 _loop59:
2094 do {
2095 if (_t==null) _t=ASTNULL;
2096 if ((_t.getType()==NAsmAttribute||_t.getType()==LITERAL___attribute)) {
2097 attributeDecl(_t);
2098 _t = _retTree;
2099 }
2100 else {
2101 break _loop59;
2102 }
2103
2104 } while (true);
2105 }
2106 _t = __t55;
2107 _t = _t.getNextSibling();
2108 }
2109 catch (RecognitionException ex) {
2110 if (inputState.guessing==0) {
2111 reportError(ex);
2112 if (_t!=null) {_t = _t.getNextSibling();}
2113 } else {
2114 throw ex;
2115 }
2116 }
2117 _retTree = _t;
2118 }
2119
2120 public final void declarator(AST _t) throws RecognitionException {
2121
2122 TNode declarator_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
2123 TNode id = null;
2124 TNode lp = null;
2125 TNode rp = null;
2126 TNode n = null;
2127 TNode r = null;
2128 TNode lb = null;
2129 TNode rb = null;
2130
2131 try { // for error handling
2132 AST __t105 = _t;
2133 TNode tmp8_AST_in = (TNode)_t;
2134 match(_t,NDeclarator);
2135 _t = _t.getFirstChild();
2136 {
2137 if (_t==null) _t=ASTNULL;
2138 switch ( _t.getType()) {
2139 case NPointerGroup:
2140 {
2141 pointerGroup(_t);
2142 _t = _retTree;
2143 break;
2144 }
2145 case ID:
2146 case LPAREN:
2147 {
2148 break;
2149 }
2150 default:
2151 {
2152 throw new NoViableAltException(_t);
2153 }
2154 }
2155 }
2156 {
2157 if (_t==null) _t=ASTNULL;
2158 switch ( _t.getType()) {
2159 case ID:
2160 {
2161 id = (TNode)_t;
2162 match(_t,ID);
2163 _t = _t.getNextSibling();
2164 if ( inputState.guessing==0 ) {
2165 print( id );
2166 }
2167 break;
2168 }
2169 case LPAREN:
2170 {
2171 lp = (TNode)_t;
2172 match(_t,LPAREN);
2173 _t = _t.getNextSibling();
2174 if ( inputState.guessing==0 ) {
2175 print( lp );
2176 }
2177 declarator(_t);
2178 _t = _retTree;
2179 rp = (TNode)_t;
2180 match(_t,RPAREN);
2181 _t = _t.getNextSibling();
2182 if ( inputState.guessing==0 ) {
2183 print( rp );
2184 }
2185 break;
2186 }
2187 default:
2188 {
2189 throw new NoViableAltException(_t);
2190 }
2191 }
2192 }
2193 {
2194 _loop113:
2195 do {
2196 if (_t==null) _t=ASTNULL;
2197 switch ( _t.getType()) {
2198 case NParameterTypeList:
2199 {
2200 AST __t109 = _t;
2201 n = _t==ASTNULL ? null :(TNode)_t;
2203 _t = _t.getFirstChild();
2204 if ( inputState.guessing==0 ) {
2205 print( n );
2206 }
2207 {
2208 if (_t==null) _t=ASTNULL;
2209 switch ( _t.getType()) {
2211 {
2213 _t = _retTree;
2214 break;
2215 }
2216 case ID:
2217 case RPAREN:
2218 {
2219 {
2220 if (_t==null) _t=ASTNULL;
2221 switch ( _t.getType()) {
2222 case ID:
2223 {
2224 idList(_t);
2225 _t = _retTree;
2226 break;
2227 }
2228 case RPAREN:
2229 {
2230 break;
2231 }
2232 default:
2233 {
2234 throw new NoViableAltException(_t);
2235 }
2236 }
2237 }
2238 break;
2239 }
2240 default:
2241 {
2242 throw new NoViableAltException(_t);
2243 }
2244 }
2245 }
2246 r = (TNode)_t;
2247 match(_t,RPAREN);
2248 _t = _t.getNextSibling();
2249 if ( inputState.guessing==0 ) {
2250 print( r );
2251 }
2252 _t = __t109;
2253 _t = _t.getNextSibling();
2254 break;
2255 }
2256 case LBRACKET:
2257 {
2258 lb = (TNode)_t;
2259 match(_t,LBRACKET);
2260 _t = _t.getNextSibling();
2261 if ( inputState.guessing==0 ) {
2262 print( lb );
2263 }
2264 {
2265 if (_t==null) _t=ASTNULL;
2266 switch ( _t.getType()) {
2267 case ID:
2268 case ASSIGN:
2269 case STAR:
2270 case LPAREN:
2271 case DIV_ASSIGN:
2272 case PLUS_ASSIGN:
2273 case MINUS_ASSIGN:
2274 case STAR_ASSIGN:
2275 case MOD_ASSIGN:
2276 case RSHIFT_ASSIGN:
2277 case LSHIFT_ASSIGN:
2278 case BAND_ASSIGN:
2279 case BOR_ASSIGN:
2280 case BXOR_ASSIGN:
2281 case QUESTION:
2282 case LOR:
2283 case LAND:
2284 case BOR:
2285 case BXOR:
2286 case BAND:
2287 case EQUAL:
2288 case NOT_EQUAL:
2289 case LT:
2290 case LTE:
2291 case GT:
2292 case GTE:
2293 case LSHIFT:
2294 case RSHIFT:
2295 case PLUS:
2296 case MINUS:
2297 case DIV:
2298 case MOD:
2299 case INC:
2300 case DEC:
2301 case LITERAL_sizeof:
2302 case CharLiteral:
2303 case NCast:
2304 case NExpressionGroup:
2305 case NInitializer:
2306 case NEmptyExpression:
2307 case NCommaExpr:
2308 case NUnaryExpr:
2309 case NPostfixExpr:
2310 case NRangeExpr:
2311 case NStringSeq:
2312 case NLcurlyInitializer:
2313 case NGnuAsmExpr:
2314 case Number:
2315 case LITERAL___alignof:
2316 {
2317 expr(_t);
2318 _t = _retTree;
2319 break;
2320 }
2321 case RBRACKET:
2322 {
2323 break;
2324 }
2325 default:
2326 {
2327 throw new NoViableAltException(_t);
2328 }
2329 }
2330 }
2331 rb = (TNode)_t;
2332 match(_t,RBRACKET);
2333 _t = _t.getNextSibling();
2334 if ( inputState.guessing==0 ) {
2335 print( rb );
2336 }
2337 break;
2338 }
2339 default:
2340 {
2341 break _loop113;
2342 }
2343 }
2344 } while (true);
2345 }
2346 _t = __t105;
2347 _t = _t.getNextSibling();
2348 }
2349 catch (RecognitionException ex) {
2350 if (inputState.guessing==0) {
2351 reportError(ex);
2352 if (_t!=null) {_t = _t.getNextSibling();}
2353 } else {
2354 throw ex;
2355 }
2356 }
2357 _retTree = _t;
2358 }
2359
2360 public final void enumList(AST _t) throws RecognitionException {
2361
2362 TNode enumList_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
2363
2364 try { // for error handling
2365 enumerator(_t);
2366 _t = _retTree;
2367 {
2368 _loop66:
2369 do {
2370 if (_t==null) _t=ASTNULL;
2371 if ((_t.getType()==ID)) {
2372 if ( inputState.guessing==0 ) {
2373 print(",");
2374 }
2375 enumerator(_t);
2376 _t = _retTree;
2377 }
2378 else {
2379 break _loop66;
2380 }
2381
2382 } while (true);
2383 }
2384 }
2385 catch (RecognitionException ex) {
2386 if (inputState.guessing==0) {
2387 reportError(ex);
2388 if (_t!=null) {_t = _t.getNextSibling();}
2389 } else {
2390 throw ex;
2391 }
2392 }
2393 _retTree = _t;
2394 }
2395
2396 public final void enumerator(AST _t) throws RecognitionException {
2397
2398 TNode enumerator_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
2399 TNode i = null;
2400 TNode b = null;
2401
2402 try { // for error handling
2403 i = (TNode)_t;
2404 match(_t,ID);
2405 _t = _t.getNextSibling();
2406 if ( inputState.guessing==0 ) {
2407 print( i );
2408 }
2409 {
2410 if (_t==null) _t=ASTNULL;
2411 switch ( _t.getType()) {
2412 case ASSIGN:
2413 {
2414 b = (TNode)_t;
2415 match(_t,ASSIGN);
2416 _t = _t.getNextSibling();
2417 if ( inputState.guessing==0 ) {
2418 print( b );
2419 }
2420 expr(_t);
2421 _t = _retTree;
2422 break;
2423 }
2424 case RCURLY:
2425 case ID:
2426 {
2427 break;
2428 }
2429 default:
2430 {
2431 throw new NoViableAltException(_t);
2432 }
2433 }
2434 }
2435 }
2436 catch (RecognitionException ex) {
2437 if (inputState.guessing==0) {
2438 reportError(ex);
2439 if (_t!=null) {_t = _t.getNextSibling();}
2440 } else {
2441 throw ex;
2442 }
2443 }
2444 _retTree = _t;
2445 }
2446
2447 public final void initDecl(AST _t) throws RecognitionException {
2448
2449 TNode initDecl_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
2450 TNode a = null;
2451 TNode b = null;
2452 String declName = "";
2453
2454 try { // for error handling
2455 AST __t78 = _t;
2456 TNode tmp9_AST_in = (TNode)_t;
2457 match(_t,NInitDecl);
2458 _t = _t.getFirstChild();
2459 declarator(_t);
2460 _t = _retTree;
2461 {
2462 _loop80:
2463 do {
2464 if (_t==null) _t=ASTNULL;
2465 if ((_t.getType()==NAsmAttribute||_t.getType()==LITERAL___attribute)) {
2466 attributeDecl(_t);
2467 _t = _retTree;
2468 }
2469 else {
2470 break _loop80;
2471 }
2472
2473 } while (true);
2474 }
2475 {
2476 if (_t==null) _t=ASTNULL;
2477 switch ( _t.getType()) {
2478 case ASSIGN:
2479 {
2480 a = (TNode)_t;
2481 match(_t,ASSIGN);
2482 _t = _t.getNextSibling();
2483 if ( inputState.guessing==0 ) {
2484 print( a );
2485 }
2486 initializer(_t);
2487 _t = _retTree;
2488 break;
2489 }
2490 case COLON:
2491 {
2492 b = (TNode)_t;
2493 match(_t,COLON);
2494 _t = _t.getNextSibling();
2495 if ( inputState.guessing==0 ) {
2496 print( b );
2497 }
2498 expr(_t);
2499 _t = _retTree;
2500 break;
2501 }
2502 case 3:
2503 {
2504 break;
2505 }
2506 default:
2507 {
2508 throw new NoViableAltException(_t);
2509 }
2510 }
2511 }
2512 _t = __t78;
2513 _t = _t.getNextSibling();
2514 }
2515 catch (RecognitionException ex) {
2516 if (inputState.guessing==0) {
2517 reportError(ex);
2518 if (_t!=null) {_t = _t.getNextSibling();}
2519 } else {
2520 throw ex;
2521 }
2522 }
2523 _retTree = _t;
2524 }
2525
2526 public final void initializer(AST _t) throws RecognitionException {
2527
2528 TNode initializer_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
2529
2530 try { // for error handling
2531 if (_t==null) _t=ASTNULL;
2532 switch ( _t.getType()) {
2533 case NInitializer:
2534 {
2535 AST __t92 = _t;
2536 TNode tmp10_AST_in = (TNode)_t;
2537 match(_t,NInitializer);
2538 _t = _t.getFirstChild();
2539 {
2540 if (_t==null) _t=ASTNULL;
2541 switch ( _t.getType()) {
2543 {
2545 _t = _retTree;
2546 break;
2547 }
2548 case ID:
2549 case ASSIGN:
2550 case STAR:
2551 case LPAREN:
2552 case DIV_ASSIGN:
2553 case PLUS_ASSIGN:
2554 case MINUS_ASSIGN:
2555 case STAR_ASSIGN:
2556 case MOD_ASSIGN:
2557 case RSHIFT_ASSIGN:
2558 case LSHIFT_ASSIGN:
2559 case BAND_ASSIGN:
2560 case BOR_ASSIGN:
2561 case BXOR_ASSIGN:
2562 case QUESTION:
2563 case LOR:
2564 case LAND:
2565 case BOR:
2566 case BXOR:
2567 case BAND:
2568 case EQUAL:
2569 case NOT_EQUAL:
2570 case LT:
2571 case LTE:
2572 case GT:
2573 case GTE:
2574 case LSHIFT:
2575 case RSHIFT:
2576 case PLUS:
2577 case MINUS:
2578 case DIV:
2579 case MOD:
2580 case INC:
2581 case DEC:
2582 case LITERAL_sizeof:
2583 case CharLiteral:
2584 case NCast:
2585 case NExpressionGroup:
2586 case NInitializer:
2587 case NEmptyExpression:
2588 case NCommaExpr:
2589 case NUnaryExpr:
2590 case NPostfixExpr:
2591 case NRangeExpr:
2592 case NStringSeq:
2593 case NLcurlyInitializer:
2594 case NGnuAsmExpr:
2595 case Number:
2596 case LITERAL___alignof:
2597 {
2598 break;
2599 }
2600 default:
2601 {
2602 throw new NoViableAltException(_t);
2603 }
2604 }
2605 }
2606 expr(_t);
2607 _t = _retTree;
2608 _t = __t92;
2609 _t = _t.getNextSibling();
2610 break;
2611 }
2612 case NLcurlyInitializer:
2613 {
2615 _t = _retTree;
2616 break;
2617 }
2618 default:
2619 {
2620 throw new NoViableAltException(_t);
2621 }
2622 }
2623 }
2624 catch (RecognitionException ex) {
2625 if (inputState.guessing==0) {
2626 reportError(ex);
2627 if (_t!=null) {_t = _t.getNextSibling();}
2628 } else {
2629 throw ex;
2630 }
2631 }
2632 _retTree = _t;
2633 }
2634
2635 public final void pointerGroup(AST _t) throws RecognitionException {
2636
2637 TNode pointerGroup_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
2638 TNode a = null;
2639
2640 try { // for error handling
2641 AST __t83 = _t;
2642 TNode tmp11_AST_in = (TNode)_t;
2643 match(_t,NPointerGroup);
2644 _t = _t.getFirstChild();
2645 {
2646 int _cnt87=0;
2647 _loop87:
2648 do {
2649 if (_t==null) _t=ASTNULL;
2650 if ((_t.getType()==STAR)) {
2651 a = (TNode)_t;
2652 match(_t,STAR);
2653 _t = _t.getNextSibling();
2654 if ( inputState.guessing==0 ) {
2655 print( a );
2656 }
2657 {
2658 _loop86:
2659 do {
2660 if (_t==null) _t=ASTNULL;
2661 if ((_t.getType()==LITERAL_volatile||_t.getType()==LITERAL_const)) {
2662 typeQualifier(_t);
2663 _t = _retTree;
2664 }
2665 else {
2666 break _loop86;
2667 }
2668
2669 } while (true);
2670 }
2671 }
2672 else {
2673 if ( _cnt87>=1 ) { break _loop87; } else {throw new NoViableAltException(_t);}
2674 }
2675
2676 _cnt87++;
2677 } while (true);
2678 }
2679 _t = __t83;
2680 _t = _t.getNextSibling();
2681 }
2682 catch (RecognitionException ex) {
2683 if (inputState.guessing==0) {
2684 reportError(ex);
2685 if (_t!=null) {_t = _t.getNextSibling();}
2686 } else {
2687 throw ex;
2688 }
2689 }
2690 _retTree = _t;
2691 }
2692
2693 public final void idList(AST _t) throws RecognitionException {
2694
2695 TNode idList_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
2696 TNode i = null;
2697 TNode c = null;
2698 TNode id = null;
2699
2700 try { // for error handling
2701 i = (TNode)_t;
2702 match(_t,ID);
2703 _t = _t.getNextSibling();
2704 if ( inputState.guessing==0 ) {
2705 print( i );
2706 }
2707 {
2708 _loop90:
2709 do {
2710 if (_t==null) _t=ASTNULL;
2711 if ((_t.getType()==COMMA)) {
2712 c = (TNode)_t;
2713 match(_t,COMMA);
2714 _t = _t.getNextSibling();
2715 if ( inputState.guessing==0 ) {
2716 print( c );
2717 }
2718 id = (TNode)_t;
2719 match(_t,ID);
2720 _t = _t.getNextSibling();
2721 if ( inputState.guessing==0 ) {
2722 print( id );
2723 }
2724 }
2725 else {
2726 break _loop90;
2727 }
2728
2729 } while (true);
2730 }
2731 }
2732 catch (RecognitionException ex) {
2733 if (inputState.guessing==0) {
2734 reportError(ex);
2735 if (_t!=null) {_t = _t.getNextSibling();}
2736 } else {
2737 throw ex;
2738 }
2739 }
2740 _retTree = _t;
2741 }
2742
2743 public final void initializerElementLabel(AST _t) throws RecognitionException {
2744
2745 TNode initializerElementLabel_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
2746 TNode l = null;
2747 TNode r = null;
2748 TNode a1 = null;
2749 TNode i1 = null;
2750 TNode c = null;
2751 TNode d = null;
2752 TNode i2 = null;
2753 TNode a2 = null;
2754
2755 try { // for error handling
2756 AST __t95 = _t;
2757 TNode tmp12_AST_in = (TNode)_t;
2759 _t = _t.getFirstChild();
2760 {
2761 if (_t==null) _t=ASTNULL;
2762 switch ( _t.getType()) {
2763 case LBRACKET:
2764 {
2765 {
2766 l = (TNode)_t;
2767 match(_t,LBRACKET);
2768 _t = _t.getNextSibling();
2769 if ( inputState.guessing==0 ) {
2770 print( l );
2771 }
2772 expr(_t);
2773 _t = _retTree;
2774 r = (TNode)_t;
2775 match(_t,RBRACKET);
2776 _t = _t.getNextSibling();
2777 if ( inputState.guessing==0 ) {
2778 print( r );
2779 }
2780 {
2781 if (_t==null) _t=ASTNULL;
2782 switch ( _t.getType()) {
2783 case ASSIGN:
2784 {
2785 a1 = (TNode)_t;
2786 match(_t,ASSIGN);
2787 _t = _t.getNextSibling();
2788 if ( inputState.guessing==0 ) {
2789 print( a1 );
2790 }
2791 break;
2792 }
2793 case 3:
2794 {
2795 break;
2796 }
2797 default:
2798 {
2799 throw new NoViableAltException(_t);
2800 }
2801 }
2802 }
2803 }
2804 break;
2805 }
2806 case ID:
2807 {
2808 i1 = (TNode)_t;
2809 match(_t,ID);
2810 _t = _t.getNextSibling();
2811 c = (TNode)_t;
2812 match(_t,COLON);
2813 _t = _t.getNextSibling();
2814 if ( inputState.guessing==0 ) {
2815 print( i1 ); print( c );
2816 }
2817 break;
2818 }
2819 case DOT:
2820 {
2821 d = (TNode)_t;
2822 match(_t,DOT);
2823 _t = _t.getNextSibling();
2824 i2 = (TNode)_t;
2825 match(_t,ID);
2826 _t = _t.getNextSibling();
2827 a2 = (TNode)_t;
2828 match(_t,ASSIGN);
2829 _t = _t.getNextSibling();
2830 if ( inputState.guessing==0 ) {
2831 print( d ); print( i2 ); print( a2 );
2832 }
2833 break;
2834 }
2835 default:
2836 {
2837 throw new NoViableAltException(_t);
2838 }
2839 }
2840 }
2841 _t = __t95;
2842 _t = _t.getNextSibling();
2843 }
2844 catch (RecognitionException ex) {
2845 if (inputState.guessing==0) {
2846 reportError(ex);
2847 if (_t!=null) {_t = _t.getNextSibling();}
2848 } else {
2849 throw ex;
2850 }
2851 }
2852 _retTree = _t;
2853 }
2854
2855 public final void lcurlyInitializer(AST _t) throws RecognitionException {
2856
2857 TNode lcurlyInitializer_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
2858 TNode n = null;
2859 TNode rc = null;
2860
2861 try { // for error handling
2862 AST __t100 = _t;
2863 n = _t==ASTNULL ? null :(TNode)_t;
2865 _t = _t.getFirstChild();
2866 if ( inputState.guessing==0 ) {
2867 print( n ); tabs++;
2868 }
2869 initializerList(_t);
2870 _t = _retTree;
2871 rc = (TNode)_t;
2872 match(_t,RCURLY);
2873 _t = _t.getNextSibling();
2874 if ( inputState.guessing==0 ) {
2875 tabs--; print( rc );
2876 }
2877 _t = __t100;
2878 _t = _t.getNextSibling();
2879 }
2880 catch (RecognitionException ex) {
2881 if (inputState.guessing==0) {
2882 reportError(ex);
2883 if (_t!=null) {_t = _t.getNextSibling();}
2884 } else {
2885 throw ex;
2886 }
2887 }
2888 _retTree = _t;
2889 }
2890
2891 public final void initializerList(AST _t) throws RecognitionException {
2892
2893 TNode initializerList_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
2894 TNode i = null;
2895
2896 try { // for error handling
2897 {
2898 _loop103:
2899 do {
2900 if (_t==null) _t=ASTNULL;
2901 if ((_t.getType()==NInitializer||_t.getType()==NLcurlyInitializer)) {
2902 i = _t==ASTNULL ? null : (TNode)_t;
2903 initializer(_t);
2904 _t = _retTree;
2905 if ( inputState.guessing==0 ) {
2906 commaSep( i );
2907 }
2908 }
2909 else {
2910 break _loop103;
2911 }
2912
2913 } while (true);
2914 }
2915 }
2916 catch (RecognitionException ex) {
2917 if (inputState.guessing==0) {
2918 reportError(ex);
2919 if (_t!=null) {_t = _t.getNextSibling();}
2920 } else {
2921 throw ex;
2922 }
2923 }
2924 _retTree = _t;
2925 }
2926
2927 public final void parameterTypeList(AST _t) throws RecognitionException {
2928
2929 TNode parameterTypeList_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
2930 TNode c = null;
2931 TNode s = null;
2932 TNode v = null;
2933
2934 try { // for error handling
2935 {
2936 int _cnt117=0;
2937 _loop117:
2938 do {
2939 if (_t==null) _t=ASTNULL;
2940 if ((_t.getType()==NParameterDeclaration)) {
2942 _t = _retTree;
2943 {
2944 if (_t==null) _t=ASTNULL;
2945 switch ( _t.getType()) {
2946 case COMMA:
2947 {
2948 c = (TNode)_t;
2949 match(_t,COMMA);
2950 _t = _t.getNextSibling();
2951 if ( inputState.guessing==0 ) {
2952 print( c );
2953 }
2954 break;
2955 }
2956 case SEMI:
2957 {
2958 s = (TNode)_t;
2959 match(_t,SEMI);
2960 _t = _t.getNextSibling();
2961 if ( inputState.guessing==0 ) {
2962 print( s );
2963 }
2964 break;
2965 }
2966 case RPAREN:
2967 case VARARGS:
2969 {
2970 break;
2971 }
2972 default:
2973 {
2974 throw new NoViableAltException(_t);
2975 }
2976 }
2977 }
2978 }
2979 else {
2980 if ( _cnt117>=1 ) { break _loop117; } else {throw new NoViableAltException(_t);}
2981 }
2982
2983 _cnt117++;
2984 } while (true);
2985 }
2986 {
2987 if (_t==null) _t=ASTNULL;
2988 switch ( _t.getType()) {
2989 case VARARGS:
2990 {
2991 v = (TNode)_t;
2992 match(_t,VARARGS);
2993 _t = _t.getNextSibling();
2994 if ( inputState.guessing==0 ) {
2995 print( v );
2996 }
2997 break;
2998 }
2999 case RPAREN:
3000 {
3001 break;
3002 }
3003 default:
3004 {
3005 throw new NoViableAltException(_t);
3006 }
3007 }
3008 }
3009 }
3010 catch (RecognitionException ex) {
3011 if (inputState.guessing==0) {
3012 reportError(ex);
3013 if (_t!=null) {_t = _t.getNextSibling();}
3014 } else {
3015 throw ex;
3016 }
3017 }
3018 _retTree = _t;
3019 }
3020
3021 public final void parameterDeclaration(AST _t) throws RecognitionException {
3022
3023 TNode parameterDeclaration_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
3024
3025 try { // for error handling
3026 AST __t120 = _t;
3027 TNode tmp13_AST_in = (TNode)_t;
3029 _t = _t.getFirstChild();
3030 declSpecifiers(_t);
3031 _t = _retTree;
3032 {
3033 if (_t==null) _t=ASTNULL;
3034 switch ( _t.getType()) {
3035 case NDeclarator:
3036 {
3037 declarator(_t);
3038 _t = _retTree;
3039 break;
3040 }
3042 {
3044 _t = _retTree;
3045 break;
3046 }
3047 case 3:
3048 {
3049 break;
3050 }
3051 default:
3052 {
3053 throw new NoViableAltException(_t);
3054 }
3055 }
3056 }
3057 _t = __t120;
3058 _t = _t.getNextSibling();
3059 }
3060 catch (RecognitionException ex) {
3061 if (inputState.guessing==0) {
3062 reportError(ex);
3063 if (_t!=null) {_t = _t.getNextSibling();}
3064 } else {
3065 throw ex;
3066 }
3067 }
3068 _retTree = _t;
3069 }
3070
3071 public final void nonemptyAbstractDeclarator(AST _t) throws RecognitionException {
3072
3073 TNode nonemptyAbstractDeclarator_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
3074 TNode lp1 = null;
3075 TNode rp1 = null;
3076 TNode lb1 = null;
3077 TNode rb1 = null;
3078 TNode lp2 = null;
3079 TNode rp2 = null;
3080 TNode lb2 = null;
3081 TNode rb2 = null;
3082
3083 try { // for error handling
3084 AST __t195 = _t;
3085 TNode tmp14_AST_in = (TNode)_t;
3087 _t = _t.getFirstChild();
3088 {
3089 if (_t==null) _t=ASTNULL;
3090 switch ( _t.getType()) {
3091 case NPointerGroup:
3092 {
3093 pointerGroup(_t);
3094 _t = _retTree;
3095 {
3096 _loop202:
3097 do {
3098 if (_t==null) _t=ASTNULL;
3099 switch ( _t.getType()) {
3100 case LPAREN:
3101 {
3102 {
3103 lp1 = (TNode)_t;
3104 match(_t,LPAREN);
3105 _t = _t.getNextSibling();
3106 if ( inputState.guessing==0 ) {
3107 print( lp1 );
3108 }
3109 {
3110 if (_t==null) _t=ASTNULL;
3111 switch ( _t.getType()) {
3113 {
3115 _t = _retTree;
3116 break;
3117 }
3119 {
3121 _t = _retTree;
3122 break;
3123 }
3124 case RPAREN:
3125 {
3126 break;
3127 }
3128 default:
3129 {
3130 throw new NoViableAltException(_t);
3131 }
3132 }
3133 }
3134 rp1 = (TNode)_t;
3135 match(_t,RPAREN);
3136 _t = _t.getNextSibling();
3137 if ( inputState.guessing==0 ) {
3138 print( rp1 );
3139 }
3140 }
3141 break;
3142 }
3143 case LBRACKET:
3144 {
3145 {
3146 lb1 = (TNode)_t;
3147 match(_t,LBRACKET);
3148 _t = _t.getNextSibling();
3149 if ( inputState.guessing==0 ) {
3150 print( lb1 );
3151 }
3152 {
3153 if (_t==null) _t=ASTNULL;
3154 switch ( _t.getType()) {
3155 case ID:
3156 case ASSIGN:
3157 case STAR:
3158 case LPAREN:
3159 case DIV_ASSIGN:
3160 case PLUS_ASSIGN:
3161 case MINUS_ASSIGN:
3162 case STAR_ASSIGN:
3163 case MOD_ASSIGN:
3164 case RSHIFT_ASSIGN:
3165 case LSHIFT_ASSIGN:
3166 case BAND_ASSIGN:
3167 case BOR_ASSIGN:
3168 case BXOR_ASSIGN:
3169 case QUESTION:
3170 case LOR:
3171 case LAND:
3172 case BOR:
3173 case BXOR:
3174 case BAND:
3175 case EQUAL:
3176 case NOT_EQUAL:
3177 case LT:
3178 case LTE:
3179 case GT:
3180 case GTE:
3181 case LSHIFT:
3182 case RSHIFT:
3183 case PLUS:
3184 case MINUS:
3185 case DIV:
3186 case MOD:
3187 case INC:
3188 case DEC:
3189 case LITERAL_sizeof:
3190 case CharLiteral:
3191 case NCast:
3192 case NExpressionGroup:
3193 case NInitializer:
3194 case NEmptyExpression:
3195 case NCommaExpr:
3196 case NUnaryExpr:
3197 case NPostfixExpr:
3198 case NRangeExpr:
3199 case NStringSeq:
3200 case NLcurlyInitializer:
3201 case NGnuAsmExpr:
3202 case Number:
3203 case LITERAL___alignof:
3204 {
3205 expr(_t);
3206 _t = _retTree;
3207 break;
3208 }
3209 case RBRACKET:
3210 {
3211 break;
3212 }
3213 default:
3214 {
3215 throw new NoViableAltException(_t);
3216 }
3217 }
3218 }
3219 rb1 = (TNode)_t;
3220 match(_t,RBRACKET);
3221 _t = _t.getNextSibling();
3222 if ( inputState.guessing==0 ) {
3223 print( rb1 );
3224 }
3225 }
3226 break;
3227 }
3228 default:
3229 {
3230 break _loop202;
3231 }
3232 }
3233 } while (true);
3234 }
3235 break;
3236 }
3237 case LPAREN:
3238 case LBRACKET:
3239 {
3240 {
3241 int _cnt208=0;
3242 _loop208:
3243 do {
3244 if (_t==null) _t=ASTNULL;
3245 switch ( _t.getType()) {
3246 case LPAREN:
3247 {
3248 {
3249 lp2 = (TNode)_t;
3250 match(_t,LPAREN);
3251 _t = _t.getNextSibling();
3252 if ( inputState.guessing==0 ) {
3253 print( lp2 );
3254 }
3255 {
3256 if (_t==null) _t=ASTNULL;
3257 switch ( _t.getType()) {
3259 {
3261 _t = _retTree;
3262 break;
3263 }
3265 {
3267 _t = _retTree;
3268 break;
3269 }
3270 case RPAREN:
3271 {
3272 break;
3273 }
3274 default:
3275 {
3276 throw new NoViableAltException(_t);
3277 }
3278 }
3279 }
3280 rp2 = (TNode)_t;
3281 match(_t,RPAREN);
3282 _t = _t.getNextSibling();
3283 if ( inputState.guessing==0 ) {
3284 print( rp2 );
3285 }
3286 }
3287 break;
3288 }
3289 case LBRACKET:
3290 {
3291 {
3292 lb2 = (TNode)_t;
3293 match(_t,LBRACKET);
3294 _t = _t.getNextSibling();
3295 if ( inputState.guessing==0 ) {
3296 print( lb2 );
3297 }
3298 {
3299 if (_t==null) _t=ASTNULL;
3300 switch ( _t.getType()) {
3301 case ID:
3302 case ASSIGN:
3303 case STAR:
3304 case LPAREN:
3305 case DIV_ASSIGN:
3306 case PLUS_ASSIGN:
3307 case MINUS_ASSIGN:
3308 case STAR_ASSIGN:
3309 case MOD_ASSIGN:
3310 case RSHIFT_ASSIGN:
3311 case LSHIFT_ASSIGN:
3312 case BAND_ASSIGN:
3313 case BOR_ASSIGN:
3314 case BXOR_ASSIGN:
3315 case QUESTION:
3316 case LOR:
3317 case LAND:
3318 case BOR:
3319 case BXOR:
3320 case BAND:
3321 case EQUAL:
3322 case NOT_EQUAL:
3323 case LT:
3324 case LTE:
3325 case GT:
3326 case GTE:
3327 case LSHIFT:
3328 case RSHIFT:
3329 case PLUS:
3330 case MINUS:
3331 case DIV:
3332 case MOD:
3333 case INC:
3334 case DEC:
3335 case LITERAL_sizeof:
3336 case CharLiteral:
3337 case NCast:
3338 case NExpressionGroup:
3339 case NInitializer:
3340 case NEmptyExpression:
3341 case NCommaExpr:
3342 case NUnaryExpr:
3343 case NPostfixExpr:
3344 case NRangeExpr:
3345 case NStringSeq:
3346 case NLcurlyInitializer:
3347 case NGnuAsmExpr:
3348 case Number:
3349 case LITERAL___alignof:
3350 {
3351 expr(_t);
3352 _t = _retTree;
3353 break;
3354 }
3355 case RBRACKET:
3356 {
3357 break;
3358 }
3359 default:
3360 {
3361 throw new NoViableAltException(_t);
3362 }
3363 }
3364 }
3365 rb2 = (TNode)_t;
3366 match(_t,RBRACKET);
3367 _t = _t.getNextSibling();
3368 if ( inputState.guessing==0 ) {
3369 print( rb2 );
3370 }
3371 }
3372 break;
3373 }
3374 default:
3375 {
3376 if ( _cnt208>=1 ) { break _loop208; } else {throw new NoViableAltException(_t);}
3377 }
3378 }
3379 _cnt208++;
3380 } while (true);
3381 }
3382 break;
3383 }
3384 default:
3385 {
3386 throw new NoViableAltException(_t);
3387 }
3388 }
3389 }
3390 _t = __t195;
3391 _t = _t.getNextSibling();
3392 }
3393 catch (RecognitionException ex) {
3394 if (inputState.guessing==0) {
3395 reportError(ex);
3396 if (_t!=null) {_t = _t.getNextSibling();}
3397 } else {
3398 throw ex;
3399 }
3400 }
3401 _retTree = _t;
3402 }
3403
3404 public final void functionDeclSpecifiers(AST _t) throws RecognitionException {
3405
3406 TNode functionDeclSpecifiers_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
3407
3408 try { // for error handling
3409 {
3410 int _cnt129=0;
3411 _loop129:
3412 do {
3413 if (_t==null) _t=ASTNULL;
3414 switch ( _t.getType()) {
3415 case LITERAL_extern:
3416 case LITERAL_static:
3417 case LITERAL_inline:
3418 {
3420 _t = _retTree;
3421 break;
3422 }
3423 case LITERAL_volatile:
3424 case LITERAL_const:
3425 {
3426 typeQualifier(_t);
3427 _t = _retTree;
3428 break;
3429 }
3430 case LITERAL_struct:
3431 case LITERAL_union:
3432 case LITERAL_enum:
3433 case LITERAL_void:
3434 case LITERAL_char:
3435 case LITERAL_short:
3436 case LITERAL_int:
3437 case LITERAL_long:
3438 case LITERAL_float:
3439 case LITERAL_double:
3440 case LITERAL_signed:
3441 case LITERAL_unsigned:
3442 case NTypedefName:
3443 case LITERAL_typeof:
3444 case LITERAL___complex:
3445 {
3446 typeSpecifier(_t);
3447 _t = _retTree;
3448 break;
3449 }
3450 default:
3451 {
3452 if ( _cnt129>=1 ) { break _loop129; } else {throw new NoViableAltException(_t);}
3453 }
3454 }
3455 _cnt129++;
3456 } while (true);
3457 }
3458 }
3459 catch (RecognitionException ex) {
3460 if (inputState.guessing==0) {
3461 reportError(ex);
3462 if (_t!=null) {_t = _t.getNextSibling();}
3463 } else {
3464 throw ex;
3465 }
3466 }
3467 _retTree = _t;
3468 }
3469
3470 public final void compoundStatement(AST _t) throws RecognitionException {
3471
3472 TNode compoundStatement_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
3473 TNode cs = null;
3474 TNode rc = null;
3475
3476 try { // for error handling
3477 AST __t138 = _t;
3478 cs = _t==ASTNULL ? null :(TNode)_t;
3480 _t = _t.getFirstChild();
3481 if ( inputState.guessing==0 ) {
3482 print( cs ); tabs++;
3483 }
3484 {
3485 _loop140:
3486 do {
3487 if (_t==null) _t=ASTNULL;
3488 switch ( _t.getType()) {
3489 case NDeclaration:
3490 case LITERAL___label__:
3491 {
3492 declarationList(_t);
3493 _t = _retTree;
3494 break;
3495 }
3496 case NFunctionDef:
3497 {
3498 functionDef(_t);
3499 _t = _retTree;
3500 break;
3501 }
3502 default:
3503 {
3504 break _loop140;
3505 }
3506 }
3507 } while (true);
3508 }
3509 {
3510 if (_t==null) _t=ASTNULL;
3511 switch ( _t.getType()) {
3512 case SEMI:
3513 case LITERAL_while:
3514 case LITERAL_do:
3515 case LITERAL_for:
3516 case LITERAL_goto:
3517 case LITERAL_continue:
3518 case LITERAL_break:
3519 case LITERAL_return:
3520 case LITERAL_case:
3521 case LITERAL_default:
3522 case LITERAL_if:
3523 case LITERAL_switch:
3524 case NStatementExpr:
3525 case NCompoundStatement:
3526 case NLabel:
3527 {
3528 statementList(_t);
3529 _t = _retTree;
3530 break;
3531 }
3532 case RCURLY:
3533 {
3534 break;
3535 }
3536 default:
3537 {
3538 throw new NoViableAltException(_t);
3539 }
3540 }
3541 }
3542 rc = (TNode)_t;
3543 match(_t,RCURLY);
3544 _t = _t.getNextSibling();
3545 if ( inputState.guessing==0 ) {
3546 tabs--; print( rc );
3547 }
3548 _t = __t138;
3549 _t = _t.getNextSibling();
3550 }
3551 catch (RecognitionException ex) {
3552 if (inputState.guessing==0) {
3553 reportError(ex);
3554 if (_t!=null) {_t = _t.getNextSibling();}
3555 } else {
3556 throw ex;
3557 }
3558 }
3559 _retTree = _t;
3560 }
3561
3562 public final void declarationList(AST _t) throws RecognitionException {
3563
3564 TNode declarationList_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
3565
3566 try { // for error handling
3567 {
3568 int _cnt132=0;
3569 _loop132:
3570 do {
3571 if (_t==null) _t=ASTNULL;
3572 if ((_t.getType()==LITERAL___label__)) {
3573 localLabelDecl(_t);
3574 _t = _retTree;
3575 }
3576 else if ((_t.getType()==NDeclaration)) {
3577 declaration(_t);
3578 _t = _retTree;
3579 }
3580 else {
3581 if ( _cnt132>=1 ) { break _loop132; } else {throw new NoViableAltException(_t);}
3582 }
3583
3584 _cnt132++;
3585 } while (true);
3586 }
3587 }
3588 catch (RecognitionException ex) {
3589 if (inputState.guessing==0) {
3590 reportError(ex);
3591 if (_t!=null) {_t = _t.getNextSibling();}
3592 } else {
3593 throw ex;
3594 }
3595 }
3596 _retTree = _t;
3597 }
3598
3599 public final void localLabelDecl(AST _t) throws RecognitionException {
3600
3601 TNode localLabelDecl_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
3602 TNode a = null;
3603 TNode i = null;
3604
3605 try { // for error handling
3606 AST __t134 = _t;
3607 a = _t==ASTNULL ? null :(TNode)_t;
3609 _t = _t.getFirstChild();
3610 if ( inputState.guessing==0 ) {
3611 print( a );
3612 }
3613 {
3614 int _cnt136=0;
3615 _loop136:
3616 do {
3617 if (_t==null) _t=ASTNULL;
3618 if ((_t.getType()==ID)) {
3619 i = (TNode)_t;
3620 match(_t,ID);
3621 _t = _t.getNextSibling();
3622 if ( inputState.guessing==0 ) {
3623 commaSep( i );
3624 }
3625 }
3626 else {
3627 if ( _cnt136>=1 ) { break _loop136; } else {throw new NoViableAltException(_t);}
3628 }
3629
3630 _cnt136++;
3631 } while (true);
3632 }
3633 if ( inputState.guessing==0 ) {
3634 print( ";" );
3635 }
3636 _t = __t134;
3637 _t = _t.getNextSibling();
3638 }
3639 catch (RecognitionException ex) {
3640 if (inputState.guessing==0) {
3641 reportError(ex);
3642 if (_t!=null) {_t = _t.getNextSibling();}
3643 } else {
3644 throw ex;
3645 }
3646 }
3647 _retTree = _t;
3648 }
3649
3650 public final void statementList(AST _t) throws RecognitionException {
3651
3652 TNode statementList_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
3653
3654 try { // for error handling
3655 {
3656 int _cnt144=0;
3657 _loop144:
3658 do {
3659 if (_t==null) _t=ASTNULL;
3660 if ((_tokenSet_2.member(_t.getType()))) {
3661 statement(_t);
3662 _t = _retTree;
3663 }
3664 else {
3665 if ( _cnt144>=1 ) { break _loop144; } else {throw new NoViableAltException(_t);}
3666 }
3667
3668 _cnt144++;
3669 } while (true);
3670 }
3671 }
3672 catch (RecognitionException ex) {
3673 if (inputState.guessing==0) {
3674 reportError(ex);
3675 if (_t!=null) {_t = _t.getNextSibling();}
3676 } else {
3677 throw ex;
3678 }
3679 }
3680 _retTree = _t;
3681 }
3682
3683 public final void statement(AST _t) throws RecognitionException {
3684
3685 TNode statement_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
3686
3687 try { // for error handling
3688 statementBody(_t);
3689 _t = _retTree;
3690 }
3691 catch (RecognitionException ex) {
3692 if (inputState.guessing==0) {
3693 reportError(ex);
3694 if (_t!=null) {_t = _t.getNextSibling();}
3695 } else {
3696 throw ex;
3697 }
3698 }
3699 _retTree = _t;
3700 }
3701
3702 public final void statementBody(AST _t) throws RecognitionException {
3703
3704 TNode statementBody_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
3705 TNode s = null;
3706 TNode w = null;
3707 TNode d = null;
3708 TNode f = null;
3709 TNode g = null;
3710 TNode c = null;
3711 TNode b = null;
3712 TNode r = null;
3713 TNode ni = null;
3714 TNode ca = null;
3715 TNode de = null;
3716 TNode i = null;
3717 TNode e = null;
3718 TNode sw = null;
3719
3720 try { // for error handling
3721 if (_t==null) _t=ASTNULL;
3722 switch ( _t.getType()) {
3723 case SEMI:
3724 {
3725 s = (TNode)_t;
3726 match(_t,SEMI);
3727 _t = _t.getNextSibling();
3728 if ( inputState.guessing==0 ) {
3729 print( s );
3730 }
3731 break;
3732 }
3733 case NCompoundStatement:
3734 {
3736 _t = _retTree;
3737 break;
3738 }
3739 case NStatementExpr:
3740 {
3741 AST __t147 = _t;
3742 TNode tmp15_AST_in = (TNode)_t;
3744 _t = _t.getFirstChild();
3745 expr(_t);
3746 _t = _retTree;
3747 if ( inputState.guessing==0 ) {
3748 print( ";" );
3749 }
3750 _t = __t147;
3751 _t = _t.getNextSibling();
3752 break;
3753 }
3754 case LITERAL_while:
3755 {
3756 AST __t148 = _t;
3757 w = _t==ASTNULL ? null :(TNode)_t;
3758 match(_t,LITERAL_while);
3759 _t = _t.getFirstChild();
3760 if ( inputState.guessing==0 ) {
3761 print( w ); print( "(" );
3762 }
3763 expr(_t);
3764 _t = _retTree;
3765 if ( inputState.guessing==0 ) {
3766 print( ")" );
3767 }
3768 statement(_t);
3769 _t = _retTree;
3770 _t = __t148;
3771 _t = _t.getNextSibling();
3772 break;
3773 }
3774 case LITERAL_do:
3775 {
3776 AST __t149 = _t;
3777 d = _t==ASTNULL ? null :(TNode)_t;
3778 match(_t,LITERAL_do);
3779 _t = _t.getFirstChild();
3780 if ( inputState.guessing==0 ) {
3781 print( d );
3782 }
3783 statement(_t);
3784 _t = _retTree;
3785 if ( inputState.guessing==0 ) {
3786 print( " while ( " );
3787 }
3788 expr(_t);
3789 _t = _retTree;
3790 if ( inputState.guessing==0 ) {
3791 print( " );" );
3792 }
3793 _t = __t149;
3794 _t = _t.getNextSibling();
3795 break;
3796 }
3797 case LITERAL_for:
3798 {
3799 AST __t150 = _t;
3800 f = _t==ASTNULL ? null :(TNode)_t;
3801 match(_t,LITERAL_for);
3802 _t = _t.getFirstChild();
3803 if ( inputState.guessing==0 ) {
3804 print( f ); print( "(" );
3805 }
3806 expr(_t);
3807 _t = _retTree;
3808 if ( inputState.guessing==0 ) {
3809 print( ";" );
3810 }
3811 expr(_t);
3812 _t = _retTree;
3813 if ( inputState.guessing==0 ) {
3814 print( ";" );
3815 }
3816 expr(_t);
3817 _t = _retTree;
3818 if ( inputState.guessing==0 ) {
3819 print( ")" );
3820 }
3821 statement(_t);
3822 _t = _retTree;
3823 _t = __t150;
3824 _t = _t.getNextSibling();
3825 break;
3826 }
3827 case LITERAL_goto:
3828 {
3829 AST __t151 = _t;
3830 g = _t==ASTNULL ? null :(TNode)_t;
3831 match(_t,LITERAL_goto);
3832 _t = _t.getFirstChild();
3833 if ( inputState.guessing==0 ) {
3834 print( g );
3835 }
3836 expr(_t);
3837 _t = _retTree;
3838 if ( inputState.guessing==0 ) {
3839 print( ";" );
3840 }
3841 _t = __t151;
3842 _t = _t.getNextSibling();
3843 break;
3844 }
3845 case LITERAL_continue:
3846 {
3847 c = (TNode)_t;
3849 _t = _t.getNextSibling();
3850 if ( inputState.guessing==0 ) {
3851 print( c ); print( ";" );
3852 }
3853 break;
3854 }
3855 case LITERAL_break:
3856 {
3857 b = (TNode)_t;
3858 match(_t,LITERAL_break);
3859 _t = _t.getNextSibling();
3860 if ( inputState.guessing==0 ) {
3861 print( b ); print( ";" );
3862 }
3863 break;
3864 }
3865 case LITERAL_return:
3866 {
3867 AST __t152 = _t;
3868 r = _t==ASTNULL ? null :(TNode)_t;
3870 _t = _t.getFirstChild();
3871 if ( inputState.guessing==0 ) {
3872 print( r );
3873 }
3874 {
3875 if (_t==null) _t=ASTNULL;
3876 switch ( _t.getType()) {
3877 case ID:
3878 case ASSIGN:
3879 case STAR:
3880 case LPAREN:
3881 case DIV_ASSIGN:
3882 case PLUS_ASSIGN:
3883 case MINUS_ASSIGN:
3884 case STAR_ASSIGN:
3885 case MOD_ASSIGN:
3886 case RSHIFT_ASSIGN:
3887 case LSHIFT_ASSIGN:
3888 case BAND_ASSIGN:
3889 case BOR_ASSIGN:
3890 case BXOR_ASSIGN:
3891 case QUESTION:
3892 case LOR:
3893 case LAND:
3894 case BOR:
3895 case BXOR:
3896 case BAND:
3897 case EQUAL:
3898 case NOT_EQUAL:
3899 case LT:
3900 case LTE:
3901 case GT:
3902 case GTE:
3903 case LSHIFT:
3904 case RSHIFT:
3905 case PLUS:
3906 case MINUS:
3907 case DIV:
3908 case MOD:
3909 case INC:
3910 case DEC:
3911 case LITERAL_sizeof:
3912 case CharLiteral:
3913 case NCast:
3914 case NExpressionGroup:
3915 case NInitializer:
3916 case NEmptyExpression:
3917 case NCommaExpr:
3918 case NUnaryExpr:
3919 case NPostfixExpr:
3920 case NRangeExpr:
3921 case NStringSeq:
3922 case NLcurlyInitializer:
3923 case NGnuAsmExpr:
3924 case Number:
3925 case LITERAL___alignof:
3926 {
3927 expr(_t);
3928 _t = _retTree;
3929 break;
3930 }
3931 case 3:
3932 {
3933 break;
3934 }
3935 default:
3936 {
3937 throw new NoViableAltException(_t);
3938 }
3939 }
3940 }
3941 if ( inputState.guessing==0 ) {
3942 print( ";" );
3943 }
3944 _t = __t152;
3945 _t = _t.getNextSibling();
3946 break;
3947 }
3948 case NLabel:
3949 {
3950 AST __t154 = _t;
3951 TNode tmp16_AST_in = (TNode)_t;
3952 match(_t,NLabel);
3953 _t = _t.getFirstChild();
3954 ni = (TNode)_t;
3955 match(_t,ID);
3956 _t = _t.getNextSibling();
3957 if ( inputState.guessing==0 ) {
3958 print( ni ); print( ":" );
3959 }
3960 {
3961 if (_t==null) _t=ASTNULL;
3962 switch ( _t.getType()) {
3963 case SEMI:
3964 case LITERAL_while:
3965 case LITERAL_do:
3966 case LITERAL_for:
3967 case LITERAL_goto:
3968 case LITERAL_continue:
3969 case LITERAL_break:
3970 case LITERAL_return:
3971 case LITERAL_case:
3972 case LITERAL_default:
3973 case LITERAL_if:
3974 case LITERAL_switch:
3975 case NStatementExpr:
3976 case NCompoundStatement:
3977 case NLabel:
3978 {
3979 statement(_t);
3980 _t = _retTree;
3981 break;
3982 }
3983 case 3:
3984 {
3985 break;
3986 }
3987 default:
3988 {
3989 throw new NoViableAltException(_t);
3990 }
3991 }
3992 }
3993 _t = __t154;
3994 _t = _t.getNextSibling();
3995 break;
3996 }
3997 case LITERAL_case:
3998 {
3999 AST __t156 = _t;
4000 ca = _t==ASTNULL ? null :(TNode)_t;
4001 match(_t,LITERAL_case);
4002 _t = _t.getFirstChild();
4003 if ( inputState.guessing==0 ) {
4004 print( ca );
4005 }
4006 expr(_t);
4007 _t = _retTree;
4008 if ( inputState.guessing==0 ) {
4009 print( ":" );
4010 }
4011 {
4012 if (_t==null) _t=ASTNULL;
4013 switch ( _t.getType()) {
4014 case SEMI:
4015 case LITERAL_while:
4016 case LITERAL_do:
4017 case LITERAL_for:
4018 case LITERAL_goto:
4019 case LITERAL_continue:
4020 case LITERAL_break:
4021 case LITERAL_return:
4022 case LITERAL_case:
4023 case LITERAL_default:
4024 case LITERAL_if:
4025 case LITERAL_switch:
4026 case NStatementExpr:
4027 case NCompoundStatement:
4028 case NLabel:
4029 {
4030 statement(_t);
4031 _t = _retTree;
4032 break;
4033 }
4034 case 3:
4035 {
4036 break;
4037 }
4038 default:
4039 {
4040 throw new NoViableAltException(_t);
4041 }
4042 }
4043 }
4044 _t = __t156;
4045 _t = _t.getNextSibling();
4046 break;
4047 }
4048 case LITERAL_default:
4049 {
4050 AST __t158 = _t;
4051 de = _t==ASTNULL ? null :(TNode)_t;
4053 _t = _t.getFirstChild();
4054 if ( inputState.guessing==0 ) {
4055 print( de ); print( ":" );
4056 }
4057 {
4058 if (_t==null) _t=ASTNULL;
4059 switch ( _t.getType()) {
4060 case SEMI:
4061 case LITERAL_while:
4062 case LITERAL_do:
4063 case LITERAL_for:
4064 case LITERAL_goto:
4065 case LITERAL_continue:
4066 case LITERAL_break:
4067 case LITERAL_return:
4068 case LITERAL_case:
4069 case LITERAL_default:
4070 case LITERAL_if:
4071 case LITERAL_switch:
4072 case NStatementExpr:
4073 case NCompoundStatement:
4074 case NLabel:
4075 {
4076 statement(_t);
4077 _t = _retTree;
4078 break;
4079 }
4080 case 3:
4081 {
4082 break;
4083 }
4084 default:
4085 {
4086 throw new NoViableAltException(_t);
4087 }
4088 }
4089 }
4090 _t = __t158;
4091 _t = _t.getNextSibling();
4092 break;
4093 }
4094 case LITERAL_if:
4095 {
4096 AST __t160 = _t;
4097 i = _t==ASTNULL ? null :(TNode)_t;
4098 match(_t,LITERAL_if);
4099 _t = _t.getFirstChild();
4100 if ( inputState.guessing==0 ) {
4101 print( i ); print( "(" );
4102 }
4103 expr(_t);
4104 _t = _retTree;
4105 if ( inputState.guessing==0 ) {
4106 print( ")" );
4107 }
4108 statement(_t);
4109 _t = _retTree;
4110 {
4111 if (_t==null) _t=ASTNULL;
4112 switch ( _t.getType()) {
4113 case LITERAL_else:
4114 {
4115 e = (TNode)_t;
4116 match(_t,LITERAL_else);
4117 _t = _t.getNextSibling();
4118 if ( inputState.guessing==0 ) {
4119 print( e );
4120 }
4121 statement(_t);
4122 _t = _retTree;
4123 break;
4124 }
4125 case 3:
4126 {
4127 break;
4128 }
4129 default:
4130 {
4131 throw new NoViableAltException(_t);
4132 }
4133 }
4134 }
4135 _t = __t160;
4136 _t = _t.getNextSibling();
4137 break;
4138 }
4139 case LITERAL_switch:
4140 {
4141 AST __t162 = _t;
4142 sw = _t==ASTNULL ? null :(TNode)_t;
4144 _t = _t.getFirstChild();
4145 if ( inputState.guessing==0 ) {
4146 print( sw ); print( "(" );
4147 }
4148 expr(_t);
4149 _t = _retTree;
4150 if ( inputState.guessing==0 ) {
4151 print( ")" );
4152 }
4153 statement(_t);
4154 _t = _retTree;
4155 _t = __t162;
4156 _t = _t.getNextSibling();
4157 break;
4158 }
4159 default:
4160 {
4161 throw new NoViableAltException(_t);
4162 }
4163 }
4164 }
4165 catch (RecognitionException ex) {
4166 if (inputState.guessing==0) {
4167 reportError(ex);
4168 if (_t!=null) {_t = _t.getNextSibling();}
4169 } else {
4170 throw ex;
4171 }
4172 }
4173 _retTree = _t;
4174 }
4175
4176 public final void binaryExpr(AST _t) throws RecognitionException {
4177
4178 TNode binaryExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
4179 TNode b = null;
4180
4181 try { // for error handling
4182 b = _t==ASTNULL ? null : (TNode)_t;
4183 binaryOperator(_t);
4184 _t = _retTree;
4185 if ( inputState.guessing==0 ) {
4186 TNode e1, e2;
4187 e1 = (TNode) b.getFirstChild();
4188 e2 = (TNode) e1.getNextSibling();
4189 expr( e1 );
4190 print( b );
4191 expr( e2 );
4192
4193 }
4194 }
4195 catch (RecognitionException ex) {
4196 if (inputState.guessing==0) {
4197 reportError(ex);
4198 if (_t!=null) {_t = _t.getNextSibling();}
4199 } else {
4200 throw ex;
4201 }
4202 }
4203 _retTree = _t;
4204 }
4205
4206 public final void conditionalExpr(AST _t) throws RecognitionException {
4207
4208 TNode conditionalExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
4209 TNode q = null;
4210 TNode c = null;
4211
4212 try { // for error handling
4213 AST __t188 = _t;
4214 q = _t==ASTNULL ? null :(TNode)_t;
4215 match(_t,QUESTION);
4216 _t = _t.getFirstChild();
4217 expr(_t);
4218 _t = _retTree;
4219 if ( inputState.guessing==0 ) {
4220 print( q );
4221 }
4222 {
4223 if (_t==null) _t=ASTNULL;
4224 switch ( _t.getType()) {
4225 case ID:
4226 case ASSIGN:
4227 case STAR:
4228 case LPAREN:
4229 case DIV_ASSIGN:
4230 case PLUS_ASSIGN:
4231 case MINUS_ASSIGN:
4232 case STAR_ASSIGN:
4233 case MOD_ASSIGN:
4234 case RSHIFT_ASSIGN:
4235 case LSHIFT_ASSIGN:
4236 case BAND_ASSIGN:
4237 case BOR_ASSIGN:
4238 case BXOR_ASSIGN:
4239 case QUESTION:
4240 case LOR:
4241 case LAND:
4242 case BOR:
4243 case BXOR:
4244 case BAND:
4245 case EQUAL:
4246 case NOT_EQUAL:
4247 case LT:
4248 case LTE:
4249 case GT:
4250 case GTE:
4251 case LSHIFT:
4252 case RSHIFT:
4253 case PLUS:
4254 case MINUS:
4255 case DIV:
4256 case MOD:
4257 case INC:
4258 case DEC:
4259 case LITERAL_sizeof:
4260 case CharLiteral:
4261 case NCast:
4262 case NExpressionGroup:
4263 case NInitializer:
4264 case NEmptyExpression:
4265 case NCommaExpr:
4266 case NUnaryExpr:
4267 case NPostfixExpr:
4268 case NRangeExpr:
4269 case NStringSeq:
4270 case NLcurlyInitializer:
4271 case NGnuAsmExpr:
4272 case Number:
4273 case LITERAL___alignof:
4274 {
4275 expr(_t);
4276 _t = _retTree;
4277 break;
4278 }
4279 case COLON:
4280 {
4281 break;
4282 }
4283 default:
4284 {
4285 throw new NoViableAltException(_t);
4286 }
4287 }
4288 }
4289 c = (TNode)_t;
4290 match(_t,COLON);
4291 _t = _t.getNextSibling();
4292 if ( inputState.guessing==0 ) {
4293 print( c );
4294 }
4295 expr(_t);
4296 _t = _retTree;
4297 _t = __t188;
4298 _t = _t.getNextSibling();
4299 }
4300 catch (RecognitionException ex) {
4301 if (inputState.guessing==0) {
4302 reportError(ex);
4303 if (_t!=null) {_t = _t.getNextSibling();}
4304 } else {
4305 throw ex;
4306 }
4307 }
4308 _retTree = _t;
4309 }
4310
4311 public final void castExpr(AST _t) throws RecognitionException {
4312
4313 TNode castExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
4314 TNode c = null;
4315 TNode rp = null;
4316
4317 try { // for error handling
4318 AST __t191 = _t;
4319 c = _t==ASTNULL ? null :(TNode)_t;
4320 match(_t,NCast);
4321 _t = _t.getFirstChild();
4322 if ( inputState.guessing==0 ) {
4323 print( c );
4324 }
4325 typeName(_t);
4326 _t = _retTree;
4327 rp = (TNode)_t;
4328 match(_t,RPAREN);
4329 _t = _t.getNextSibling();
4330 if ( inputState.guessing==0 ) {
4331 print( rp );
4332 }
4333 expr(_t);
4334 _t = _retTree;
4335 _t = __t191;
4336 _t = _t.getNextSibling();
4337 }
4338 catch (RecognitionException ex) {
4339 if (inputState.guessing==0) {
4340 reportError(ex);
4341 if (_t!=null) {_t = _t.getNextSibling();}
4342 } else {
4343 throw ex;
4344 }
4345 }
4346 _retTree = _t;
4347 }
4348
4349 public final void unaryExpr(AST _t) throws RecognitionException {
4350
4351 TNode unaryExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
4352 TNode i = null;
4353 TNode d = null;
4354 TNode u = null;
4355 TNode s = null;
4356 TNode lps = null;
4357 TNode rps = null;
4358 TNode a = null;
4359 TNode lpa = null;
4360 TNode rpa = null;
4361
4362 try { // for error handling
4363 if (_t==null) _t=ASTNULL;
4364 switch ( _t.getType()) {
4365 case INC:
4366 {
4367 AST __t210 = _t;
4368 i = _t==ASTNULL ? null :(TNode)_t;
4369 match(_t,INC);
4370 _t = _t.getFirstChild();
4371 if ( inputState.guessing==0 ) {
4372 print( i );
4373 }
4374 expr(_t);
4375 _t = _retTree;
4376 _t = __t210;
4377 _t = _t.getNextSibling();
4378 break;
4379 }
4380 case DEC:
4381 {
4382 AST __t211 = _t;
4383 d = _t==ASTNULL ? null :(TNode)_t;
4384 match(_t,DEC);
4385 _t = _t.getFirstChild();
4386 if ( inputState.guessing==0 ) {
4387 print( d );
4388 }
4389 expr(_t);
4390 _t = _retTree;
4391 _t = __t211;
4392 _t = _t.getNextSibling();
4393 break;
4394 }
4395 case NUnaryExpr:
4396 {
4397 AST __t212 = _t;
4398 TNode tmp17_AST_in = (TNode)_t;
4399 match(_t,NUnaryExpr);
4400 _t = _t.getFirstChild();
4401 u = _t==ASTNULL ? null : (TNode)_t;
4402 unaryOperator(_t);
4403 _t = _retTree;
4404 if ( inputState.guessing==0 ) {
4405 print( u );
4406 }
4407 expr(_t);
4408 _t = _retTree;
4409 _t = __t212;
4410 _t = _t.getNextSibling();
4411 break;
4412 }
4413 case LITERAL_sizeof:
4414 {
4415 AST __t213 = _t;
4416 s = _t==ASTNULL ? null :(TNode)_t;
4418 _t = _t.getFirstChild();
4419 if ( inputState.guessing==0 ) {
4420 print( s );
4421 }
4422 {
4423 boolean synPredMatched216 = false;
4424 if (_t==null) _t=ASTNULL;
4425 if (((_t.getType()==LPAREN))) {
4426 AST __t216 = _t;
4427 synPredMatched216 = true;
4428 inputState.guessing++;
4429 try {
4430 {
4431 TNode tmp18_AST_in = (TNode)_t;
4432 match(_t,LPAREN);
4433 _t = _t.getNextSibling();
4434 typeName(_t);
4435 _t = _retTree;
4436 }
4437 }
4438 catch (RecognitionException pe) {
4439 synPredMatched216 = false;
4440 }
4441 _t = __t216;
4442inputState.guessing--;
4443 }
4444 if ( synPredMatched216 ) {
4445 lps = (TNode)_t;
4446 match(_t,LPAREN);
4447 _t = _t.getNextSibling();
4448 if ( inputState.guessing==0 ) {
4449 print( lps );
4450 }
4451 typeName(_t);
4452 _t = _retTree;
4453 rps = (TNode)_t;
4454 match(_t,RPAREN);
4455 _t = _t.getNextSibling();
4456 if ( inputState.guessing==0 ) {
4457 print( rps );
4458 }
4459 }
4460 else if ((_tokenSet_3.member(_t.getType()))) {
4461 expr(_t);
4462 _t = _retTree;
4463 }
4464 else {
4465 throw new NoViableAltException(_t);
4466 }
4467
4468 }
4469 _t = __t213;
4470 _t = _t.getNextSibling();
4471 break;
4472 }
4473 case LITERAL___alignof:
4474 {
4475 AST __t217 = _t;
4476 a = _t==ASTNULL ? null :(TNode)_t;
4478 _t = _t.getFirstChild();
4479 if ( inputState.guessing==0 ) {
4480 print( a );
4481 }
4482 {
4483 boolean synPredMatched220 = false;
4484 if (_t==null) _t=ASTNULL;
4485 if (((_t.getType()==LPAREN))) {
4486 AST __t220 = _t;
4487 synPredMatched220 = true;
4488 inputState.guessing++;
4489 try {
4490 {
4491 TNode tmp19_AST_in = (TNode)_t;
4492 match(_t,LPAREN);
4493 _t = _t.getNextSibling();
4494 typeName(_t);
4495 _t = _retTree;
4496 }
4497 }
4498 catch (RecognitionException pe) {
4499 synPredMatched220 = false;
4500 }
4501 _t = __t220;
4502inputState.guessing--;
4503 }
4504 if ( synPredMatched220 ) {
4505 lpa = (TNode)_t;
4506 match(_t,LPAREN);
4507 _t = _t.getNextSibling();
4508 if ( inputState.guessing==0 ) {
4509 print( lpa );
4510 }
4511 typeName(_t);
4512 _t = _retTree;
4513 rpa = (TNode)_t;
4514 match(_t,RPAREN);
4515 _t = _t.getNextSibling();
4516 if ( inputState.guessing==0 ) {
4517 print( rpa );
4518 }
4519 }
4520 else if ((_tokenSet_3.member(_t.getType()))) {
4521 expr(_t);
4522 _t = _retTree;
4523 }
4524 else {
4525 throw new NoViableAltException(_t);
4526 }
4527
4528 }
4529 _t = __t217;
4530 _t = _t.getNextSibling();
4531 break;
4532 }
4533 default:
4534 {
4535 throw new NoViableAltException(_t);
4536 }
4537 }
4538 }
4539 catch (RecognitionException ex) {
4540 if (inputState.guessing==0) {
4541 reportError(ex);
4542 if (_t!=null) {_t = _t.getNextSibling();}
4543 } else {
4544 throw ex;
4545 }
4546 }
4547 _retTree = _t;
4548 }
4549
4550 public final void postfixExpr(AST _t) throws RecognitionException {
4551
4552 TNode postfixExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
4553 TNode a = null;
4554 TNode b = null;
4555 TNode c = null;
4556 TNode d = null;
4557 TNode n = null;
4558 TNode rp = null;
4559 TNode lb = null;
4560 TNode rb = null;
4561 TNode f = null;
4562 TNode g = null;
4563
4564 try { // for error handling
4565 AST __t223 = _t;
4566 TNode tmp20_AST_in = (TNode)_t;
4567 match(_t,NPostfixExpr);
4568 _t = _t.getFirstChild();
4569 primaryExpr(_t);
4570 _t = _retTree;
4571 {
4572 int _cnt227=0;
4573 _loop227:
4574 do {
4575 if (_t==null) _t=ASTNULL;
4576 switch ( _t.getType()) {
4577 case PTR:
4578 {
4579 a = (TNode)_t;
4580 match(_t,PTR);
4581 _t = _t.getNextSibling();
4582 b = (TNode)_t;
4583 match(_t,ID);
4584 _t = _t.getNextSibling();
4585 if ( inputState.guessing==0 ) {
4586 print( a ); print( b );
4587 }
4588 break;
4589 }
4590 case DOT:
4591 {
4592 c = (TNode)_t;
4593 match(_t,DOT);
4594 _t = _t.getNextSibling();
4595 d = (TNode)_t;
4596 match(_t,ID);
4597 _t = _t.getNextSibling();
4598 if ( inputState.guessing==0 ) {
4599 print( c ); print( d );
4600 }
4601 break;
4602 }
4603 case NFunctionCallArgs:
4604 {
4605 AST __t225 = _t;
4606 n = _t==ASTNULL ? null :(TNode)_t;
4608 _t = _t.getFirstChild();
4609 if ( inputState.guessing==0 ) {
4610 print( n );
4611 }
4612 {
4613 if (_t==null) _t=ASTNULL;
4614 switch ( _t.getType()) {
4615 case ID:
4616 case ASSIGN:
4617 case STAR:
4618 case LPAREN:
4619 case DIV_ASSIGN:
4620 case PLUS_ASSIGN:
4621 case MINUS_ASSIGN:
4622 case STAR_ASSIGN:
4623 case MOD_ASSIGN:
4624 case RSHIFT_ASSIGN:
4625 case LSHIFT_ASSIGN:
4626 case BAND_ASSIGN:
4627 case BOR_ASSIGN:
4628 case BXOR_ASSIGN:
4629 case QUESTION:
4630 case LOR:
4631 case LAND:
4632 case BOR:
4633 case BXOR:
4634 case BAND:
4635 case EQUAL:
4636 case NOT_EQUAL:
4637 case LT:
4638 case LTE:
4639 case GT:
4640 case GTE:
4641 case LSHIFT:
4642 case RSHIFT:
4643 case PLUS:
4644 case MINUS:
4645 case DIV:
4646 case MOD:
4647 case INC:
4648 case DEC:
4649 case LITERAL_sizeof:
4650 case CharLiteral:
4651 case NCast:
4652 case NExpressionGroup:
4653 case NInitializer:
4654 case NEmptyExpression:
4655 case NCommaExpr:
4656 case NUnaryExpr:
4657 case NPostfixExpr:
4658 case NRangeExpr:
4659 case NStringSeq:
4660 case NLcurlyInitializer:
4661 case NGnuAsmExpr:
4662 case Number:
4663 case LITERAL___alignof:
4664 {
4665 argExprList(_t);
4666 _t = _retTree;
4667 break;
4668 }
4669 case RPAREN:
4670 {
4671 break;
4672 }
4673 default:
4674 {
4675 throw new NoViableAltException(_t);
4676 }
4677 }
4678 }
4679 rp = (TNode)_t;
4680 match(_t,RPAREN);
4681 _t = _t.getNextSibling();
4682 if ( inputState.guessing==0 ) {
4683 print( rp );
4684 }
4685 _t = __t225;
4686 _t = _t.getNextSibling();
4687 break;
4688 }
4689 case LBRACKET:
4690 {
4691 lb = (TNode)_t;
4692 match(_t,LBRACKET);
4693 _t = _t.getNextSibling();
4694 if ( inputState.guessing==0 ) {
4695 print( lb );
4696 }
4697 expr(_t);
4698 _t = _retTree;
4699 rb = (TNode)_t;
4700 match(_t,RBRACKET);
4701 _t = _t.getNextSibling();
4702 if ( inputState.guessing==0 ) {
4703 print( rb );
4704 }
4705 break;
4706 }
4707 case INC:
4708 {
4709 f = (TNode)_t;
4710 match(_t,INC);
4711 _t = _t.getNextSibling();
4712 if ( inputState.guessing==0 ) {
4713 print( f );
4714 }
4715 break;
4716 }
4717 case DEC:
4718 {
4719 g = (TNode)_t;
4720 match(_t,DEC);
4721 _t = _t.getNextSibling();
4722 if ( inputState.guessing==0 ) {
4723 print( g );
4724 }
4725 break;
4726 }
4727 default:
4728 {
4729 if ( _cnt227>=1 ) { break _loop227; } else {throw new NoViableAltException(_t);}
4730 }
4731 }
4732 _cnt227++;
4733 } while (true);
4734 }
4735 _t = __t223;
4736 _t = _t.getNextSibling();
4737 }
4738 catch (RecognitionException ex) {
4739 if (inputState.guessing==0) {
4740 reportError(ex);
4741 if (_t!=null) {_t = _t.getNextSibling();}
4742 } else {
4743 throw ex;
4744 }
4745 }
4746 _retTree = _t;
4747 }
4748
4749 public final void primaryExpr(AST _t) throws RecognitionException {
4750
4751 TNode primaryExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
4752 TNode i = null;
4753 TNode n = null;
4754 TNode eg = null;
4755
4756 try { // for error handling
4757 if (_t==null) _t=ASTNULL;
4758 switch ( _t.getType()) {
4759 case ID:
4760 {
4761 i = (TNode)_t;
4762 match(_t,ID);
4763 _t = _t.getNextSibling();
4764 if ( inputState.guessing==0 ) {
4765 print( i );
4766 }
4767 break;
4768 }
4769 case Number:
4770 {
4771 n = (TNode)_t;
4772 match(_t,Number);
4773 _t = _t.getNextSibling();
4774 if ( inputState.guessing==0 ) {
4775 print( n );
4776 }
4777 break;
4778 }
4779 case CharLiteral:
4780 {
4781 charConst(_t);
4782 _t = _retTree;
4783 break;
4784 }
4785 case NStringSeq:
4786 {
4787 stringConst(_t);
4788 _t = _retTree;
4789 break;
4790 }
4791 case NExpressionGroup:
4792 {
4793 AST __t229 = _t;
4794 eg = _t==ASTNULL ? null :(TNode)_t;
4796 _t = _t.getFirstChild();
4797 if ( inputState.guessing==0 ) {
4798 print( eg );
4799 }
4800 expr(_t);
4801 _t = _retTree;
4802 if ( inputState.guessing==0 ) {
4803 print( ")" );
4804 }
4805 _t = __t229;
4806 _t = _t.getNextSibling();
4807 break;
4808 }
4809 default:
4810 {
4811 throw new NoViableAltException(_t);
4812 }
4813 }
4814 }
4815 catch (RecognitionException ex) {
4816 if (inputState.guessing==0) {
4817 reportError(ex);
4818 if (_t!=null) {_t = _t.getNextSibling();}
4819 } else {
4820 throw ex;
4821 }
4822 }
4823 _retTree = _t;
4824 }
4825
4826 public final void emptyExpr(AST _t) throws RecognitionException {
4827
4828 TNode emptyExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
4829
4830 try { // for error handling
4831 TNode tmp21_AST_in = (TNode)_t;
4833 _t = _t.getNextSibling();
4834 }
4835 catch (RecognitionException ex) {
4836 if (inputState.guessing==0) {
4837 reportError(ex);
4838 if (_t!=null) {_t = _t.getNextSibling();}
4839 } else {
4840 throw ex;
4841 }
4842 }
4843 _retTree = _t;
4844 }
4845
4846 public final void compoundStatementExpr(AST _t) throws RecognitionException {
4847
4848 TNode compoundStatementExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
4849 TNode l = null;
4850 TNode r = null;
4851
4852 try { // for error handling
4853 AST __t166 = _t;
4854 l = _t==ASTNULL ? null :(TNode)_t;
4855 match(_t,LPAREN);
4856 _t = _t.getFirstChild();
4857 if ( inputState.guessing==0 ) {
4858 print( l );
4859 }
4861 _t = _retTree;
4862 r = (TNode)_t;
4863 match(_t,RPAREN);
4864 _t = _t.getNextSibling();
4865 if ( inputState.guessing==0 ) {
4866 print( r );
4867 }
4868 _t = __t166;
4869 _t = _t.getNextSibling();
4870 }
4871 catch (RecognitionException ex) {
4872 if (inputState.guessing==0) {
4873 reportError(ex);
4874 if (_t!=null) {_t = _t.getNextSibling();}
4875 } else {
4876 throw ex;
4877 }
4878 }
4879 _retTree = _t;
4880 }
4881
4882 public final void rangeExpr(AST _t) throws RecognitionException {
4883
4884 TNode rangeExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
4885 TNode v = null;
4886
4887 try { // for error handling
4888 AST __t168 = _t;
4889 TNode tmp22_AST_in = (TNode)_t;
4890 match(_t,NRangeExpr);
4891 _t = _t.getFirstChild();
4892 expr(_t);
4893 _t = _retTree;
4894 v = (TNode)_t;
4895 match(_t,VARARGS);
4896 _t = _t.getNextSibling();
4897 if ( inputState.guessing==0 ) {
4898 print( v );
4899 }
4900 expr(_t);
4901 _t = _retTree;
4902 _t = __t168;
4903 _t = _t.getNextSibling();
4904 }
4905 catch (RecognitionException ex) {
4906 if (inputState.guessing==0) {
4907 reportError(ex);
4908 if (_t!=null) {_t = _t.getNextSibling();}
4909 } else {
4910 throw ex;
4911 }
4912 }
4913 _retTree = _t;
4914 }
4915
4916 public final void gnuAsmExpr(AST _t) throws RecognitionException {
4917
4918 TNode gnuAsmExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
4919 TNode n = null;
4920 TNode v = null;
4921 TNode lp = null;
4922 TNode c1 = null;
4923 TNode c2 = null;
4924 TNode c3 = null;
4925 TNode c4 = null;
4926 TNode c5 = null;
4927 TNode c6 = null;
4928 TNode rp = null;
4929
4930 try { // for error handling
4931 AST __t170 = _t;
4932 n = _t==ASTNULL ? null :(TNode)_t;
4933 match(_t,NGnuAsmExpr);
4934 _t = _t.getFirstChild();
4935 if ( inputState.guessing==0 ) {
4936 print( n );
4937 }
4938 {
4939 if (_t==null) _t=ASTNULL;
4940 switch ( _t.getType()) {
4941 case LITERAL_volatile:
4942 {
4943 v = (TNode)_t;
4945 _t = _t.getNextSibling();
4946 if ( inputState.guessing==0 ) {
4947 print( v );
4948 }
4949 break;
4950 }
4951 case LPAREN:
4952 {
4953 break;
4954 }
4955 default:
4956 {
4957 throw new NoViableAltException(_t);
4958 }
4959 }
4960 }
4961 lp = (TNode)_t;
4962 match(_t,LPAREN);
4963 _t = _t.getNextSibling();
4964 if ( inputState.guessing==0 ) {
4965 print( lp );
4966 }
4967 stringConst(_t);
4968 _t = _retTree;
4969 {
4970 if (_t==null) _t=ASTNULL;
4971 if ((_t.getType()==COLON)) {
4972 c1 = (TNode)_t;
4973 match(_t,COLON);
4974 _t = _t.getNextSibling();
4975 if ( inputState.guessing==0 ) {
4976 print( c1 );
4977 }
4978 {
4979 if (_t==null) _t=ASTNULL;
4980 switch ( _t.getType()) {
4981 case NStringSeq:
4982 {
4983 strOptExprPair(_t);
4984 _t = _retTree;
4985 {
4986 _loop175:
4987 do {
4988 if (_t==null) _t=ASTNULL;
4989 if ((_t.getType()==COMMA)) {
4990 c2 = (TNode)_t;
4991 match(_t,COMMA);
4992 _t = _t.getNextSibling();
4993 if ( inputState.guessing==0 ) {
4994 print( c2 );
4995 }
4996 strOptExprPair(_t);
4997 _t = _retTree;
4998 }
4999 else {
5000 break _loop175;
5001 }
5002
5003 } while (true);
5004 }
5005 break;
5006 }
5007 case COLON:
5008 case RPAREN:
5009 {
5010 break;
5011 }
5012 default:
5013 {
5014 throw new NoViableAltException(_t);
5015 }
5016 }
5017 }
5018 {
5019 if (_t==null) _t=ASTNULL;
5020 if ((_t.getType()==COLON)) {
5021 c3 = (TNode)_t;
5022 match(_t,COLON);
5023 _t = _t.getNextSibling();
5024 if ( inputState.guessing==0 ) {
5025 print( c3 );
5026 }
5027 {
5028 if (_t==null) _t=ASTNULL;
5029 switch ( _t.getType()) {
5030 case NStringSeq:
5031 {
5032 strOptExprPair(_t);
5033 _t = _retTree;
5034 {
5035 _loop179:
5036 do {
5037 if (_t==null) _t=ASTNULL;
5038 if ((_t.getType()==COMMA)) {
5039 c4 = (TNode)_t;
5040 match(_t,COMMA);
5041 _t = _t.getNextSibling();
5042 if ( inputState.guessing==0 ) {
5043 print( c4 );
5044 }
5045 strOptExprPair(_t);
5046 _t = _retTree;
5047 }
5048 else {
5049 break _loop179;
5050 }
5051
5052 } while (true);
5053 }
5054 break;
5055 }
5056 case COLON:
5057 case RPAREN:
5058 {
5059 break;
5060 }
5061 default:
5062 {
5063 throw new NoViableAltException(_t);
5064 }
5065 }
5066 }
5067 }
5068 else if ((_t.getType()==COLON||_t.getType()==RPAREN)) {
5069 }
5070 else {
5071 throw new NoViableAltException(_t);
5072 }
5073
5074 }
5075 }
5076 else if ((_t.getType()==COLON||_t.getType()==RPAREN)) {
5077 }
5078 else {
5079 throw new NoViableAltException(_t);
5080 }
5081
5082 }
5083 {
5084 if (_t==null) _t=ASTNULL;
5085 switch ( _t.getType()) {
5086 case COLON:
5087 {
5088 c5 = (TNode)_t;
5089 match(_t,COLON);
5090 _t = _t.getNextSibling();
5091 if ( inputState.guessing==0 ) {
5092 print( c5 );
5093 }
5094 stringConst(_t);
5095 _t = _retTree;
5096 {
5097 _loop182:
5098 do {
5099 if (_t==null) _t=ASTNULL;
5100 if ((_t.getType()==COMMA)) {
5101 c6 = (TNode)_t;
5102 match(_t,COMMA);
5103 _t = _t.getNextSibling();
5104 if ( inputState.guessing==0 ) {
5105 print( c6 );
5106 }
5107 stringConst(_t);
5108 _t = _retTree;
5109 }
5110 else {
5111 break _loop182;
5112 }
5113
5114 } while (true);
5115 }
5116 break;
5117 }
5118 case RPAREN:
5119 {
5120 break;
5121 }
5122 default:
5123 {
5124 throw new NoViableAltException(_t);
5125 }
5126 }
5127 }
5128 rp = (TNode)_t;
5129 match(_t,RPAREN);
5130 _t = _t.getNextSibling();
5131 if ( inputState.guessing==0 ) {
5132 print( rp );
5133 }
5134 _t = __t170;
5135 _t = _t.getNextSibling();
5136 }
5137 catch (RecognitionException ex) {
5138 if (inputState.guessing==0) {
5139 reportError(ex);
5140 if (_t!=null) {_t = _t.getNextSibling();}
5141 } else {
5142 throw ex;
5143 }
5144 }
5145 _retTree = _t;
5146 }
5147
5148 protected final void stringConst(AST _t) throws RecognitionException {
5149
5150 TNode stringConst_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
5151 TNode s = null;
5152
5153 try { // for error handling
5154 AST __t235 = _t;
5155 TNode tmp23_AST_in = (TNode)_t;
5156 match(_t,NStringSeq);
5157 _t = _t.getFirstChild();
5158 {
5159 int _cnt237=0;
5160 _loop237:
5161 do {
5162 if (_t==null) _t=ASTNULL;
5163 if ((_t.getType()==StringLiteral)) {
5164 s = (TNode)_t;
5165 match(_t,StringLiteral);
5166 _t = _t.getNextSibling();
5167 if ( inputState.guessing==0 ) {
5168 print( s );
5169 }
5170 }
5171 else {
5172 if ( _cnt237>=1 ) { break _loop237; } else {throw new NoViableAltException(_t);}
5173 }
5174
5175 _cnt237++;
5176 } while (true);
5177 }
5178 _t = __t235;
5179 _t = _t.getNextSibling();
5180 }
5181 catch (RecognitionException ex) {
5182 if (inputState.guessing==0) {
5183 reportError(ex);
5184 if (_t!=null) {_t = _t.getNextSibling();}
5185 } else {
5186 throw ex;
5187 }
5188 }
5189 _retTree = _t;
5190 }
5191
5192 public final void strOptExprPair(AST _t) throws RecognitionException {
5193
5194 TNode strOptExprPair_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
5195 TNode l = null;
5196 TNode r = null;
5197
5198 try { // for error handling
5199 stringConst(_t);
5200 _t = _retTree;
5201 {
5202 if (_t==null) _t=ASTNULL;
5203 switch ( _t.getType()) {
5204 case LPAREN:
5205 {
5206 l = (TNode)_t;
5207 match(_t,LPAREN);
5208 _t = _t.getNextSibling();
5209 if ( inputState.guessing==0 ) {
5210 print( l );
5211 }
5212 expr(_t);
5213 _t = _retTree;
5214 r = (TNode)_t;
5215 match(_t,RPAREN);
5216 _t = _t.getNextSibling();
5217 if ( inputState.guessing==0 ) {
5218 print( r );
5219 }
5220 break;
5221 }
5222 case COMMA:
5223 case COLON:
5224 case RPAREN:
5225 {
5226 break;
5227 }
5228 default:
5229 {
5230 throw new NoViableAltException(_t);
5231 }
5232 }
5233 }
5234 }
5235 catch (RecognitionException ex) {
5236 if (inputState.guessing==0) {
5237 reportError(ex);
5238 if (_t!=null) {_t = _t.getNextSibling();}
5239 } else {
5240 throw ex;
5241 }
5242 }
5243 _retTree = _t;
5244 }
5245
5246 public final void binaryOperator(AST _t) throws RecognitionException {
5247
5248 TNode binaryOperator_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
5249
5250 try { // for error handling
5251 if (_t==null) _t=ASTNULL;
5252 switch ( _t.getType()) {
5253 case ASSIGN:
5254 {
5255 TNode tmp24_AST_in = (TNode)_t;
5256 match(_t,ASSIGN);
5257 _t = _t.getNextSibling();
5258 break;
5259 }
5260 case DIV_ASSIGN:
5261 {
5262 TNode tmp25_AST_in = (TNode)_t;
5263 match(_t,DIV_ASSIGN);
5264 _t = _t.getNextSibling();
5265 break;
5266 }
5267 case PLUS_ASSIGN:
5268 {
5269 TNode tmp26_AST_in = (TNode)_t;
5270 match(_t,PLUS_ASSIGN);
5271 _t = _t.getNextSibling();
5272 break;
5273 }
5274 case MINUS_ASSIGN:
5275 {
5276 TNode tmp27_AST_in = (TNode)_t;
5277 match(_t,MINUS_ASSIGN);
5278 _t = _t.getNextSibling();
5279 break;
5280 }
5281 case STAR_ASSIGN:
5282 {
5283 TNode tmp28_AST_in = (TNode)_t;
5284 match(_t,STAR_ASSIGN);
5285 _t = _t.getNextSibling();
5286 break;
5287 }
5288 case MOD_ASSIGN:
5289 {
5290 TNode tmp29_AST_in = (TNode)_t;
5291 match(_t,MOD_ASSIGN);
5292 _t = _t.getNextSibling();
5293 break;
5294 }
5295 case RSHIFT_ASSIGN:
5296 {
5297 TNode tmp30_AST_in = (TNode)_t;
5298 match(_t,RSHIFT_ASSIGN);
5299 _t = _t.getNextSibling();
5300 break;
5301 }
5302 case LSHIFT_ASSIGN:
5303 {
5304 TNode tmp31_AST_in = (TNode)_t;
5305 match(_t,LSHIFT_ASSIGN);
5306 _t = _t.getNextSibling();
5307 break;
5308 }
5309 case BAND_ASSIGN:
5310 {
5311 TNode tmp32_AST_in = (TNode)_t;
5312 match(_t,BAND_ASSIGN);
5313 _t = _t.getNextSibling();
5314 break;
5315 }
5316 case BOR_ASSIGN:
5317 {
5318 TNode tmp33_AST_in = (TNode)_t;
5319 match(_t,BOR_ASSIGN);
5320 _t = _t.getNextSibling();
5321 break;
5322 }
5323 case BXOR_ASSIGN:
5324 {
5325 TNode tmp34_AST_in = (TNode)_t;
5326 match(_t,BXOR_ASSIGN);
5327 _t = _t.getNextSibling();
5328 break;
5329 }
5330 case LOR:
5331 {
5332 TNode tmp35_AST_in = (TNode)_t;
5333 match(_t,LOR);
5334 _t = _t.getNextSibling();
5335 break;
5336 }
5337 case LAND:
5338 {
5339 TNode tmp36_AST_in = (TNode)_t;
5340 match(_t,LAND);
5341 _t = _t.getNextSibling();
5342 break;
5343 }
5344 case BOR:
5345 {
5346 TNode tmp37_AST_in = (TNode)_t;
5347 match(_t,BOR);
5348 _t = _t.getNextSibling();
5349 break;
5350 }
5351 case BXOR:
5352 {
5353 TNode tmp38_AST_in = (TNode)_t;
5354 match(_t,BXOR);
5355 _t = _t.getNextSibling();
5356 break;
5357 }
5358 case BAND:
5359 {
5360 TNode tmp39_AST_in = (TNode)_t;
5361 match(_t,BAND);
5362 _t = _t.getNextSibling();
5363 break;
5364 }
5365 case EQUAL:
5366 {
5367 TNode tmp40_AST_in = (TNode)_t;
5368 match(_t,EQUAL);
5369 _t = _t.getNextSibling();
5370 break;
5371 }
5372 case NOT_EQUAL:
5373 {
5374 TNode tmp41_AST_in = (TNode)_t;
5375 match(_t,NOT_EQUAL);
5376 _t = _t.getNextSibling();
5377 break;
5378 }
5379 case LT:
5380 {
5381 TNode tmp42_AST_in = (TNode)_t;
5382 match(_t,LT);
5383 _t = _t.getNextSibling();
5384 break;
5385 }
5386 case LTE:
5387 {
5388 TNode tmp43_AST_in = (TNode)_t;
5389 match(_t,LTE);
5390 _t = _t.getNextSibling();
5391 break;
5392 }
5393 case GT:
5394 {
5395 TNode tmp44_AST_in = (TNode)_t;
5396 match(_t,GT);
5397 _t = _t.getNextSibling();
5398 break;
5399 }
5400 case GTE:
5401 {
5402 TNode tmp45_AST_in = (TNode)_t;
5403 match(_t,GTE);
5404 _t = _t.getNextSibling();
5405 break;
5406 }
5407 case LSHIFT:
5408 {
5409 TNode tmp46_AST_in = (TNode)_t;
5410 match(_t,LSHIFT);
5411 _t = _t.getNextSibling();
5412 break;
5413 }
5414 case RSHIFT:
5415 {
5416 TNode tmp47_AST_in = (TNode)_t;
5417 match(_t,RSHIFT);
5418 _t = _t.getNextSibling();
5419 break;
5420 }
5421 case PLUS:
5422 {
5423 TNode tmp48_AST_in = (TNode)_t;
5424 match(_t,PLUS);
5425 _t = _t.getNextSibling();
5426 break;
5427 }
5428 case MINUS:
5429 {
5430 TNode tmp49_AST_in = (TNode)_t;
5431 match(_t,MINUS);
5432 _t = _t.getNextSibling();
5433 break;
5434 }
5435 case STAR:
5436 {
5437 TNode tmp50_AST_in = (TNode)_t;
5438 match(_t,STAR);
5439 _t = _t.getNextSibling();
5440 break;
5441 }
5442 case DIV:
5443 {
5444 TNode tmp51_AST_in = (TNode)_t;
5445 match(_t,DIV);
5446 _t = _t.getNextSibling();
5447 break;
5448 }
5449 case MOD:
5450 {
5451 TNode tmp52_AST_in = (TNode)_t;
5452 match(_t,MOD);
5453 _t = _t.getNextSibling();
5454 break;
5455 }
5456 case NCommaExpr:
5457 {
5458 TNode tmp53_AST_in = (TNode)_t;
5459 match(_t,NCommaExpr);
5460 _t = _t.getNextSibling();
5461 break;
5462 }
5463 default:
5464 {
5465 throw new NoViableAltException(_t);
5466 }
5467 }
5468 }
5469 catch (RecognitionException ex) {
5470 if (inputState.guessing==0) {
5471 reportError(ex);
5472 if (_t!=null) {_t = _t.getNextSibling();}
5473 } else {
5474 throw ex;
5475 }
5476 }
5477 _retTree = _t;
5478 }
5479
5480 public final void unaryOperator(AST _t) throws RecognitionException {
5481
5482 TNode unaryOperator_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
5483
5484 try { // for error handling
5485 if (_t==null) _t=ASTNULL;
5486 switch ( _t.getType()) {
5487 case BAND:
5488 {
5489 TNode tmp54_AST_in = (TNode)_t;
5490 match(_t,BAND);
5491 _t = _t.getNextSibling();
5492 break;
5493 }
5494 case STAR:
5495 {
5496 TNode tmp55_AST_in = (TNode)_t;
5497 match(_t,STAR);
5498 _t = _t.getNextSibling();
5499 break;
5500 }
5501 case PLUS:
5502 {
5503 TNode tmp56_AST_in = (TNode)_t;
5504 match(_t,PLUS);
5505 _t = _t.getNextSibling();
5506 break;
5507 }
5508 case MINUS:
5509 {
5510 TNode tmp57_AST_in = (TNode)_t;
5511 match(_t,MINUS);
5512 _t = _t.getNextSibling();
5513 break;
5514 }
5515 case BNOT:
5516 {
5517 TNode tmp58_AST_in = (TNode)_t;
5518 match(_t,BNOT);
5519 _t = _t.getNextSibling();
5520 break;
5521 }
5522 case LNOT:
5523 {
5524 TNode tmp59_AST_in = (TNode)_t;
5525 match(_t,LNOT);
5526 _t = _t.getNextSibling();
5527 break;
5528 }
5529 case LAND:
5530 {
5531 TNode tmp60_AST_in = (TNode)_t;
5532 match(_t,LAND);
5533 _t = _t.getNextSibling();
5534 break;
5535 }
5536 case LITERAL___real:
5537 {
5538 TNode tmp61_AST_in = (TNode)_t;
5540 _t = _t.getNextSibling();
5541 break;
5542 }
5543 case LITERAL___imag:
5544 {
5545 TNode tmp62_AST_in = (TNode)_t;
5547 _t = _t.getNextSibling();
5548 break;
5549 }
5550 default:
5551 {
5552 throw new NoViableAltException(_t);
5553 }
5554 }
5555 }
5556 catch (RecognitionException ex) {
5557 if (inputState.guessing==0) {
5558 reportError(ex);
5559 if (_t!=null) {_t = _t.getNextSibling();}
5560 } else {
5561 throw ex;
5562 }
5563 }
5564 _retTree = _t;
5565 }
5566
5567 public final void argExprList(AST _t) throws RecognitionException {
5568
5569 TNode argExprList_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
5570
5571 try { // for error handling
5572 expr(_t);
5573 _t = _retTree;
5574 {
5575 _loop232:
5576 do {
5577 if (_t==null) _t=ASTNULL;
5578 if ((_tokenSet_3.member(_t.getType()))) {
5579 if ( inputState.guessing==0 ) {
5580 print( "," );
5581 }
5582 expr(_t);
5583 _t = _retTree;
5584 }
5585 else {
5586 break _loop232;
5587 }
5588
5589 } while (true);
5590 }
5591 }
5592 catch (RecognitionException ex) {
5593 if (inputState.guessing==0) {
5594 reportError(ex);
5595 if (_t!=null) {_t = _t.getNextSibling();}
5596 } else {
5597 throw ex;
5598 }
5599 }
5600 _retTree = _t;
5601 }
5602
5603 protected final void charConst(AST _t) throws RecognitionException {
5604
5605 TNode charConst_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
5606 TNode c = null;
5607
5608 try { // for error handling
5609 c = (TNode)_t;
5610 match(_t,CharLiteral);
5611 _t = _t.getNextSibling();
5612 if ( inputState.guessing==0 ) {
5613 print( c );
5614 }
5615 }
5616 catch (RecognitionException ex) {
5617 if (inputState.guessing==0) {
5618 reportError(ex);
5619 if (_t!=null) {_t = _t.getNextSibling();}
5620 } else {
5621 throw ex;
5622 }
5623 }
5624 _retTree = _t;
5625 }
5626
5627 protected final void intConst(AST _t) throws RecognitionException {
5628
5629 TNode intConst_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
5630
5631 try { // for error handling
5632 if (_t==null) _t=ASTNULL;
5633 switch ( _t.getType()) {
5634 case IntOctalConst:
5635 {
5636 TNode tmp63_AST_in = (TNode)_t;
5637 match(_t,IntOctalConst);
5638 _t = _t.getNextSibling();
5639 break;
5640 }
5641 case LongOctalConst:
5642 {
5643 TNode tmp64_AST_in = (TNode)_t;
5645 _t = _t.getNextSibling();
5646 break;
5647 }
5648 case UnsignedOctalConst:
5649 {
5650 TNode tmp65_AST_in = (TNode)_t;
5652 _t = _t.getNextSibling();
5653 break;
5654 }
5655 case IntIntConst:
5656 {
5657 TNode tmp66_AST_in = (TNode)_t;
5658 match(_t,IntIntConst);
5659 _t = _t.getNextSibling();
5660 break;
5661 }
5662 case LongIntConst:
5663 {
5664 TNode tmp67_AST_in = (TNode)_t;
5665 match(_t,LongIntConst);
5666 _t = _t.getNextSibling();
5667 break;
5668 }
5669 case UnsignedIntConst:
5670 {
5671 TNode tmp68_AST_in = (TNode)_t;
5673 _t = _t.getNextSibling();
5674 break;
5675 }
5676 case IntHexConst:
5677 {
5678 TNode tmp69_AST_in = (TNode)_t;
5679 match(_t,IntHexConst);
5680 _t = _t.getNextSibling();
5681 break;
5682 }
5683 case LongHexConst:
5684 {
5685 TNode tmp70_AST_in = (TNode)_t;
5686 match(_t,LongHexConst);
5687 _t = _t.getNextSibling();
5688 break;
5689 }
5690 case UnsignedHexConst:
5691 {
5692 TNode tmp71_AST_in = (TNode)_t;
5694 _t = _t.getNextSibling();
5695 break;
5696 }
5697 default:
5698 {
5699 throw new NoViableAltException(_t);
5700 }
5701 }
5702 }
5703 catch (RecognitionException ex) {
5704 if (inputState.guessing==0) {
5705 reportError(ex);
5706 if (_t!=null) {_t = _t.getNextSibling();}
5707 } else {
5708 throw ex;
5709 }
5710 }
5711 _retTree = _t;
5712 }
5713
5714 protected final void floatConst(AST _t) throws RecognitionException {
5715
5716 TNode floatConst_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
5717
5718 try { // for error handling
5719 if (_t==null) _t=ASTNULL;
5720 switch ( _t.getType()) {
5721 case FloatDoubleConst:
5722 {
5723 TNode tmp72_AST_in = (TNode)_t;
5725 _t = _t.getNextSibling();
5726 break;
5727 }
5728 case DoubleDoubleConst:
5729 {
5730 TNode tmp73_AST_in = (TNode)_t;
5732 _t = _t.getNextSibling();
5733 break;
5734 }
5735 case LongDoubleConst:
5736 {
5737 TNode tmp74_AST_in = (TNode)_t;
5739 _t = _t.getNextSibling();
5740 break;
5741 }
5742 default:
5743 {
5744 throw new NoViableAltException(_t);
5745 }
5746 }
5747 }
5748 catch (RecognitionException ex) {
5749 if (inputState.guessing==0) {
5750 reportError(ex);
5751 if (_t!=null) {_t = _t.getNextSibling();}
5752 } else {
5753 throw ex;
5754 }
5755 }
5756 _retTree = _t;
5757 }
5758
5759 public final void commaExpr(AST _t) throws RecognitionException {
5760
5761 TNode commaExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
5762
5763 try { // for error handling
5764 AST __t241 = _t;
5765 TNode tmp75_AST_in = (TNode)_t;
5766 match(_t,NCommaExpr);
5767 _t = _t.getFirstChild();
5768 expr(_t);
5769 _t = _retTree;
5770 expr(_t);
5771 _t = _retTree;
5772 _t = __t241;
5773 _t = _t.getNextSibling();
5774 }
5775 catch (RecognitionException ex) {
5776 if (inputState.guessing==0) {
5777 reportError(ex);
5778 if (_t!=null) {_t = _t.getNextSibling();}
5779 } else {
5780 throw ex;
5781 }
5782 }
5783 _retTree = _t;
5784 }
5785
5786 public final void assignExpr(AST _t) throws RecognitionException {
5787
5788 TNode assignExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
5789
5790 try { // for error handling
5791 if (_t==null) _t=ASTNULL;
5792 switch ( _t.getType()) {
5793 case ASSIGN:
5794 {
5795 AST __t243 = _t;
5796 TNode tmp76_AST_in = (TNode)_t;
5797 match(_t,ASSIGN);
5798 _t = _t.getFirstChild();
5799 expr(_t);
5800 _t = _retTree;
5801 expr(_t);
5802 _t = _retTree;
5803 _t = __t243;
5804 _t = _t.getNextSibling();
5805 break;
5806 }
5807 case DIV_ASSIGN:
5808 {
5809 AST __t244 = _t;
5810 TNode tmp77_AST_in = (TNode)_t;
5811 match(_t,DIV_ASSIGN);
5812 _t = _t.getFirstChild();
5813 expr(_t);
5814 _t = _retTree;
5815 expr(_t);
5816 _t = _retTree;
5817 _t = __t244;
5818 _t = _t.getNextSibling();
5819 break;
5820 }
5821 case PLUS_ASSIGN:
5822 {
5823 AST __t245 = _t;
5824 TNode tmp78_AST_in = (TNode)_t;
5825 match(_t,PLUS_ASSIGN);
5826 _t = _t.getFirstChild();
5827 expr(_t);
5828 _t = _retTree;
5829 expr(_t);
5830 _t = _retTree;
5831 _t = __t245;
5832 _t = _t.getNextSibling();
5833 break;
5834 }
5835 case MINUS_ASSIGN:
5836 {
5837 AST __t246 = _t;
5838 TNode tmp79_AST_in = (TNode)_t;
5839 match(_t,MINUS_ASSIGN);
5840 _t = _t.getFirstChild();
5841 expr(_t);
5842 _t = _retTree;
5843 expr(_t);
5844 _t = _retTree;
5845 _t = __t246;
5846 _t = _t.getNextSibling();
5847 break;
5848 }
5849 case STAR_ASSIGN:
5850 {
5851 AST __t247 = _t;
5852 TNode tmp80_AST_in = (TNode)_t;
5853 match(_t,STAR_ASSIGN);
5854 _t = _t.getFirstChild();
5855 expr(_t);
5856 _t = _retTree;
5857 expr(_t);
5858 _t = _retTree;
5859 _t = __t247;
5860 _t = _t.getNextSibling();
5861 break;
5862 }
5863 case MOD_ASSIGN:
5864 {
5865 AST __t248 = _t;
5866 TNode tmp81_AST_in = (TNode)_t;
5867 match(_t,MOD_ASSIGN);
5868 _t = _t.getFirstChild();
5869 expr(_t);
5870 _t = _retTree;
5871 expr(_t);
5872 _t = _retTree;
5873 _t = __t248;
5874 _t = _t.getNextSibling();
5875 break;
5876 }
5877 case RSHIFT_ASSIGN:
5878 {
5879 AST __t249 = _t;
5880 TNode tmp82_AST_in = (TNode)_t;
5881 match(_t,RSHIFT_ASSIGN);
5882 _t = _t.getFirstChild();
5883 expr(_t);
5884 _t = _retTree;
5885 expr(_t);
5886 _t = _retTree;
5887 _t = __t249;
5888 _t = _t.getNextSibling();
5889 break;
5890 }
5891 case LSHIFT_ASSIGN:
5892 {
5893 AST __t250 = _t;
5894 TNode tmp83_AST_in = (TNode)_t;
5895 match(_t,LSHIFT_ASSIGN);
5896 _t = _t.getFirstChild();
5897 expr(_t);
5898 _t = _retTree;
5899 expr(_t);
5900 _t = _retTree;
5901 _t = __t250;
5902 _t = _t.getNextSibling();
5903 break;
5904 }
5905 case BAND_ASSIGN:
5906 {
5907 AST __t251 = _t;
5908 TNode tmp84_AST_in = (TNode)_t;
5909 match(_t,BAND_ASSIGN);
5910 _t = _t.getFirstChild();
5911 expr(_t);
5912 _t = _retTree;
5913 expr(_t);
5914 _t = _retTree;
5915 _t = __t251;
5916 _t = _t.getNextSibling();
5917 break;
5918 }
5919 case BOR_ASSIGN:
5920 {
5921 AST __t252 = _t;
5922 TNode tmp85_AST_in = (TNode)_t;
5923 match(_t,BOR_ASSIGN);
5924 _t = _t.getFirstChild();
5925 expr(_t);
5926 _t = _retTree;
5927 expr(_t);
5928 _t = _retTree;
5929 _t = __t252;
5930 _t = _t.getNextSibling();
5931 break;
5932 }
5933 case BXOR_ASSIGN:
5934 {
5935 AST __t253 = _t;
5936 TNode tmp86_AST_in = (TNode)_t;
5937 match(_t,BXOR_ASSIGN);
5938 _t = _t.getFirstChild();
5939 expr(_t);
5940 _t = _retTree;
5941 expr(_t);
5942 _t = _retTree;
5943 _t = __t253;
5944 _t = _t.getNextSibling();
5945 break;
5946 }
5947 default:
5948 {
5949 throw new NoViableAltException(_t);
5950 }
5951 }
5952 }
5953 catch (RecognitionException ex) {
5954 if (inputState.guessing==0) {
5955 reportError(ex);
5956 if (_t!=null) {_t = _t.getNextSibling();}
5957 } else {
5958 throw ex;
5959 }
5960 }
5961 _retTree = _t;
5962 }
5963
5964 public final void logicalOrExpr(AST _t) throws RecognitionException {
5965
5966 TNode logicalOrExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
5967
5968 try { // for error handling
5969 AST __t255 = _t;
5970 TNode tmp87_AST_in = (TNode)_t;
5971 match(_t,LOR);
5972 _t = _t.getFirstChild();
5973 expr(_t);
5974 _t = _retTree;
5975 expr(_t);
5976 _t = _retTree;
5977 _t = __t255;
5978 _t = _t.getNextSibling();
5979 }
5980 catch (RecognitionException ex) {
5981 if (inputState.guessing==0) {
5982 reportError(ex);
5983 if (_t!=null) {_t = _t.getNextSibling();}
5984 } else {
5985 throw ex;
5986 }
5987 }
5988 _retTree = _t;
5989 }
5990
5991 public final void logicalAndExpr(AST _t) throws RecognitionException {
5992
5993 TNode logicalAndExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
5994
5995 try { // for error handling
5996 AST __t257 = _t;
5997 TNode tmp88_AST_in = (TNode)_t;
5998 match(_t,LAND);
5999 _t = _t.getFirstChild();
6000 expr(_t);
6001 _t = _retTree;
6002 expr(_t);
6003 _t = _retTree;
6004 _t = __t257;
6005 _t = _t.getNextSibling();
6006 }
6007 catch (RecognitionException ex) {
6008 if (inputState.guessing==0) {
6009 reportError(ex);
6010 if (_t!=null) {_t = _t.getNextSibling();}
6011 } else {
6012 throw ex;
6013 }
6014 }
6015 _retTree = _t;
6016 }
6017
6018 public final void inclusiveOrExpr(AST _t) throws RecognitionException {
6019
6020 TNode inclusiveOrExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
6021
6022 try { // for error handling
6023 AST __t259 = _t;
6024 TNode tmp89_AST_in = (TNode)_t;
6025 match(_t,BOR);
6026 _t = _t.getFirstChild();
6027 expr(_t);
6028 _t = _retTree;
6029 expr(_t);
6030 _t = _retTree;
6031 _t = __t259;
6032 _t = _t.getNextSibling();
6033 }
6034 catch (RecognitionException ex) {
6035 if (inputState.guessing==0) {
6036 reportError(ex);
6037 if (_t!=null) {_t = _t.getNextSibling();}
6038 } else {
6039 throw ex;
6040 }
6041 }
6042 _retTree = _t;
6043 }
6044
6045 public final void exclusiveOrExpr(AST _t) throws RecognitionException {
6046
6047 TNode exclusiveOrExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
6048
6049 try { // for error handling
6050 AST __t261 = _t;
6051 TNode tmp90_AST_in = (TNode)_t;
6052 match(_t,BXOR);
6053 _t = _t.getFirstChild();
6054 expr(_t);
6055 _t = _retTree;
6056 expr(_t);
6057 _t = _retTree;
6058 _t = __t261;
6059 _t = _t.getNextSibling();
6060 }
6061 catch (RecognitionException ex) {
6062 if (inputState.guessing==0) {
6063 reportError(ex);
6064 if (_t!=null) {_t = _t.getNextSibling();}
6065 } else {
6066 throw ex;
6067 }
6068 }
6069 _retTree = _t;
6070 }
6071
6072 public final void bitAndExpr(AST _t) throws RecognitionException {
6073
6074 TNode bitAndExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
6075
6076 try { // for error handling
6077 AST __t263 = _t;
6078 TNode tmp91_AST_in = (TNode)_t;
6079 match(_t,BAND);
6080 _t = _t.getFirstChild();
6081 expr(_t);
6082 _t = _retTree;
6083 expr(_t);
6084 _t = _retTree;
6085 _t = __t263;
6086 _t = _t.getNextSibling();
6087 }
6088 catch (RecognitionException ex) {
6089 if (inputState.guessing==0) {
6090 reportError(ex);
6091 if (_t!=null) {_t = _t.getNextSibling();}
6092 } else {
6093 throw ex;
6094 }
6095 }
6096 _retTree = _t;
6097 }
6098
6099 public final void equalityExpr(AST _t) throws RecognitionException {
6100
6101 TNode equalityExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
6102
6103 try { // for error handling
6104 if (_t==null) _t=ASTNULL;
6105 switch ( _t.getType()) {
6106 case EQUAL:
6107 {
6108 AST __t265 = _t;
6109 TNode tmp92_AST_in = (TNode)_t;
6110 match(_t,EQUAL);
6111 _t = _t.getFirstChild();
6112 expr(_t);
6113 _t = _retTree;
6114 expr(_t);
6115 _t = _retTree;
6116 _t = __t265;
6117 _t = _t.getNextSibling();
6118 break;
6119 }
6120 case NOT_EQUAL:
6121 {
6122 AST __t266 = _t;
6123 TNode tmp93_AST_in = (TNode)_t;
6124 match(_t,NOT_EQUAL);
6125 _t = _t.getFirstChild();
6126 expr(_t);
6127 _t = _retTree;
6128 expr(_t);
6129 _t = _retTree;
6130 _t = __t266;
6131 _t = _t.getNextSibling();
6132 break;
6133 }
6134 default:
6135 {
6136 throw new NoViableAltException(_t);
6137 }
6138 }
6139 }
6140 catch (RecognitionException ex) {
6141 if (inputState.guessing==0) {
6142 reportError(ex);
6143 if (_t!=null) {_t = _t.getNextSibling();}
6144 } else {
6145 throw ex;
6146 }
6147 }
6148 _retTree = _t;
6149 }
6150
6151 public final void relationalExpr(AST _t) throws RecognitionException {
6152
6153 TNode relationalExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
6154
6155 try { // for error handling
6156 if (_t==null) _t=ASTNULL;
6157 switch ( _t.getType()) {
6158 case LT:
6159 {
6160 AST __t268 = _t;
6161 TNode tmp94_AST_in = (TNode)_t;
6162 match(_t,LT);
6163 _t = _t.getFirstChild();
6164 expr(_t);
6165 _t = _retTree;
6166 expr(_t);
6167 _t = _retTree;
6168 _t = __t268;
6169 _t = _t.getNextSibling();
6170 break;
6171 }
6172 case LTE:
6173 {
6174 AST __t269 = _t;
6175 TNode tmp95_AST_in = (TNode)_t;
6176 match(_t,LTE);
6177 _t = _t.getFirstChild();
6178 expr(_t);
6179 _t = _retTree;
6180 expr(_t);
6181 _t = _retTree;
6182 _t = __t269;
6183 _t = _t.getNextSibling();
6184 break;
6185 }
6186 case GT:
6187 {
6188 AST __t270 = _t;
6189 TNode tmp96_AST_in = (TNode)_t;
6190 match(_t,GT);
6191 _t = _t.getFirstChild();
6192 expr(_t);
6193 _t = _retTree;
6194 expr(_t);
6195 _t = _retTree;
6196 _t = __t270;
6197 _t = _t.getNextSibling();
6198 break;
6199 }
6200 case GTE:
6201 {
6202 AST __t271 = _t;
6203 TNode tmp97_AST_in = (TNode)_t;
6204 match(_t,GTE);
6205 _t = _t.getFirstChild();
6206 expr(_t);
6207 _t = _retTree;
6208 expr(_t);
6209 _t = _retTree;
6210 _t = __t271;
6211 _t = _t.getNextSibling();
6212 break;
6213 }
6214 default:
6215 {
6216 throw new NoViableAltException(_t);
6217 }
6218 }
6219 }
6220 catch (RecognitionException ex) {
6221 if (inputState.guessing==0) {
6222 reportError(ex);
6223 if (_t!=null) {_t = _t.getNextSibling();}
6224 } else {
6225 throw ex;
6226 }
6227 }
6228 _retTree = _t;
6229 }
6230
6231 public final void shiftExpr(AST _t) throws RecognitionException {
6232
6233 TNode shiftExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
6234
6235 try { // for error handling
6236 if (_t==null) _t=ASTNULL;
6237 switch ( _t.getType()) {
6238 case LSHIFT:
6239 {
6240 AST __t273 = _t;
6241 TNode tmp98_AST_in = (TNode)_t;
6242 match(_t,LSHIFT);
6243 _t = _t.getFirstChild();
6244 expr(_t);
6245 _t = _retTree;
6246 expr(_t);
6247 _t = _retTree;
6248 _t = __t273;
6249 _t = _t.getNextSibling();
6250 break;
6251 }
6252 case RSHIFT:
6253 {
6254 AST __t274 = _t;
6255 TNode tmp99_AST_in = (TNode)_t;
6256 match(_t,RSHIFT);
6257 _t = _t.getFirstChild();
6258 expr(_t);
6259 _t = _retTree;
6260 expr(_t);
6261 _t = _retTree;
6262 _t = __t274;
6263 _t = _t.getNextSibling();
6264 break;
6265 }
6266 default:
6267 {
6268 throw new NoViableAltException(_t);
6269 }
6270 }
6271 }
6272 catch (RecognitionException ex) {
6273 if (inputState.guessing==0) {
6274 reportError(ex);
6275 if (_t!=null) {_t = _t.getNextSibling();}
6276 } else {
6277 throw ex;
6278 }
6279 }
6280 _retTree = _t;
6281 }
6282
6283 public final void additiveExpr(AST _t) throws RecognitionException {
6284
6285 TNode additiveExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
6286
6287 try { // for error handling
6288 if (_t==null) _t=ASTNULL;
6289 switch ( _t.getType()) {
6290 case PLUS:
6291 {
6292 AST __t276 = _t;
6293 TNode tmp100_AST_in = (TNode)_t;
6294 match(_t,PLUS);
6295 _t = _t.getFirstChild();
6296 expr(_t);
6297 _t = _retTree;
6298 expr(_t);
6299 _t = _retTree;
6300 _t = __t276;
6301 _t = _t.getNextSibling();
6302 break;
6303 }
6304 case MINUS:
6305 {
6306 AST __t277 = _t;
6307 TNode tmp101_AST_in = (TNode)_t;
6308 match(_t,MINUS);
6309 _t = _t.getFirstChild();
6310 expr(_t);
6311 _t = _retTree;
6312 expr(_t);
6313 _t = _retTree;
6314 _t = __t277;
6315 _t = _t.getNextSibling();
6316 break;
6317 }
6318 default:
6319 {
6320 throw new NoViableAltException(_t);
6321 }
6322 }
6323 }
6324 catch (RecognitionException ex) {
6325 if (inputState.guessing==0) {
6326 reportError(ex);
6327 if (_t!=null) {_t = _t.getNextSibling();}
6328 } else {
6329 throw ex;
6330 }
6331 }
6332 _retTree = _t;
6333 }
6334
6335 public final void multExpr(AST _t) throws RecognitionException {
6336
6337 TNode multExpr_AST_in = (_t == ASTNULL) ? null : (TNode)_t;
6338
6339 try { // for error handling
6340 if (_t==null) _t=ASTNULL;
6341 switch ( _t.getType()) {
6342 case STAR:
6343 {
6344 AST __t279 = _t;
6345 TNode tmp102_AST_in = (TNode)_t;
6346 match(_t,STAR);
6347 _t = _t.getFirstChild();
6348 expr(_t);
6349 _t = _retTree;
6350 expr(_t);
6351 _t = _retTree;
6352 _t = __t279;
6353 _t = _t.getNextSibling();
6354 break;
6355 }
6356 case DIV:
6357 {
6358 AST __t280 = _t;
6359 TNode tmp103_AST_in = (TNode)_t;
6360 match(_t,DIV);
6361 _t = _t.getFirstChild();
6362 expr(_t);
6363 _t = _retTree;
6364 expr(_t);
6365 _t = _retTree;
6366 _t = __t280;
6367 _t = _t.getNextSibling();
6368 break;
6369 }
6370 case MOD:
6371 {
6372 AST __t281 = _t;
6373 TNode tmp104_AST_in = (TNode)_t;
6374 match(_t,MOD);
6375 _t = _t.getFirstChild();
6376 expr(_t);
6377 _t = _retTree;
6378 expr(_t);
6379 _t = _retTree;
6380 _t = __t281;
6381 _t = _t.getNextSibling();
6382 break;
6383 }
6384 default:
6385 {
6386 throw new NoViableAltException(_t);
6387 }
6388 }
6389 }
6390 catch (RecognitionException ex) {
6391 if (inputState.guessing==0) {
6392 reportError(ex);
6393 if (_t!=null) {_t = _t.getNextSibling();}
6394 } else {
6395 throw ex;
6396 }
6397 }
6398 _retTree = _t;
6399 }
6400
6401
6402 public static final String[] _tokenNames = {
6403 "<0>",
6404 "EOF",
6405 "<2>",
6406 "NULL_TREE_LOOKAHEAD",
6407 "\"typedef\"",
6408 "\"asm\"",
6409 "\"volatile\"",
6410 "LCURLY",
6411 "RCURLY",
6412 "SEMI",
6413 "\"struct\"",
6414 "\"union\"",
6415 "\"enum\"",
6416 "\"auto\"",
6417 "\"register\"",
6418 "\"extern\"",
6419 "\"static\"",
6420 "\"const\"",
6421 "\"void\"",
6422 "\"char\"",
6423 "\"short\"",
6424 "\"int\"",
6425 "\"long\"",
6426 "\"float\"",
6427 "\"double\"",
6428 "\"signed\"",
6429 "\"unsigned\"",
6430 "\"int8_t\"",
6431 "\"uint8_t\"",
6432 "\"int16_t\"",
6433 "\"uint16_t\"",
6434 "\"__int32\"",
6435 "\"int32_t\"",
6436 "\"wchar_t\"",
6437 "\"uint32_t\"",
6438 "\"__int64\"",
6439 "\"int64_t\"",
6440 "\"uint64_t\"",
6441 "\"ptrdiff_t\"",
6442 "\"intptr_t\"",
6443 "\"size_t\"",
6444 "\"uintptr_t\"",
6445 "ID",
6446 "COMMA",
6447 "COLON",
6448 "ASSIGN",
6449 "STAR",
6450 "LPAREN",
6451 "RPAREN",
6452 "LBRACKET",
6453 "RBRACKET",
6454 "VARARGS",
6455 "\"while\"",
6456 "\"do\"",
6457 "\"for\"",
6458 "\"goto\"",
6459 "\"continue\"",
6460 "\"break\"",
6461 "\"return\"",
6462 "\"case\"",
6463 "\"default\"",
6464 "\"if\"",
6465 "\"else\"",
6466 "\"switch\"",
6467 "DIV_ASSIGN",
6468 "PLUS_ASSIGN",
6469 "MINUS_ASSIGN",
6470 "STAR_ASSIGN",
6471 "MOD_ASSIGN",
6472 "RSHIFT_ASSIGN",
6473 "LSHIFT_ASSIGN",
6474 "BAND_ASSIGN",
6475 "BOR_ASSIGN",
6476 "BXOR_ASSIGN",
6477 "QUESTION",
6478 "LOR",
6479 "LAND",
6480 "BOR",
6481 "BXOR",
6482 "BAND",
6483 "EQUAL",
6484 "NOT_EQUAL",
6485 "LT",
6486 "LTE",
6487 "GT",
6488 "GTE",
6489 "LSHIFT",
6490 "RSHIFT",
6491 "PLUS",
6492 "MINUS",
6493 "DIV",
6494 "MOD",
6495 "INC",
6496 "DEC",
6497 "\"sizeof\"",
6498 "BNOT",
6499 "LNOT",
6500 "PTR",
6501 "DOT",
6502 "CharLiteral",
6503 "StringLiteral",
6504 "IntOctalConst",
6505 "LongOctalConst",
6506 "UnsignedOctalConst",
6507 "IntIntConst",
6508 "LongIntConst",
6509 "UnsignedIntConst",
6510 "IntHexConst",
6511 "LongHexConst",
6512 "UnsignedHexConst",
6513 "FloatDoubleConst",
6514 "DoubleDoubleConst",
6515 "LongDoubleConst",
6516 "NTypedefName",
6517 "NInitDecl",
6518 "NDeclarator",
6519 "NStructDeclarator",
6520 "NDeclaration",
6521 "NCast",
6522 "NPointerGroup",
6523 "NExpressionGroup",
6524 "NFunctionCallArgs",
6525 "NNonemptyAbstractDeclarator",
6526 "NInitializer",
6527 "NStatementExpr",
6528 "NEmptyExpression",
6529 "NParameterTypeList",
6530 "NFunctionDef",
6531 "NCompoundStatement",
6532 "NParameterDeclaration",
6533 "NCommaExpr",
6534 "NUnaryExpr",
6535 "NLabel",
6536 "NPostfixExpr",
6537 "NRangeExpr",
6538 "NStringSeq",
6539 "NInitializerElementLabel",
6540 "NLcurlyInitializer",
6541 "NAsmAttribute",
6542 "NGnuAsmExpr",
6543 "NTypeMissing",
6544 "Vocabulary",
6545 "Whitespace",
6546 "Comment",
6547 "CPPComment",
6548 "NonWhitespace",
6549 "a line directive",
6550 "DefineExpr",
6551 "DefineExpr2",
6552 "Space",
6553 "LineDirective",
6554 "BadStringLiteral",
6555 "Escape",
6556 "Digit",
6557 "LongSuffix",
6558 "UnsignedSuffix",
6559 "FloatSuffix",
6560 "Exponent",
6561 "Number",
6562 "\"__label__\"",
6563 "\"inline\"",
6564 "\"typeof\"",
6565 "\"__complex\"",
6566 "\"__attribute\"",
6567 "\"__alignof\"",
6568 "\"__real\"",
6569 "\"__imag\""
6570 };
6571
6572 private static final long[] mk_tokenSet_0() {
6573 long[] data = { 544L, -9214364837600034816L, 4096L, 0L, 0L, 0L};
6574 return data;
6575 }
6576 public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
6577 private static final long[] mk_tokenSet_1() {
6578 long[] data = { 134093888L, 562949953421312L, 25769803776L, 0L, 0L, 0L};
6579 return data;
6580 }
6581 public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
6582 private static final long[] mk_tokenSet_2() {
6583 long[] data = { -4616189618054757888L, 1152921504606846976L, 17L, 0L, 0L, 0L};
6584 return data;
6585 }
6586 public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
6587 private static final long[] mk_tokenSet_3() {
6588 long[] data = { 250688651132928L, 2972375790571749375L, 69793221356L, 0L, 0L, 0L};
6589 return data;
6590 }
6591 public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
6592 }
6593
final void nonemptyAbstractDeclarator(AST _t)
final void initializerElementLabel(AST _t)
GnuCEmitter(PreprocessorInfoChannel preprocChannel)
final void storageClassSpecifier(AST _t)
void reportError(MismatchedTokenException ex)
final void functionStorageClassSpecifier(AST _t)
void traceIn(String rname, AST t)
void reportError(NoViableAltException ex)
void traceOut(String rname, AST t)
void reportError(RecognitionException ex)
Vector< Object > extractLinesPrecedingTokenNumber(final Integer toknum)
Class TNode is an implementation of the AST interface and adds many useful features:
Definition: TNode.java:38
static void printTree(final AST t)
print given tree to System.out
Definition: TNode.java:424