3 package com.jogamp.gluegen.cgram;
7 import antlr.CommonAST;
8 import antlr.DumpASTVisitor;
10import antlr.TokenBuffer;
11import antlr.TokenStreamException;
12import antlr.TokenStreamIOException;
13import antlr.ANTLRException;
14import antlr.LLkParser;
16import antlr.TokenStream;
17import antlr.RecognitionException;
18import antlr.NoViableAltException;
19import antlr.MismatchedTokenException;
20import antlr.SemanticException;
21import antlr.ParserSharedInputState;
22import antlr.collections.impl.BitSet;
23import antlr.collections.AST;
24import java.util.Hashtable;
25import antlr.ASTFactory;
27import antlr.collections.impl.ASTArray;
42 boolean returnValue =
false;
44 for (; node !=
null; node = (
TNode) node.getNextSibling() ) {
73 this.debugging = debug;
79 System.err.println(
"ANTLR Parsing Error: "+ex +
" token name:" + tokenNames[LA(1)]);
80 ex.printStackTrace(System.err);
82 catch (TokenStreamException e) {
83 System.err.println(
"ANTLR Parsing Error: "+ex);
84 ex.printStackTrace(System.err);
88 System.err.println(
"ANTLR Parsing Error from String: " + s);
91 System.err.println(
"ANTLR Parsing Warning from String: " + s);
93 public void match(
int t)
throws MismatchedTokenException {
95 for (
int x=0; x<traceDepth; x++) System.out.print(
" ");
97 System.out.println(
"Match("+tokenNames[t]+
") with LA(1)="+
98 tokenNames[LA(1)] + ((inputState.guessing>0)?
" [inputState.guessing "+ inputState.guessing +
"]":
""));
100 catch (TokenStreamException e) {
101 System.out.println(
"Match("+tokenNames[t]+
") " + ((inputState.guessing>0)?
" [inputState.guessing "+ inputState.guessing +
"]":
""));
109 for (
int x=0; x<traceDepth; x++) System.out.print(
" ");
110 System.out.println(
"token mismatch: "+tokenNames[LA(1)]
111 +
"!="+tokenNames[t]);
113 throw new MismatchedTokenException(tokenNames,
LT(1), t,
false, getFilename());
120 catch (TokenStreamException e) {
126 for (
int x=0; x<traceDepth; x++) System.out.print(
" ");
128 System.out.println(
"> "+rname+
"; LA(1)==("+ tokenNames[
LT(1).getType()]
129 +
") " +
LT(1).getText() +
" [inputState.guessing "+ inputState.guessing +
"]");
131 catch (TokenStreamException e) {
135 for (
int x=0; x<traceDepth; x++) System.out.print(
" ");
137 System.out.println(
"< "+rname+
"; LA(1)==("+ tokenNames[
LT(1).getType()]
138 +
") "+
LT(1).getText() +
" [inputState.guessing "+ inputState.guessing +
"]");
140 catch (TokenStreamException e) {
150 astFactory =
new ASTFactory(getTokenTypeToASTClassMap());
161 astFactory =
new ASTFactory(getTokenTypeToASTClassMap());
172 astFactory =
new ASTFactory(getTokenTypeToASTClassMap());
175 public final void translationUnit() throws RecognitionException, TokenStreamException {
178 ASTPair currentAST =
new ASTPair();
179 TNode translationUnit_AST =
null;
223 astFactory.addASTChild(currentAST, returnAST);
224 translationUnit_AST = (
TNode)currentAST.root;
229 if ( inputState.guessing==0 ) {
231 System.err.println (
"Empty source file!" );
234 translationUnit_AST = (
TNode)currentAST.root;
239 throw new NoViableAltException(
LT(1), getFilename());
243 catch (RecognitionException ex) {
244 if (inputState.guessing==0) {
251 returnAST = translationUnit_AST;
254 public final void externalList() throws RecognitionException, TokenStreamException {
257 ASTPair currentAST =
new ASTPair();
258 TNode externalList_AST =
null;
267 astFactory.addASTChild(currentAST, returnAST);
270 if ( _cnt4>=1 ) {
break _loop4; }
else {
throw new NoViableAltException(
LT(1), getFilename());}
276 externalList_AST = (
TNode)currentAST.root;
278 catch (RecognitionException ex) {
279 if (inputState.guessing==0) {
286 returnAST = externalList_AST;
289 public final void externalDef() throws RecognitionException, TokenStreamException {
292 ASTPair currentAST =
new ASTPair();
293 TNode externalDef_AST =
null;
296 boolean synPredMatched7 =
false;
299 synPredMatched7 =
true;
300 inputState.guessing++;
310 throw new NoViableAltException(
LT(1), getFilename());
315 catch (RecognitionException pe) {
316 synPredMatched7 =
false;
319inputState.guessing--;
321 if ( synPredMatched7 ) {
323 astFactory.addASTChild(currentAST, returnAST);
324 externalDef_AST = (
TNode)currentAST.root;
328 astFactory.addASTChild(currentAST, returnAST);
329 externalDef_AST = (
TNode)currentAST.root;
333 astFactory.addASTChild(currentAST, returnAST);
334 externalDef_AST = (
TNode)currentAST.root;
337 throw new NoViableAltException(
LT(1), getFilename());
341 catch (RecognitionException ex) {
342 if (inputState.guessing==0) {
349 returnAST = externalDef_AST;
352 public final void declaration() throws RecognitionException, TokenStreamException {
355 ASTPair currentAST =
new ASTPair();
356 TNode declaration_AST =
null;
362 ds_AST = (
TNode)returnAST;
363 astFactory.addASTChild(currentAST, returnAST);
364 if ( inputState.guessing==0 ) {
365 ds1 = astFactory.dupList(ds_AST);
374 astFactory.addASTChild(currentAST, returnAST);
383 throw new NoViableAltException(
LT(1), getFilename());
388 if ( inputState.guessing==0 ) {
389 declaration_AST = (
TNode)currentAST.root;
390 declaration_AST = (
TNode)astFactory.make( (
new ASTArray(2)).add((
TNode)astFactory.create(
NDeclaration)).add(declaration_AST));
391 currentAST.root = declaration_AST;
392 currentAST.child = declaration_AST!=
null &&declaration_AST.getFirstChild()!=
null ?
393 declaration_AST.getFirstChild() : declaration_AST;
394 currentAST.advanceChildToEnd();
396 declaration_AST = (
TNode)currentAST.root;
398 catch (RecognitionException ex) {
399 if (inputState.guessing==0) {
406 returnAST = declaration_AST;
409 public final void functionDef() throws RecognitionException, TokenStreamException {
412 ASTPair currentAST =
new ASTPair();
413 TNode functionDef_AST =
null;
420 boolean synPredMatched94 =
false;
423 synPredMatched94 =
true;
424 inputState.guessing++;
430 catch (RecognitionException pe) {
431 synPredMatched94 =
false;
434inputState.guessing--;
436 if ( synPredMatched94 ) {
438 ds_AST = (
TNode)returnAST;
439 astFactory.addASTChild(currentAST, returnAST);
444 throw new NoViableAltException(
LT(1), getFilename());
449 d_AST = (
TNode)returnAST;
450 astFactory.addASTChild(currentAST, returnAST);
451 if ( inputState.guessing==0 ) {
454 d2 = astFactory.dupList(d_AST);
455 ds2 = astFactory.dupList(ds_AST);
456 symbolTable.
add(declName, (
TNode)astFactory.make( (
new ASTArray(3)).add(
null).add(ds2).add(d2)));
465 astFactory.addASTChild(currentAST, returnAST);
477 TNode tmp2_AST =
null;
478 tmp2_AST = (
TNode)astFactory.create(
LT(1));
479 astFactory.addASTChild(currentAST, tmp2_AST);
490 throw new NoViableAltException(
LT(1), getFilename());
506 if ( inputState.guessing==0 ) {
510 astFactory.addASTChild(currentAST, returnAST);
511 if ( inputState.guessing==0 ) {
512 functionDef_AST = (
TNode)currentAST.root;
513 functionDef_AST = (
TNode)astFactory.make( (
new ASTArray(2)).add((
TNode)astFactory.create(
NFunctionDef)).add(functionDef_AST));
514 currentAST.root = functionDef_AST;
515 currentAST.child = functionDef_AST!=
null &&functionDef_AST.getFirstChild()!=
null ?
516 functionDef_AST.getFirstChild() : functionDef_AST;
517 currentAST.advanceChildToEnd();
519 functionDef_AST = (
TNode)currentAST.root;
521 catch (RecognitionException ex) {
522 if (inputState.guessing==0) {
529 returnAST = functionDef_AST;
532 public final void asm_expr() throws RecognitionException, TokenStreamException {
535 ASTPair currentAST =
new ASTPair();
536 TNode asm_expr_AST =
null;
539 TNode tmp4_AST =
null;
540 tmp4_AST = (
TNode)astFactory.create(
LT(1));
541 astFactory.makeASTRoot(currentAST, tmp4_AST);
547 TNode tmp5_AST =
null;
548 tmp5_AST = (
TNode)astFactory.create(
LT(1));
549 astFactory.addASTChild(currentAST, tmp5_AST);
559 throw new NoViableAltException(
LT(1), getFilename());
565 astFactory.addASTChild(currentAST, returnAST);
568 asm_expr_AST = (
TNode)currentAST.root;
570 catch (RecognitionException ex) {
571 if (inputState.guessing==0) {
578 returnAST = asm_expr_AST;
581 public final void expr() throws RecognitionException, TokenStreamException {
584 ASTPair currentAST =
new ASTPair();
585 TNode expr_AST =
null;
591 astFactory.addASTChild(currentAST, returnAST);
597 c_AST = (
TNode)astFactory.create(c);
598 astFactory.makeASTRoot(currentAST, c_AST);
600 if ( inputState.guessing==0 ) {
604 astFactory.addASTChild(currentAST, returnAST);
612 expr_AST = (
TNode)currentAST.root;
614 catch (RecognitionException ex) {
615 if (inputState.guessing==0) {
622 returnAST = expr_AST;
625 public final void declSpecifiers() throws RecognitionException, TokenStreamException {
628 ASTPair currentAST =
new ASTPair();
629 TNode declSpecifiers_AST =
null;
646 s_AST = (
TNode)returnAST;
647 astFactory.addASTChild(currentAST, returnAST);
654 astFactory.addASTChild(currentAST, returnAST);
658 boolean synPredMatched15 =
false;
661 synPredMatched15 =
true;
662 inputState.guessing++;
678 throw new NoViableAltException(
LT(1), getFilename());
683 catch (RecognitionException pe) {
684 synPredMatched15 =
false;
687inputState.guessing--;
689 if ( synPredMatched15 ) {
691 astFactory.addASTChild(currentAST, returnAST);
694 if ( _cnt16>=1 ) {
break _loop16; }
else {
throw new NoViableAltException(
LT(1), getFilename());}
700 declSpecifiers_AST = (
TNode)currentAST.root;
702 catch (RecognitionException ex) {
703 if (inputState.guessing==0) {
710 returnAST = declSpecifiers_AST;
714 AST declarationSpecifiers
715 )
throws RecognitionException, TokenStreamException {
718 ASTPair currentAST =
new ASTPair();
719 TNode initDeclList_AST =
null;
723 astFactory.addASTChild(currentAST, returnAST);
727 if ((LA(1)==
COMMA)) {
730 astFactory.addASTChild(currentAST, returnAST);
738 initDeclList_AST = (
TNode)currentAST.root;
740 catch (RecognitionException ex) {
741 if (inputState.guessing==0) {
748 returnAST = initDeclList_AST;
754 ASTPair currentAST =
new ASTPair();
755 TNode storageClassSpecifier_AST =
null;
761 TNode tmp10_AST =
null;
762 tmp10_AST = (
TNode)astFactory.create(
LT(1));
763 astFactory.addASTChild(currentAST, tmp10_AST);
765 storageClassSpecifier_AST = (
TNode)currentAST.root;
770 TNode tmp11_AST =
null;
771 tmp11_AST = (
TNode)astFactory.create(
LT(1));
772 astFactory.addASTChild(currentAST, tmp11_AST);
774 storageClassSpecifier_AST = (
TNode)currentAST.root;
779 TNode tmp12_AST =
null;
780 tmp12_AST = (
TNode)astFactory.create(
LT(1));
781 astFactory.addASTChild(currentAST, tmp12_AST);
783 storageClassSpecifier_AST = (
TNode)currentAST.root;
790 astFactory.addASTChild(currentAST, returnAST);
791 storageClassSpecifier_AST = (
TNode)currentAST.root;
796 throw new NoViableAltException(
LT(1), getFilename());
800 catch (RecognitionException ex) {
801 if (inputState.guessing==0) {
808 returnAST = storageClassSpecifier_AST;
811 public final void typeQualifier() throws RecognitionException, TokenStreamException {
814 ASTPair currentAST =
new ASTPair();
815 TNode typeQualifier_AST =
null;
821 TNode tmp13_AST =
null;
822 tmp13_AST = (
TNode)astFactory.create(
LT(1));
823 astFactory.addASTChild(currentAST, tmp13_AST);
825 typeQualifier_AST = (
TNode)currentAST.root;
830 TNode tmp14_AST =
null;
831 tmp14_AST = (
TNode)astFactory.create(
LT(1));
832 astFactory.addASTChild(currentAST, tmp14_AST);
834 typeQualifier_AST = (
TNode)currentAST.root;
839 throw new NoViableAltException(
LT(1), getFilename());
843 catch (RecognitionException ex) {
844 if (inputState.guessing==0) {
851 returnAST = typeQualifier_AST;
856 )
throws RecognitionException, TokenStreamException {
860 ASTPair currentAST =
new ASTPair();
861 TNode typeSpecifier_AST =
null;
862 retSpecCount = specCount + 1;
869 TNode tmp15_AST =
null;
870 tmp15_AST = (
TNode)astFactory.create(
LT(1));
871 astFactory.addASTChild(currentAST, tmp15_AST);
877 TNode tmp16_AST =
null;
878 tmp16_AST = (
TNode)astFactory.create(
LT(1));
879 astFactory.addASTChild(currentAST, tmp16_AST);
885 TNode tmp17_AST =
null;
886 tmp17_AST = (
TNode)astFactory.create(
LT(1));
887 astFactory.addASTChild(currentAST, tmp17_AST);
893 TNode tmp18_AST =
null;
894 tmp18_AST = (
TNode)astFactory.create(
LT(1));
895 astFactory.addASTChild(currentAST, tmp18_AST);
901 TNode tmp19_AST =
null;
902 tmp19_AST = (
TNode)astFactory.create(
LT(1));
903 astFactory.addASTChild(currentAST, tmp19_AST);
909 TNode tmp20_AST =
null;
910 tmp20_AST = (
TNode)astFactory.create(
LT(1));
911 astFactory.addASTChild(currentAST, tmp20_AST);
917 TNode tmp21_AST =
null;
918 tmp21_AST = (
TNode)astFactory.create(
LT(1));
919 astFactory.addASTChild(currentAST, tmp21_AST);
925 TNode tmp22_AST =
null;
926 tmp22_AST = (
TNode)astFactory.create(
LT(1));
927 astFactory.addASTChild(currentAST, tmp22_AST);
933 TNode tmp23_AST =
null;
934 tmp23_AST = (
TNode)astFactory.create(
LT(1));
935 astFactory.addASTChild(currentAST, tmp23_AST);
941 TNode tmp24_AST =
null;
942 tmp24_AST = (
TNode)astFactory.create(
LT(1));
943 astFactory.addASTChild(currentAST, tmp24_AST);
949 TNode tmp25_AST =
null;
950 tmp25_AST = (
TNode)astFactory.create(
LT(1));
951 astFactory.addASTChild(currentAST, tmp25_AST);
957 TNode tmp26_AST =
null;
958 tmp26_AST = (
TNode)astFactory.create(
LT(1));
959 astFactory.addASTChild(currentAST, tmp26_AST);
965 TNode tmp27_AST =
null;
966 tmp27_AST = (
TNode)astFactory.create(
LT(1));
967 astFactory.addASTChild(currentAST, tmp27_AST);
973 TNode tmp28_AST =
null;
974 tmp28_AST = (
TNode)astFactory.create(
LT(1));
975 astFactory.addASTChild(currentAST, tmp28_AST);
981 TNode tmp29_AST =
null;
982 tmp29_AST = (
TNode)astFactory.create(
LT(1));
983 astFactory.addASTChild(currentAST, tmp29_AST);
989 TNode tmp30_AST =
null;
990 tmp30_AST = (
TNode)astFactory.create(
LT(1));
991 astFactory.addASTChild(currentAST, tmp30_AST);
997 TNode tmp31_AST =
null;
998 tmp31_AST = (
TNode)astFactory.create(
LT(1));
999 astFactory.addASTChild(currentAST, tmp31_AST);
1005 TNode tmp32_AST =
null;
1006 tmp32_AST = (
TNode)astFactory.create(
LT(1));
1007 astFactory.addASTChild(currentAST, tmp32_AST);
1013 TNode tmp33_AST =
null;
1014 tmp33_AST = (
TNode)astFactory.create(
LT(1));
1015 astFactory.addASTChild(currentAST, tmp33_AST);
1021 TNode tmp34_AST =
null;
1022 tmp34_AST = (
TNode)astFactory.create(
LT(1));
1023 astFactory.addASTChild(currentAST, tmp34_AST);
1029 TNode tmp35_AST =
null;
1030 tmp35_AST = (
TNode)astFactory.create(
LT(1));
1031 astFactory.addASTChild(currentAST, tmp35_AST);
1037 TNode tmp36_AST =
null;
1038 tmp36_AST = (
TNode)astFactory.create(
LT(1));
1039 astFactory.addASTChild(currentAST, tmp36_AST);
1045 TNode tmp37_AST =
null;
1046 tmp37_AST = (
TNode)astFactory.create(
LT(1));
1047 astFactory.addASTChild(currentAST, tmp37_AST);
1053 TNode tmp38_AST =
null;
1054 tmp38_AST = (
TNode)astFactory.create(
LT(1));
1055 astFactory.addASTChild(currentAST, tmp38_AST);
1063 astFactory.addASTChild(currentAST, returnAST);
1069 astFactory.addASTChild(currentAST, returnAST);
1073 if (((LA(1)==
ID))&&( specCount == 0 )) {
1075 astFactory.addASTChild(currentAST, returnAST);
1078 throw new NoViableAltException(
LT(1), getFilename());
1082 typeSpecifier_AST = (
TNode)currentAST.root;
1084 catch (RecognitionException ex) {
1085 if (inputState.guessing==0) {
1092 returnAST = typeSpecifier_AST;
1093 return retSpecCount;
1099 ASTPair currentAST =
new ASTPair();
1100 TNode functionStorageClassSpecifier_AST =
null;
1106 TNode tmp39_AST =
null;
1107 tmp39_AST = (
TNode)astFactory.create(
LT(1));
1108 astFactory.addASTChild(currentAST, tmp39_AST);
1110 functionStorageClassSpecifier_AST = (
TNode)currentAST.root;
1115 TNode tmp40_AST =
null;
1116 tmp40_AST = (
TNode)astFactory.create(
LT(1));
1117 astFactory.addASTChild(currentAST, tmp40_AST);
1119 functionStorageClassSpecifier_AST = (
TNode)currentAST.root;
1124 throw new NoViableAltException(
LT(1), getFilename());
1128 catch (RecognitionException ex) {
1129 if (inputState.guessing==0) {
1136 returnAST = functionStorageClassSpecifier_AST;
1142 ASTPair currentAST =
new ASTPair();
1143 TNode structOrUnionSpecifier_AST =
null;
1144 TNode sou_AST =
null;
1150 TNode l1_AST =
null;
1155 sou_AST = (
TNode)returnAST;
1157 boolean synPredMatched26 =
false;
1158 if (((LA(1)==
ID) && (LA(2)==
LCURLY))) {
1160 synPredMatched26 =
true;
1161 inputState.guessing++;
1168 catch (RecognitionException pe) {
1169 synPredMatched26 =
false;
1172inputState.guessing--;
1174 if ( synPredMatched26 ) {
1176 i_AST = (
TNode)astFactory.create(i);
1177 astFactory.addASTChild(currentAST, i_AST);
1180 l_AST = (
TNode)astFactory.create(l);
1181 astFactory.addASTChild(currentAST, l_AST);
1183 if ( inputState.guessing==0 ) {
1191 astFactory.addASTChild(currentAST, returnAST);
1192 if ( inputState.guessing==0 ) {
1197 else if ((LA(1)==
LCURLY)) {
1199 l1_AST = (
TNode)astFactory.create(l1);
1200 astFactory.addASTChild(currentAST, l1_AST);
1202 if ( inputState.guessing==0 ) {
1210 astFactory.addASTChild(currentAST, returnAST);
1211 if ( inputState.guessing==0 ) {
1217 TNode tmp43_AST =
null;
1218 tmp43_AST = (
TNode)astFactory.create(
LT(1));
1219 astFactory.addASTChild(currentAST, tmp43_AST);
1223 throw new NoViableAltException(
LT(1), getFilename());
1227 if ( inputState.guessing==0 ) {
1228 structOrUnionSpecifier_AST = (
TNode)currentAST.root;
1230 structOrUnionSpecifier_AST = (
TNode)astFactory.make( (
new ASTArray(2)).add(sou_AST).add(structOrUnionSpecifier_AST));
1232 currentAST.root = structOrUnionSpecifier_AST;
1233 currentAST.child = structOrUnionSpecifier_AST!=
null &&structOrUnionSpecifier_AST.getFirstChild()!=
null ?
1234 structOrUnionSpecifier_AST.getFirstChild() : structOrUnionSpecifier_AST;
1235 currentAST.advanceChildToEnd();
1237 structOrUnionSpecifier_AST = (
TNode)currentAST.root;
1239 catch (RecognitionException ex) {
1240 if (inputState.guessing==0) {
1247 returnAST = structOrUnionSpecifier_AST;
1250 public final void enumSpecifier() throws RecognitionException, TokenStreamException {
1253 ASTPair currentAST =
new ASTPair();
1254 TNode enumSpecifier_AST =
null;
1259 TNode tmp44_AST =
null;
1260 tmp44_AST = (
TNode)astFactory.create(
LT(1));
1261 astFactory.makeASTRoot(currentAST, tmp44_AST);
1264 boolean synPredMatched48 =
false;
1265 if (((LA(1)==
ID) && (LA(2)==
LCURLY))) {
1267 synPredMatched48 =
true;
1268 inputState.guessing++;
1275 catch (RecognitionException pe) {
1276 synPredMatched48 =
false;
1279inputState.guessing--;
1281 if ( synPredMatched48 ) {
1283 i_AST = (
TNode)astFactory.create(i);
1284 astFactory.addASTChild(currentAST, i_AST);
1286 TNode tmp45_AST =
null;
1287 tmp45_AST = (
TNode)astFactory.create(
LT(1));
1288 astFactory.addASTChild(currentAST, tmp45_AST);
1291 astFactory.addASTChild(currentAST, returnAST);
1294 else if ((LA(1)==
LCURLY)) {
1295 TNode tmp47_AST =
null;
1296 tmp47_AST = (
TNode)astFactory.create(
LT(1));
1297 astFactory.addASTChild(currentAST, tmp47_AST);
1300 astFactory.addASTChild(currentAST, returnAST);
1304 TNode tmp49_AST =
null;
1305 tmp49_AST = (
TNode)astFactory.create(
LT(1));
1306 astFactory.addASTChild(currentAST, tmp49_AST);
1310 throw new NoViableAltException(
LT(1), getFilename());
1314 enumSpecifier_AST = (
TNode)currentAST.root;
1316 catch (RecognitionException ex) {
1317 if (inputState.guessing==0) {
1324 returnAST = enumSpecifier_AST;
1327 public final void typedefName() throws RecognitionException, TokenStreamException {
1330 ASTPair currentAST =
new ASTPair();
1331 TNode typedefName_AST =
null;
1337 throw new SemanticException(
" isTypedefName ( LT(1).getText() ) ");
1339 i_AST = (
TNode)astFactory.create(i);
1340 astFactory.addASTChild(currentAST, i_AST);
1342 if ( inputState.guessing==0 ) {
1343 typedefName_AST = (
TNode)currentAST.root;
1344 typedefName_AST = (
TNode)astFactory.make( (
new ASTArray(2)).add((
TNode)astFactory.create(
NTypedefName)).add(i_AST));
1345 currentAST.root = typedefName_AST;
1346 currentAST.child = typedefName_AST!=
null &&typedefName_AST.getFirstChild()!=
null ?
1347 typedefName_AST.getFirstChild() : typedefName_AST;
1348 currentAST.advanceChildToEnd();
1350 typedefName_AST = (
TNode)currentAST.root;
1352 catch (RecognitionException ex) {
1353 if (inputState.guessing==0) {
1360 returnAST = typedefName_AST;
1363 public final void structOrUnion() throws RecognitionException, TokenStreamException {
1366 ASTPair currentAST =
new ASTPair();
1367 TNode structOrUnion_AST =
null;
1373 TNode tmp50_AST =
null;
1374 tmp50_AST = (
TNode)astFactory.create(
LT(1));
1375 astFactory.addASTChild(currentAST, tmp50_AST);
1377 structOrUnion_AST = (
TNode)currentAST.root;
1382 TNode tmp51_AST =
null;
1383 tmp51_AST = (
TNode)astFactory.create(
LT(1));
1384 astFactory.addASTChild(currentAST, tmp51_AST);
1386 structOrUnion_AST = (
TNode)currentAST.root;
1391 throw new NoViableAltException(
LT(1), getFilename());
1395 catch (RecognitionException ex) {
1396 if (inputState.guessing==0) {
1403 returnAST = structOrUnion_AST;
1409 ASTPair currentAST =
new ASTPair();
1410 TNode structDeclarationList_AST =
null;
1419 astFactory.addASTChild(currentAST, returnAST);
1422 if ( _cnt30>=1 ) {
break _loop30; }
else {
throw new NoViableAltException(
LT(1), getFilename());}
1428 structDeclarationList_AST = (
TNode)currentAST.root;
1430 catch (RecognitionException ex) {
1431 if (inputState.guessing==0) {
1438 returnAST = structDeclarationList_AST;
1444 ASTPair currentAST =
new ASTPair();
1445 TNode structDeclaration_AST =
null;
1449 astFactory.addASTChild(currentAST, returnAST);
1451 astFactory.addASTChild(currentAST, returnAST);
1456 if ((LA(1)==
SEMI)) {
1460 if ( _cnt33>=1 ) {
break _loop33; }
else {
throw new NoViableAltException(
LT(1), getFilename());}
1466 structDeclaration_AST = (
TNode)currentAST.root;
1468 catch (RecognitionException ex) {
1469 if (inputState.guessing==0) {
1476 returnAST = structDeclaration_AST;
1482 ASTPair currentAST =
new ASTPair();
1483 TNode specifierQualifierList_AST =
null;
1491 boolean synPredMatched37 =
false;
1494 synPredMatched37 =
true;
1495 inputState.guessing++;
1511 throw new NoViableAltException(
LT(1), getFilename());
1516 catch (RecognitionException pe) {
1517 synPredMatched37 =
false;
1520inputState.guessing--;
1522 if ( synPredMatched37 ) {
1524 astFactory.addASTChild(currentAST, returnAST);
1528 astFactory.addASTChild(currentAST, returnAST);
1531 if ( _cnt38>=1 ) {
break _loop38; }
else {
throw new NoViableAltException(
LT(1), getFilename());}
1537 specifierQualifierList_AST = (
TNode)currentAST.root;
1539 catch (RecognitionException ex) {
1540 if (inputState.guessing==0) {
1547 returnAST = specifierQualifierList_AST;
1553 ASTPair currentAST =
new ASTPair();
1554 TNode structDeclaratorList_AST =
null;
1558 astFactory.addASTChild(currentAST, returnAST);
1562 if ((LA(1)==
COMMA)) {
1565 astFactory.addASTChild(currentAST, returnAST);
1573 structDeclaratorList_AST = (
TNode)currentAST.root;
1575 catch (RecognitionException ex) {
1576 if (inputState.guessing==0) {
1583 returnAST = structDeclaratorList_AST;
1589 ASTPair currentAST =
new ASTPair();
1590 TNode structDeclarator_AST =
null;
1597 TNode tmp54_AST =
null;
1598 tmp54_AST = (
TNode)astFactory.create(
LT(1));
1599 astFactory.addASTChild(currentAST, tmp54_AST);
1602 astFactory.addASTChild(currentAST, returnAST);
1610 astFactory.addASTChild(currentAST, returnAST);
1615 TNode tmp55_AST =
null;
1616 tmp55_AST = (
TNode)astFactory.create(
LT(1));
1617 astFactory.addASTChild(currentAST, tmp55_AST);
1620 astFactory.addASTChild(currentAST, returnAST);
1630 throw new NoViableAltException(
LT(1), getFilename());
1638 throw new NoViableAltException(
LT(1), getFilename());
1642 if ( inputState.guessing==0 ) {
1643 structDeclarator_AST = (
TNode)currentAST.root;
1644 structDeclarator_AST = (
TNode)astFactory.make( (
new ASTArray(2)).add((
TNode)astFactory.create(
NStructDeclarator)).add(structDeclarator_AST));
1645 currentAST.root = structDeclarator_AST;
1646 currentAST.child = structDeclarator_AST!=
null &&structDeclarator_AST.getFirstChild()!=
null ?
1647 structDeclarator_AST.getFirstChild() : structDeclarator_AST;
1648 currentAST.advanceChildToEnd();
1650 structDeclarator_AST = (
TNode)currentAST.root;
1652 catch (RecognitionException ex) {
1653 if (inputState.guessing==0) {
1660 returnAST = structDeclarator_AST;
1663 public final void constExpr() throws RecognitionException, TokenStreamException {
1666 ASTPair currentAST =
new ASTPair();
1667 TNode constExpr_AST =
null;
1671 astFactory.addASTChild(currentAST, returnAST);
1672 constExpr_AST = (
TNode)currentAST.root;
1674 catch (RecognitionException ex) {
1675 if (inputState.guessing==0) {
1682 returnAST = constExpr_AST;
1686 boolean isFunctionDefinition
1687 )
throws RecognitionException, TokenStreamException {
1691 ASTPair currentAST =
new ASTPair();
1692 TNode declarator_AST =
null;
1694 TNode id_AST =
null;
1705 astFactory.addASTChild(currentAST, returnAST);
1715 throw new NoViableAltException(
LT(1), getFilename());
1724 id_AST = (
TNode)astFactory.create(
id);
1725 astFactory.addASTChild(currentAST, id_AST);
1727 if ( inputState.guessing==0 ) {
1728 declName =
id.getText();
1734 TNode tmp56_AST =
null;
1735 tmp56_AST = (
TNode)astFactory.create(
LT(1));
1736 astFactory.addASTChild(currentAST, tmp56_AST);
1739 astFactory.addASTChild(currentAST, returnAST);
1740 TNode tmp57_AST =
null;
1741 tmp57_AST = (
TNode)astFactory.create(
LT(1));
1742 astFactory.addASTChild(currentAST, tmp57_AST);
1748 throw new NoViableAltException(
LT(1), getFilename());
1758 TNode tmp58_AST =
null;
1759 tmp58_AST = (
TNode)astFactory.create(
LT(1));
1761 if ( inputState.guessing==0 ) {
1763 if (isFunctionDefinition) {
1772 boolean synPredMatched79 =
false;
1775 synPredMatched79 =
true;
1776 inputState.guessing++;
1782 catch (RecognitionException pe) {
1783 synPredMatched79 =
false;
1786inputState.guessing--;
1788 if ( synPredMatched79 ) {
1790 p_AST = (
TNode)returnAST;
1791 if ( inputState.guessing==0 ) {
1792 declarator_AST = (
TNode)currentAST.root;
1794 declarator_AST = (
TNode)astFactory.make( (
new ASTArray(3)).add(
null).add(declarator_AST).add((
TNode)astFactory.make( (
new ASTArray(2)).add((
TNode)astFactory.create(
NParameterTypeList)).add(p_AST))));
1796 currentAST.root = declarator_AST;
1797 currentAST.child = declarator_AST!=
null &&declarator_AST.getFirstChild()!=
null ?
1798 declarator_AST.getFirstChild() : declarator_AST;
1799 currentAST.advanceChildToEnd();
1808 i_AST = (
TNode)returnAST;
1817 throw new NoViableAltException(
LT(1), getFilename());
1821 if ( inputState.guessing==0 ) {
1822 declarator_AST = (
TNode)currentAST.root;
1824 declarator_AST = (
TNode)astFactory.make( (
new ASTArray(3)).add(
null).add(declarator_AST).add((
TNode)astFactory.make( (
new ASTArray(2)).add((
TNode)astFactory.create(
NParameterTypeList)).add(i_AST))));
1826 currentAST.root = declarator_AST;
1827 currentAST.child = declarator_AST!=
null &&declarator_AST.getFirstChild()!=
null ?
1828 declarator_AST.getFirstChild() : declarator_AST;
1829 currentAST.advanceChildToEnd();
1833 throw new NoViableAltException(
LT(1), getFilename());
1837 if ( inputState.guessing==0 ) {
1842 TNode tmp59_AST =
null;
1843 tmp59_AST = (
TNode)astFactory.create(
LT(1));
1849 TNode tmp60_AST =
null;
1850 tmp60_AST = (
TNode)astFactory.create(
LT(1));
1851 astFactory.addASTChild(currentAST, tmp60_AST);
1882 astFactory.addASTChild(currentAST, returnAST);
1891 throw new NoViableAltException(
LT(1), getFilename());
1895 TNode tmp61_AST =
null;
1896 tmp61_AST = (
TNode)astFactory.create(
LT(1));
1897 astFactory.addASTChild(currentAST, tmp61_AST);
1908 if ( inputState.guessing==0 ) {
1909 declarator_AST = (
TNode)currentAST.root;
1910 declarator_AST = (
TNode)astFactory.make( (
new ASTArray(2)).add((
TNode)astFactory.create(
NDeclarator)).add(declarator_AST));
1911 currentAST.root = declarator_AST;
1912 currentAST.child = declarator_AST!=
null &&declarator_AST.getFirstChild()!=
null ?
1913 declarator_AST.getFirstChild() : declarator_AST;
1914 currentAST.advanceChildToEnd();
1916 declarator_AST = (
TNode)currentAST.root;
1918 catch (RecognitionException ex) {
1919 if (inputState.guessing==0) {
1926 returnAST = declarator_AST;
1932 )
throws RecognitionException, TokenStreamException {
1935 ASTPair currentAST =
new ASTPair();
1936 TNode enumList_AST =
null;
1940 astFactory.addASTChild(currentAST, returnAST);
1944 if ((LA(1)==
COMMA)) {
1947 astFactory.addASTChild(currentAST, returnAST);
1955 enumList_AST = (
TNode)currentAST.root;
1957 catch (RecognitionException ex) {
1958 if (inputState.guessing==0) {
1965 returnAST = enumList_AST;
1970 )
throws RecognitionException, TokenStreamException {
1973 ASTPair currentAST =
new ASTPair();
1974 TNode enumerator_AST =
null;
1980 i_AST = (
TNode)astFactory.create(i);
1981 astFactory.addASTChild(currentAST, i_AST);
1983 if ( inputState.guessing==0 ) {
1985 (
TNode)astFactory.make( (
new ASTArray(3)).add(
null).add((
TNode)astFactory.create(
LITERAL_enum,
"enum")).add((
TNode)astFactory.create(
ID,enumName)))
1993 TNode tmp63_AST =
null;
1994 tmp63_AST = (
TNode)astFactory.create(
LT(1));
1995 astFactory.addASTChild(currentAST, tmp63_AST);
1998 astFactory.addASTChild(currentAST, returnAST);
2008 throw new NoViableAltException(
LT(1), getFilename());
2012 enumerator_AST = (
TNode)currentAST.root;
2014 catch (RecognitionException ex) {
2015 if (inputState.guessing==0) {
2022 returnAST = enumerator_AST;
2026 AST declarationSpecifiers
2027 )
throws RecognitionException, TokenStreamException {
2030 ASTPair currentAST =
new ASTPair();
2031 TNode initDecl_AST =
null;
2033 String declName =
"";
2037 d_AST = (
TNode)returnAST;
2038 astFactory.addASTChild(currentAST, returnAST);
2039 if ( inputState.guessing==0 ) {
2041 ds1 = astFactory.dupList(declarationSpecifiers);
2042 d1 = astFactory.dupList(d_AST);
2043 symbolTable.
add(declName, (
TNode)astFactory.make( (
new ASTArray(3)).add(
null).add(ds1).add(d1)) );
2050 TNode tmp64_AST =
null;
2051 tmp64_AST = (
TNode)astFactory.create(
LT(1));
2052 astFactory.addASTChild(currentAST, tmp64_AST);
2055 astFactory.addASTChild(currentAST, returnAST);
2060 TNode tmp65_AST =
null;
2061 tmp65_AST = (
TNode)astFactory.create(
LT(1));
2062 astFactory.addASTChild(currentAST, tmp65_AST);
2065 astFactory.addASTChild(currentAST, returnAST);
2075 throw new NoViableAltException(
LT(1), getFilename());
2079 if ( inputState.guessing==0 ) {
2080 initDecl_AST = (
TNode)currentAST.root;
2081 initDecl_AST = (
TNode)astFactory.make( (
new ASTArray(2)).add((
TNode)astFactory.create(
NInitDecl)).add(initDecl_AST));
2082 currentAST.root = initDecl_AST;
2083 currentAST.child = initDecl_AST!=
null &&initDecl_AST.getFirstChild()!=
null ?
2084 initDecl_AST.getFirstChild() : initDecl_AST;
2085 currentAST.advanceChildToEnd();
2087 initDecl_AST = (
TNode)currentAST.root;
2089 catch (RecognitionException ex) {
2090 if (inputState.guessing==0) {
2097 returnAST = initDecl_AST;
2100 public final void initializer() throws RecognitionException, TokenStreamException {
2103 ASTPair currentAST =
new ASTPair();
2104 TNode initializer_AST =
null;
2136 astFactory.addASTChild(currentAST, returnAST);
2141 TNode tmp66_AST =
null;
2142 tmp66_AST = (
TNode)astFactory.create(
LT(1));
2143 astFactory.addASTChild(currentAST, tmp66_AST);
2146 astFactory.addASTChild(currentAST, returnAST);
2160 throw new NoViableAltException(
LT(1), getFilename());
2169 throw new NoViableAltException(
LT(1), getFilename());
2173 if ( inputState.guessing==0 ) {
2174 initializer_AST = (
TNode)currentAST.root;
2175 initializer_AST = (
TNode)astFactory.make( (
new ASTArray(2)).add((
TNode)astFactory.create(
NInitializer)).add(initializer_AST));
2176 currentAST.root = initializer_AST;
2177 currentAST.child = initializer_AST!=
null &&initializer_AST.getFirstChild()!=
null ?
2178 initializer_AST.getFirstChild() : initializer_AST;
2179 currentAST.advanceChildToEnd();
2181 initializer_AST = (
TNode)currentAST.root;
2183 catch (RecognitionException ex) {
2184 if (inputState.guessing==0) {
2191 returnAST = initializer_AST;
2194 public final void pointerGroup() throws RecognitionException, TokenStreamException {
2197 ASTPair currentAST =
new ASTPair();
2198 TNode pointerGroup_AST =
null;
2205 if ((LA(1)==
STAR)) {
2206 TNode tmp69_AST =
null;
2207 tmp69_AST = (
TNode)astFactory.create(
LT(1));
2208 astFactory.addASTChild(currentAST, tmp69_AST);
2215 astFactory.addASTChild(currentAST, returnAST);
2225 if ( _cnt63>=1 ) {
break _loop63; }
else {
throw new NoViableAltException(
LT(1), getFilename());}
2231 if ( inputState.guessing==0 ) {
2232 pointerGroup_AST = (
TNode)currentAST.root;
2233 pointerGroup_AST = (
TNode)astFactory.make( (
new ASTArray(2)).add((
TNode)astFactory.create(
NPointerGroup)).add(pointerGroup_AST));
2234 currentAST.root = pointerGroup_AST;
2235 currentAST.child = pointerGroup_AST!=
null &&pointerGroup_AST.getFirstChild()!=
null ?
2236 pointerGroup_AST.getFirstChild() : pointerGroup_AST;
2237 currentAST.advanceChildToEnd();
2239 pointerGroup_AST = (
TNode)currentAST.root;
2241 catch (RecognitionException ex) {
2242 if (inputState.guessing==0) {
2249 returnAST = pointerGroup_AST;
2252 public final void idList() throws RecognitionException, TokenStreamException {
2255 ASTPair currentAST =
new ASTPair();
2256 TNode idList_AST =
null;
2259 TNode tmp70_AST =
null;
2260 tmp70_AST = (
TNode)astFactory.create(
LT(1));
2261 astFactory.addASTChild(currentAST, tmp70_AST);
2266 if ((LA(1)==
COMMA)) {
2268 TNode tmp72_AST =
null;
2269 tmp72_AST = (
TNode)astFactory.create(
LT(1));
2270 astFactory.addASTChild(currentAST, tmp72_AST);
2279 idList_AST = (
TNode)currentAST.root;
2281 catch (RecognitionException ex) {
2282 if (inputState.guessing==0) {
2289 returnAST = idList_AST;
2292 public final void assignExpr() throws RecognitionException, TokenStreamException {
2295 ASTPair currentAST =
new ASTPair();
2296 TNode assignExpr_AST =
null;
2301 astFactory.addASTChild(currentAST, returnAST);
2317 a_AST = (
TNode)returnAST;
2319 astFactory.addASTChild(currentAST, returnAST);
2320 if ( inputState.guessing==0 ) {
2321 assignExpr_AST = (
TNode)currentAST.root;
2322 assignExpr_AST = (
TNode)astFactory.make( (
new ASTArray(2)).add(a_AST).add(assignExpr_AST));
2323 currentAST.root = assignExpr_AST;
2324 currentAST.child = assignExpr_AST!=
null &&assignExpr_AST.getFirstChild()!=
null ?
2325 assignExpr_AST.getFirstChild() : assignExpr_AST;
2326 currentAST.advanceChildToEnd();
2341 throw new NoViableAltException(
LT(1), getFilename());
2345 assignExpr_AST = (
TNode)currentAST.root;
2347 catch (RecognitionException ex) {
2348 if (inputState.guessing==0) {
2355 returnAST = assignExpr_AST;
2361 ASTPair currentAST =
new ASTPair();
2362 TNode initializerList_AST =
null;
2366 astFactory.addASTChild(currentAST, returnAST);
2373 astFactory.addASTChild(currentAST, returnAST);
2381 initializerList_AST = (
TNode)currentAST.root;
2383 catch (RecognitionException ex) {
2384 if (inputState.guessing==0) {
2391 returnAST = initializerList_AST;
2397 ASTPair currentAST =
new ASTPair();
2398 TNode parameterTypeList_AST =
null;
2402 astFactory.addASTChild(currentAST, returnAST);
2409 astFactory.addASTChild(currentAST, returnAST);
2422 TNode tmp76_AST =
null;
2423 tmp76_AST = (
TNode)astFactory.create(
LT(1));
2424 astFactory.addASTChild(currentAST, tmp76_AST);
2434 throw new NoViableAltException(
LT(1), getFilename());
2438 parameterTypeList_AST = (
TNode)currentAST.root;
2440 catch (RecognitionException ex) {
2441 if (inputState.guessing==0) {
2448 returnAST = parameterTypeList_AST;
2454 ASTPair currentAST =
new ASTPair();
2455 TNode parameterDeclaration_AST =
null;
2456 TNode ds_AST =
null;
2462 ds_AST = (
TNode)returnAST;
2463 astFactory.addASTChild(currentAST, returnAST);
2465 boolean synPredMatched90 =
false;
2468 synPredMatched90 =
true;
2469 inputState.guessing++;
2475 catch (RecognitionException pe) {
2476 synPredMatched90 =
false;
2479inputState.guessing--;
2481 if ( synPredMatched90 ) {
2483 d_AST = (
TNode)returnAST;
2484 astFactory.addASTChild(currentAST, returnAST);
2485 if ( inputState.guessing==0 ) {
2488 d2 = astFactory.dupList(d_AST);
2489 ds2 = astFactory.dupList(ds_AST);
2490 symbolTable.
add(declName, (
TNode)astFactory.make( (
new ASTArray(3)).add(
null).add(ds2).add(d2)));
2496 astFactory.addASTChild(currentAST, returnAST);
2501 throw new NoViableAltException(
LT(1), getFilename());
2505 if ( inputState.guessing==0 ) {
2506 parameterDeclaration_AST = (
TNode)currentAST.root;
2508 parameterDeclaration_AST = (
TNode)astFactory.make( (
new ASTArray(2)).add((
TNode)astFactory.create(
NParameterDeclaration)).add(parameterDeclaration_AST));
2510 currentAST.root = parameterDeclaration_AST;
2511 currentAST.child = parameterDeclaration_AST!=
null &¶meterDeclaration_AST.getFirstChild()!=
null ?
2512 parameterDeclaration_AST.getFirstChild() : parameterDeclaration_AST;
2513 currentAST.advanceChildToEnd();
2515 parameterDeclaration_AST = (
TNode)currentAST.root;
2517 catch (RecognitionException ex) {
2518 if (inputState.guessing==0) {
2525 returnAST = parameterDeclaration_AST;
2531 ASTPair currentAST =
new ASTPair();
2532 TNode nonemptyAbstractDeclarator_AST =
null;
2540 astFactory.addASTChild(currentAST, returnAST);
2548 TNode tmp77_AST =
null;
2549 tmp77_AST = (
TNode)astFactory.create(
LT(1));
2550 astFactory.addASTChild(currentAST, tmp77_AST);
2559 astFactory.addASTChild(currentAST, returnAST);
2599 astFactory.addASTChild(currentAST, returnAST);
2608 throw new NoViableAltException(
LT(1), getFilename());
2612 TNode tmp78_AST =
null;
2613 tmp78_AST = (
TNode)astFactory.create(
LT(1));
2614 astFactory.addASTChild(currentAST, tmp78_AST);
2622 TNode tmp79_AST =
null;
2623 tmp79_AST = (
TNode)astFactory.create(
LT(1));
2624 astFactory.addASTChild(currentAST, tmp79_AST);
2655 astFactory.addASTChild(currentAST, returnAST);
2664 throw new NoViableAltException(
LT(1), getFilename());
2668 TNode tmp80_AST =
null;
2669 tmp80_AST = (
TNode)astFactory.create(
LT(1));
2670 astFactory.addASTChild(currentAST, tmp80_AST);
2695 TNode tmp81_AST =
null;
2696 tmp81_AST = (
TNode)astFactory.create(
LT(1));
2697 astFactory.addASTChild(currentAST, tmp81_AST);
2706 astFactory.addASTChild(currentAST, returnAST);
2746 astFactory.addASTChild(currentAST, returnAST);
2755 throw new NoViableAltException(
LT(1), getFilename());
2759 TNode tmp82_AST =
null;
2760 tmp82_AST = (
TNode)astFactory.create(
LT(1));
2761 astFactory.addASTChild(currentAST, tmp82_AST);
2769 TNode tmp83_AST =
null;
2770 tmp83_AST = (
TNode)astFactory.create(
LT(1));
2771 astFactory.addASTChild(currentAST, tmp83_AST);
2802 astFactory.addASTChild(currentAST, returnAST);
2811 throw new NoViableAltException(
LT(1), getFilename());
2815 TNode tmp84_AST =
null;
2816 tmp84_AST = (
TNode)astFactory.create(
LT(1));
2817 astFactory.addASTChild(currentAST, tmp84_AST);
2824 if ( _cnt190>=1 ) {
break _loop190; }
else {
throw new NoViableAltException(
LT(1), getFilename());}
2834 throw new NoViableAltException(
LT(1), getFilename());
2838 if ( inputState.guessing==0 ) {
2839 nonemptyAbstractDeclarator_AST = (
TNode)currentAST.root;
2841 currentAST.root = nonemptyAbstractDeclarator_AST;
2842 currentAST.child = nonemptyAbstractDeclarator_AST!=
null &&nonemptyAbstractDeclarator_AST.getFirstChild()!=
null ?
2843 nonemptyAbstractDeclarator_AST.getFirstChild() : nonemptyAbstractDeclarator_AST;
2844 currentAST.advanceChildToEnd();
2846 nonemptyAbstractDeclarator_AST = (
TNode)currentAST.root;
2848 catch (RecognitionException ex) {
2849 if (inputState.guessing==0) {
2856 returnAST = nonemptyAbstractDeclarator_AST;
2862 ASTPair currentAST =
new ASTPair();
2863 TNode functionDeclSpecifiers_AST =
null;
2876 astFactory.addASTChild(currentAST, returnAST);
2883 astFactory.addASTChild(currentAST, returnAST);
2887 boolean synPredMatched103 =
false;
2890 synPredMatched103 =
true;
2891 inputState.guessing++;
2907 throw new NoViableAltException(
LT(1), getFilename());
2912 catch (RecognitionException pe) {
2913 synPredMatched103 =
false;
2916inputState.guessing--;
2918 if ( synPredMatched103 ) {
2920 astFactory.addASTChild(currentAST, returnAST);
2923 if ( _cnt104>=1 ) {
break _loop104; }
else {
throw new NoViableAltException(
LT(1), getFilename());}
2929 functionDeclSpecifiers_AST = (
TNode)currentAST.root;
2931 catch (RecognitionException ex) {
2932 if (inputState.guessing==0) {
2939 returnAST = functionDeclSpecifiers_AST;
2944 )
throws RecognitionException, TokenStreamException {
2947 ASTPair currentAST =
new ASTPair();
2948 TNode compoundStatement_AST =
null;
2952 if ( inputState.guessing==0 ) {
2958 boolean synPredMatched115 =
false;
2961 synPredMatched115 =
true;
2962 inputState.guessing++;
2968 catch (RecognitionException pe) {
2969 synPredMatched115 =
false;
2972inputState.guessing--;
2974 if ( synPredMatched115 ) {
2976 astFactory.addASTChild(currentAST, returnAST);
2981 throw new NoViableAltException(
LT(1), getFilename());
3027 astFactory.addASTChild(currentAST, returnAST);
3036 throw new NoViableAltException(
LT(1), getFilename());
3040 if ( inputState.guessing==0 ) {
3044 if ( inputState.guessing==0 ) {
3045 compoundStatement_AST = (
TNode)currentAST.root;
3046 compoundStatement_AST = (
TNode)astFactory.make( (
new ASTArray(2)).add((
TNode)astFactory.create(
NCompoundStatement,scopeName)).add(compoundStatement_AST));
3047 currentAST.root = compoundStatement_AST;
3048 currentAST.child = compoundStatement_AST!=
null &&compoundStatement_AST.getFirstChild()!=
null ?
3049 compoundStatement_AST.getFirstChild() : compoundStatement_AST;
3050 currentAST.advanceChildToEnd();
3052 compoundStatement_AST = (
TNode)currentAST.root;
3054 catch (RecognitionException ex) {
3055 if (inputState.guessing==0) {
3062 returnAST = compoundStatement_AST;
3068 ASTPair currentAST =
new ASTPair();
3069 TNode declarationList_AST =
null;
3076 boolean synPredMatched108 =
false;
3079 synPredMatched108 =
true;
3080 inputState.guessing++;
3086 catch (RecognitionException pe) {
3087 synPredMatched108 =
false;
3090inputState.guessing--;
3092 if ( synPredMatched108 ) {
3094 astFactory.addASTChild(currentAST, returnAST);
3097 if ( _cnt109>=1 ) {
break _loop109; }
else {
throw new NoViableAltException(
LT(1), getFilename());}
3103 declarationList_AST = (
TNode)currentAST.root;
3105 catch (RecognitionException ex) {
3106 if (inputState.guessing==0) {
3113 returnAST = declarationList_AST;
3119 ASTPair currentAST =
new ASTPair();
3120 TNode declarationPredictor_AST =
null;
3125 TNode tmp87_AST =
null;
3126 tmp87_AST = (
TNode)astFactory.create(
LT(1));
3127 astFactory.addASTChild(currentAST, tmp87_AST);
3132 astFactory.addASTChild(currentAST, returnAST);
3135 throw new NoViableAltException(
LT(1), getFilename());
3139 declarationPredictor_AST = (
TNode)currentAST.root;
3141 catch (RecognitionException ex) {
3142 if (inputState.guessing==0) {
3149 returnAST = declarationPredictor_AST;
3152 public final void statementList() throws RecognitionException, TokenStreamException {
3155 ASTPair currentAST =
new ASTPair();
3156 TNode statementList_AST =
null;
3165 astFactory.addASTChild(currentAST, returnAST);
3168 if ( _cnt119>=1 ) {
break _loop119; }
else {
throw new NoViableAltException(
LT(1), getFilename());}
3174 statementList_AST = (
TNode)currentAST.root;
3176 catch (RecognitionException ex) {
3177 if (inputState.guessing==0) {
3184 returnAST = statementList_AST;
3187 public final void statement() throws RecognitionException, TokenStreamException {
3190 ASTPair currentAST =
new ASTPair();
3191 TNode statement_AST =
null;
3192 TNode e1_AST =
null;
3193 TNode e2_AST =
null;
3194 TNode e3_AST =
null;
3201 TNode tmp88_AST =
null;
3202 tmp88_AST = (
TNode)astFactory.create(
LT(1));
3203 astFactory.addASTChild(currentAST, tmp88_AST);
3205 statement_AST = (
TNode)currentAST.root;
3211 astFactory.addASTChild(currentAST, returnAST);
3212 statement_AST = (
TNode)currentAST.root;
3217 TNode tmp89_AST =
null;
3218 tmp89_AST = (
TNode)astFactory.create(
LT(1));
3219 astFactory.makeASTRoot(currentAST, tmp89_AST);
3223 astFactory.addASTChild(currentAST, returnAST);
3226 astFactory.addASTChild(currentAST, returnAST);
3227 statement_AST = (
TNode)currentAST.root;
3232 TNode tmp92_AST =
null;
3233 tmp92_AST = (
TNode)astFactory.create(
LT(1));
3234 astFactory.makeASTRoot(currentAST, tmp92_AST);
3237 astFactory.addASTChild(currentAST, returnAST);
3241 astFactory.addASTChild(currentAST, returnAST);
3244 statement_AST = (
TNode)currentAST.root;
3250 TNode tmp98_AST =
null;
3251 tmp98_AST = (
TNode)astFactory.create(
LT(1));
3282 e1_AST = (
TNode)returnAST;
3291 throw new NoViableAltException(
LT(1), getFilename());
3295 TNode tmp99_AST =
null;
3296 tmp99_AST = (
TNode)astFactory.create(
LT(1));
3327 e2_AST = (
TNode)returnAST;
3336 throw new NoViableAltException(
LT(1), getFilename());
3340 TNode tmp100_AST =
null;
3341 tmp100_AST = (
TNode)astFactory.create(
LT(1));
3372 e3_AST = (
TNode)returnAST;
3381 throw new NoViableAltException(
LT(1), getFilename());
3385 TNode tmp101_AST =
null;
3386 tmp101_AST = (
TNode)astFactory.create(
LT(1));
3389 s_AST = (
TNode)returnAST;
3390 if ( inputState.guessing==0 ) {
3391 statement_AST = (
TNode)currentAST.root;
3396 statement_AST = (
TNode)astFactory.make( (
new ASTArray(5)).add((
TNode)astFactory.create(
LITERAL_for,
"for")).add(e1_AST).add(e2_AST).add(e3_AST).add(s_AST));
3398 currentAST.root = statement_AST;
3399 currentAST.child = statement_AST!=
null &&statement_AST.getFirstChild()!=
null ?
3400 statement_AST.getFirstChild() : statement_AST;
3401 currentAST.advanceChildToEnd();
3407 TNode tmp102_AST =
null;
3408 tmp102_AST = (
TNode)astFactory.create(
LT(1));
3409 astFactory.makeASTRoot(currentAST, tmp102_AST);
3411 TNode tmp103_AST =
null;
3412 tmp103_AST = (
TNode)astFactory.create(
LT(1));
3413 astFactory.addASTChild(currentAST, tmp103_AST);
3416 statement_AST = (
TNode)currentAST.root;
3421 TNode tmp105_AST =
null;
3422 tmp105_AST = (
TNode)astFactory.create(
LT(1));
3423 astFactory.addASTChild(currentAST, tmp105_AST);
3426 statement_AST = (
TNode)currentAST.root;
3431 TNode tmp107_AST =
null;
3432 tmp107_AST = (
TNode)astFactory.create(
LT(1));
3433 astFactory.addASTChild(currentAST, tmp107_AST);
3436 statement_AST = (
TNode)currentAST.root;
3441 TNode tmp109_AST =
null;
3442 tmp109_AST = (
TNode)astFactory.create(
LT(1));
3443 astFactory.makeASTRoot(currentAST, tmp109_AST);
3474 astFactory.addASTChild(currentAST, returnAST);
3483 throw new NoViableAltException(
LT(1), getFilename());
3488 statement_AST = (
TNode)currentAST.root;
3493 TNode tmp111_AST =
null;
3494 tmp111_AST = (
TNode)astFactory.create(
LT(1));
3495 astFactory.makeASTRoot(currentAST, tmp111_AST);
3498 astFactory.addASTChild(currentAST, returnAST);
3501 astFactory.addASTChild(currentAST, returnAST);
3502 statement_AST = (
TNode)currentAST.root;
3507 TNode tmp113_AST =
null;
3508 tmp113_AST = (
TNode)astFactory.create(
LT(1));
3509 astFactory.makeASTRoot(currentAST, tmp113_AST);
3513 astFactory.addASTChild(currentAST, returnAST);
3514 statement_AST = (
TNode)currentAST.root;
3519 TNode tmp115_AST =
null;
3520 tmp115_AST = (
TNode)astFactory.create(
LT(1));
3521 astFactory.makeASTRoot(currentAST, tmp115_AST);
3525 astFactory.addASTChild(currentAST, returnAST);
3528 astFactory.addASTChild(currentAST, returnAST);
3531 TNode tmp118_AST =
null;
3532 tmp118_AST = (
TNode)astFactory.create(
LT(1));
3533 astFactory.addASTChild(currentAST, tmp118_AST);
3536 astFactory.addASTChild(currentAST, returnAST);
3541 throw new NoViableAltException(
LT(1), getFilename());
3545 statement_AST = (
TNode)currentAST.root;
3550 TNode tmp119_AST =
null;
3551 tmp119_AST = (
TNode)astFactory.create(
LT(1));
3552 astFactory.makeASTRoot(currentAST, tmp119_AST);
3556 astFactory.addASTChild(currentAST, returnAST);
3559 astFactory.addASTChild(currentAST, returnAST);
3560 statement_AST = (
TNode)currentAST.root;
3566 astFactory.addASTChild(currentAST, returnAST);
3568 if ( inputState.guessing==0 ) {
3569 statement_AST = (
TNode)currentAST.root;
3570 statement_AST = (
TNode)astFactory.make( (
new ASTArray(2)).add((
TNode)astFactory.create(
NStatementExpr)).add(statement_AST));
3571 currentAST.root = statement_AST;
3572 currentAST.child = statement_AST!=
null &&statement_AST.getFirstChild()!=
null ?
3573 statement_AST.getFirstChild() : statement_AST;
3574 currentAST.advanceChildToEnd();
3576 statement_AST = (
TNode)currentAST.root;
3578 else if ((LA(1)==
ID) && (LA(2)==
COLON)) {
3579 TNode tmp123_AST =
null;
3580 tmp123_AST = (
TNode)astFactory.create(
LT(1));
3581 astFactory.addASTChild(currentAST, tmp123_AST);
3587 astFactory.addASTChild(currentAST, returnAST);
3592 throw new NoViableAltException(
LT(1), getFilename());
3596 if ( inputState.guessing==0 ) {
3597 statement_AST = (
TNode)currentAST.root;
3598 statement_AST = (
TNode)astFactory.make( (
new ASTArray(2)).add((
TNode)astFactory.create(
NLabel)).add(statement_AST));
3599 currentAST.root = statement_AST;
3600 currentAST.child = statement_AST!=
null &&statement_AST.getFirstChild()!=
null ?
3601 statement_AST.getFirstChild() : statement_AST;
3602 currentAST.advanceChildToEnd();
3604 statement_AST = (
TNode)currentAST.root;
3607 throw new NoViableAltException(
LT(1), getFilename());
3611 catch (RecognitionException ex) {
3612 if (inputState.guessing==0) {
3619 returnAST = statement_AST;
3625 ASTPair currentAST =
new ASTPair();
3626 TNode conditionalExpr_AST =
null;
3630 astFactory.addASTChild(currentAST, returnAST);
3635 TNode tmp125_AST =
null;
3636 tmp125_AST = (
TNode)astFactory.create(
LT(1));
3637 astFactory.makeASTRoot(currentAST, tmp125_AST);
3640 astFactory.addASTChild(currentAST, returnAST);
3643 astFactory.addASTChild(currentAST, returnAST);
3668 throw new NoViableAltException(
LT(1), getFilename());
3672 conditionalExpr_AST = (
TNode)currentAST.root;
3674 catch (RecognitionException ex) {
3675 if (inputState.guessing==0) {
3682 returnAST = conditionalExpr_AST;
3685 public final void assignOperator() throws RecognitionException, TokenStreamException {
3688 ASTPair currentAST =
new ASTPair();
3689 TNode assignOperator_AST =
null;
3695 TNode tmp127_AST =
null;
3696 tmp127_AST = (
TNode)astFactory.create(
LT(1));
3697 astFactory.addASTChild(currentAST, tmp127_AST);
3699 assignOperator_AST = (
TNode)currentAST.root;
3704 TNode tmp128_AST =
null;
3705 tmp128_AST = (
TNode)astFactory.create(
LT(1));
3706 astFactory.addASTChild(currentAST, tmp128_AST);
3708 assignOperator_AST = (
TNode)currentAST.root;
3713 TNode tmp129_AST =
null;
3714 tmp129_AST = (
TNode)astFactory.create(
LT(1));
3715 astFactory.addASTChild(currentAST, tmp129_AST);
3717 assignOperator_AST = (
TNode)currentAST.root;
3722 TNode tmp130_AST =
null;
3723 tmp130_AST = (
TNode)astFactory.create(
LT(1));
3724 astFactory.addASTChild(currentAST, tmp130_AST);
3726 assignOperator_AST = (
TNode)currentAST.root;
3731 TNode tmp131_AST =
null;
3732 tmp131_AST = (
TNode)astFactory.create(
LT(1));
3733 astFactory.addASTChild(currentAST, tmp131_AST);
3735 assignOperator_AST = (
TNode)currentAST.root;
3740 TNode tmp132_AST =
null;
3741 tmp132_AST = (
TNode)astFactory.create(
LT(1));
3742 astFactory.addASTChild(currentAST, tmp132_AST);
3744 assignOperator_AST = (
TNode)currentAST.root;
3749 TNode tmp133_AST =
null;
3750 tmp133_AST = (
TNode)astFactory.create(
LT(1));
3751 astFactory.addASTChild(currentAST, tmp133_AST);
3753 assignOperator_AST = (
TNode)currentAST.root;
3758 TNode tmp134_AST =
null;
3759 tmp134_AST = (
TNode)astFactory.create(
LT(1));
3760 astFactory.addASTChild(currentAST, tmp134_AST);
3762 assignOperator_AST = (
TNode)currentAST.root;
3767 TNode tmp135_AST =
null;
3768 tmp135_AST = (
TNode)astFactory.create(
LT(1));
3769 astFactory.addASTChild(currentAST, tmp135_AST);
3771 assignOperator_AST = (
TNode)currentAST.root;
3776 TNode tmp136_AST =
null;
3777 tmp136_AST = (
TNode)astFactory.create(
LT(1));
3778 astFactory.addASTChild(currentAST, tmp136_AST);
3780 assignOperator_AST = (
TNode)currentAST.root;
3785 TNode tmp137_AST =
null;
3786 tmp137_AST = (
TNode)astFactory.create(
LT(1));
3787 astFactory.addASTChild(currentAST, tmp137_AST);
3789 assignOperator_AST = (
TNode)currentAST.root;
3794 throw new NoViableAltException(
LT(1), getFilename());
3798 catch (RecognitionException ex) {
3799 if (inputState.guessing==0) {
3806 returnAST = assignOperator_AST;
3809 public final void logicalOrExpr() throws RecognitionException, TokenStreamException {
3812 ASTPair currentAST =
new ASTPair();
3813 TNode logicalOrExpr_AST =
null;
3817 astFactory.addASTChild(currentAST, returnAST);
3822 TNode tmp138_AST =
null;
3823 tmp138_AST = (
TNode)astFactory.create(
LT(1));
3824 astFactory.makeASTRoot(currentAST, tmp138_AST);
3827 astFactory.addASTChild(currentAST, returnAST);
3835 logicalOrExpr_AST = (
TNode)currentAST.root;
3837 catch (RecognitionException ex) {
3838 if (inputState.guessing==0) {
3845 returnAST = logicalOrExpr_AST;
3848 public final void logicalAndExpr() throws RecognitionException, TokenStreamException {
3851 ASTPair currentAST =
new ASTPair();
3852 TNode logicalAndExpr_AST =
null;
3856 astFactory.addASTChild(currentAST, returnAST);
3860 if ((LA(1)==
LAND)) {
3861 TNode tmp139_AST =
null;
3862 tmp139_AST = (
TNode)astFactory.create(
LT(1));
3863 astFactory.makeASTRoot(currentAST, tmp139_AST);
3866 astFactory.addASTChild(currentAST, returnAST);
3874 logicalAndExpr_AST = (
TNode)currentAST.root;
3876 catch (RecognitionException ex) {
3877 if (inputState.guessing==0) {
3884 returnAST = logicalAndExpr_AST;
3890 ASTPair currentAST =
new ASTPair();
3891 TNode inclusiveOrExpr_AST =
null;
3895 astFactory.addASTChild(currentAST, returnAST);
3900 TNode tmp140_AST =
null;
3901 tmp140_AST = (
TNode)astFactory.create(
LT(1));
3902 astFactory.makeASTRoot(currentAST, tmp140_AST);
3905 astFactory.addASTChild(currentAST, returnAST);
3913 inclusiveOrExpr_AST = (
TNode)currentAST.root;
3915 catch (RecognitionException ex) {
3916 if (inputState.guessing==0) {
3923 returnAST = inclusiveOrExpr_AST;
3929 ASTPair currentAST =
new ASTPair();
3930 TNode exclusiveOrExpr_AST =
null;
3934 astFactory.addASTChild(currentAST, returnAST);
3938 if ((LA(1)==
BXOR)) {
3939 TNode tmp141_AST =
null;
3940 tmp141_AST = (
TNode)astFactory.create(
LT(1));
3941 astFactory.makeASTRoot(currentAST, tmp141_AST);
3944 astFactory.addASTChild(currentAST, returnAST);
3952 exclusiveOrExpr_AST = (
TNode)currentAST.root;
3954 catch (RecognitionException ex) {
3955 if (inputState.guessing==0) {
3962 returnAST = exclusiveOrExpr_AST;
3965 public final void bitAndExpr() throws RecognitionException, TokenStreamException {
3968 ASTPair currentAST =
new ASTPair();
3969 TNode bitAndExpr_AST =
null;
3973 astFactory.addASTChild(currentAST, returnAST);
3977 if ((LA(1)==
BAND)) {
3978 TNode tmp142_AST =
null;
3979 tmp142_AST = (
TNode)astFactory.create(
LT(1));
3980 astFactory.makeASTRoot(currentAST, tmp142_AST);
3983 astFactory.addASTChild(currentAST, returnAST);
3991 bitAndExpr_AST = (
TNode)currentAST.root;
3993 catch (RecognitionException ex) {
3994 if (inputState.guessing==0) {
4001 returnAST = bitAndExpr_AST;
4004 public final void equalityExpr() throws RecognitionException, TokenStreamException {
4007 ASTPair currentAST =
new ASTPair();
4008 TNode equalityExpr_AST =
null;
4012 astFactory.addASTChild(currentAST, returnAST);
4021 TNode tmp143_AST =
null;
4022 tmp143_AST = (
TNode)astFactory.create(
LT(1));
4023 astFactory.makeASTRoot(currentAST, tmp143_AST);
4029 TNode tmp144_AST =
null;
4030 tmp144_AST = (
TNode)astFactory.create(
LT(1));
4031 astFactory.makeASTRoot(currentAST, tmp144_AST);
4037 throw new NoViableAltException(
LT(1), getFilename());
4042 astFactory.addASTChild(currentAST, returnAST);
4050 equalityExpr_AST = (
TNode)currentAST.root;
4052 catch (RecognitionException ex) {
4053 if (inputState.guessing==0) {
4060 returnAST = equalityExpr_AST;
4063 public final void relationalExpr() throws RecognitionException, TokenStreamException {
4066 ASTPair currentAST =
new ASTPair();
4067 TNode relationalExpr_AST =
null;
4071 astFactory.addASTChild(currentAST, returnAST);
4075 if (((LA(1) >=
LT && LA(1) <=
GTE))) {
4080 TNode tmp145_AST =
null;
4081 tmp145_AST = (
TNode)astFactory.create(
LT(1));
4082 astFactory.makeASTRoot(currentAST, tmp145_AST);
4088 TNode tmp146_AST =
null;
4089 tmp146_AST = (
TNode)astFactory.create(
LT(1));
4090 astFactory.makeASTRoot(currentAST, tmp146_AST);
4096 TNode tmp147_AST =
null;
4097 tmp147_AST = (
TNode)astFactory.create(
LT(1));
4098 astFactory.makeASTRoot(currentAST, tmp147_AST);
4104 TNode tmp148_AST =
null;
4105 tmp148_AST = (
TNode)astFactory.create(
LT(1));
4106 astFactory.makeASTRoot(currentAST, tmp148_AST);
4112 throw new NoViableAltException(
LT(1), getFilename());
4117 astFactory.addASTChild(currentAST, returnAST);
4125 relationalExpr_AST = (
TNode)currentAST.root;
4127 catch (RecognitionException ex) {
4128 if (inputState.guessing==0) {
4135 returnAST = relationalExpr_AST;
4138 public final void shiftExpr() throws RecognitionException, TokenStreamException {
4141 ASTPair currentAST =
new ASTPair();
4142 TNode shiftExpr_AST =
null;
4146 astFactory.addASTChild(currentAST, returnAST);
4155 TNode tmp149_AST =
null;
4156 tmp149_AST = (
TNode)astFactory.create(
LT(1));
4157 astFactory.makeASTRoot(currentAST, tmp149_AST);
4163 TNode tmp150_AST =
null;
4164 tmp150_AST = (
TNode)astFactory.create(
LT(1));
4165 astFactory.makeASTRoot(currentAST, tmp150_AST);
4171 throw new NoViableAltException(
LT(1), getFilename());
4176 astFactory.addASTChild(currentAST, returnAST);
4184 shiftExpr_AST = (
TNode)currentAST.root;
4186 catch (RecognitionException ex) {
4187 if (inputState.guessing==0) {
4194 returnAST = shiftExpr_AST;
4197 public final void additiveExpr() throws RecognitionException, TokenStreamException {
4200 ASTPair currentAST =
new ASTPair();
4201 TNode additiveExpr_AST =
null;
4205 astFactory.addASTChild(currentAST, returnAST);
4214 TNode tmp151_AST =
null;
4215 tmp151_AST = (
TNode)astFactory.create(
LT(1));
4216 astFactory.makeASTRoot(currentAST, tmp151_AST);
4222 TNode tmp152_AST =
null;
4223 tmp152_AST = (
TNode)astFactory.create(
LT(1));
4224 astFactory.makeASTRoot(currentAST, tmp152_AST);
4230 throw new NoViableAltException(
LT(1), getFilename());
4235 astFactory.addASTChild(currentAST, returnAST);
4243 additiveExpr_AST = (
TNode)currentAST.root;
4245 catch (RecognitionException ex) {
4246 if (inputState.guessing==0) {
4253 returnAST = additiveExpr_AST;
4256 public final void multExpr() throws RecognitionException, TokenStreamException {
4259 ASTPair currentAST =
new ASTPair();
4260 TNode multExpr_AST =
null;
4264 astFactory.addASTChild(currentAST, returnAST);
4273 TNode tmp153_AST =
null;
4274 tmp153_AST = (
TNode)astFactory.create(
LT(1));
4275 astFactory.makeASTRoot(currentAST, tmp153_AST);
4281 TNode tmp154_AST =
null;
4282 tmp154_AST = (
TNode)astFactory.create(
LT(1));
4283 astFactory.makeASTRoot(currentAST, tmp154_AST);
4289 TNode tmp155_AST =
null;
4290 tmp155_AST = (
TNode)astFactory.create(
LT(1));
4291 astFactory.makeASTRoot(currentAST, tmp155_AST);
4297 throw new NoViableAltException(
LT(1), getFilename());
4302 astFactory.addASTChild(currentAST, returnAST);
4310 multExpr_AST = (
TNode)currentAST.root;
4312 catch (RecognitionException ex) {
4313 if (inputState.guessing==0) {
4320 returnAST = multExpr_AST;
4323 public final void castExpr() throws RecognitionException, TokenStreamException {
4326 ASTPair currentAST =
new ASTPair();
4327 TNode castExpr_AST =
null;
4330 boolean synPredMatched173 =
false;
4333 synPredMatched173 =
true;
4334 inputState.guessing++;
4342 catch (RecognitionException pe) {
4343 synPredMatched173 =
false;
4346inputState.guessing--;
4348 if ( synPredMatched173 ) {
4351 astFactory.addASTChild(currentAST, returnAST);
4355 astFactory.addASTChild(currentAST, returnAST);
4357 if ( inputState.guessing==0 ) {
4358 castExpr_AST = (
TNode)currentAST.root;
4359 castExpr_AST = (
TNode)astFactory.make( (
new ASTArray(2)).add((
TNode)astFactory.create(
NCast,
"(")).add(castExpr_AST));
4360 currentAST.root = castExpr_AST;
4361 currentAST.child = castExpr_AST!=
null &&castExpr_AST.getFirstChild()!=
null ?
4362 castExpr_AST.getFirstChild() : castExpr_AST;
4363 currentAST.advanceChildToEnd();
4365 castExpr_AST = (
TNode)currentAST.root;
4369 astFactory.addASTChild(currentAST, returnAST);
4370 castExpr_AST = (
TNode)currentAST.root;
4373 throw new NoViableAltException(
LT(1), getFilename());
4377 catch (RecognitionException ex) {
4378 if (inputState.guessing==0) {
4385 returnAST = castExpr_AST;
4388 public final void typeName() throws RecognitionException, TokenStreamException {
4391 ASTPair currentAST =
new ASTPair();
4392 TNode typeName_AST =
null;
4396 astFactory.addASTChild(currentAST, returnAST);
4404 astFactory.addASTChild(currentAST, returnAST);
4413 throw new NoViableAltException(
LT(1), getFilename());
4417 typeName_AST = (
TNode)currentAST.root;
4419 catch (RecognitionException ex) {
4420 if (inputState.guessing==0) {
4427 returnAST = typeName_AST;
4430 public final void unaryExpr() throws RecognitionException, TokenStreamException {
4433 ASTPair currentAST =
new ASTPair();
4434 TNode unaryExpr_AST =
null;
4457 astFactory.addASTChild(currentAST, returnAST);
4458 unaryExpr_AST = (
TNode)currentAST.root;
4463 TNode tmp158_AST =
null;
4464 tmp158_AST = (
TNode)astFactory.create(
LT(1));
4465 astFactory.makeASTRoot(currentAST, tmp158_AST);
4468 astFactory.addASTChild(currentAST, returnAST);
4469 unaryExpr_AST = (
TNode)currentAST.root;
4474 TNode tmp159_AST =
null;
4475 tmp159_AST = (
TNode)astFactory.create(
LT(1));
4476 astFactory.makeASTRoot(currentAST, tmp159_AST);
4479 astFactory.addASTChild(currentAST, returnAST);
4480 unaryExpr_AST = (
TNode)currentAST.root;
4491 u_AST = (
TNode)returnAST;
4492 astFactory.addASTChild(currentAST, returnAST);
4494 astFactory.addASTChild(currentAST, returnAST);
4495 if ( inputState.guessing==0 ) {
4496 unaryExpr_AST = (
TNode)currentAST.root;
4497 unaryExpr_AST = (
TNode)astFactory.make( (
new ASTArray(2)).add((
TNode)astFactory.create(
NUnaryExpr)).add(unaryExpr_AST));
4498 currentAST.root = unaryExpr_AST;
4499 currentAST.child = unaryExpr_AST!=
null &&unaryExpr_AST.getFirstChild()!=
null ?
4500 unaryExpr_AST.getFirstChild() : unaryExpr_AST;
4501 currentAST.advanceChildToEnd();
4503 unaryExpr_AST = (
TNode)currentAST.root;
4508 TNode tmp160_AST =
null;
4509 tmp160_AST = (
TNode)astFactory.create(
LT(1));
4510 astFactory.makeASTRoot(currentAST, tmp160_AST);
4513 boolean synPredMatched194 =
false;
4516 synPredMatched194 =
true;
4517 inputState.guessing++;
4524 catch (RecognitionException pe) {
4525 synPredMatched194 =
false;
4528inputState.guessing--;
4530 if ( synPredMatched194 ) {
4531 TNode tmp161_AST =
null;
4532 tmp161_AST = (
TNode)astFactory.create(
LT(1));
4533 astFactory.addASTChild(currentAST, tmp161_AST);
4536 astFactory.addASTChild(currentAST, returnAST);
4537 TNode tmp162_AST =
null;
4538 tmp162_AST = (
TNode)astFactory.create(
LT(1));
4539 astFactory.addASTChild(currentAST, tmp162_AST);
4544 astFactory.addASTChild(currentAST, returnAST);
4547 throw new NoViableAltException(
LT(1), getFilename());
4551 unaryExpr_AST = (
TNode)currentAST.root;
4556 throw new NoViableAltException(
LT(1), getFilename());
4560 catch (RecognitionException ex) {
4561 if (inputState.guessing==0) {
4568 returnAST = unaryExpr_AST;
4571 public final void postfixExpr() throws RecognitionException, TokenStreamException {
4574 ASTPair currentAST =
new ASTPair();
4575 TNode postfixExpr_AST =
null;
4579 astFactory.addASTChild(currentAST, returnAST);
4590 astFactory.addASTChild(currentAST, returnAST);
4591 if ( inputState.guessing==0 ) {
4592 postfixExpr_AST = (
TNode)currentAST.root;
4593 postfixExpr_AST = (
TNode)astFactory.make( (
new ASTArray(2)).add((
TNode)astFactory.create(
NPostfixExpr)).add(postfixExpr_AST));
4594 currentAST.root = postfixExpr_AST;
4595 currentAST.child = postfixExpr_AST!=
null &&postfixExpr_AST.getFirstChild()!=
null ?
4596 postfixExpr_AST.getFirstChild() : postfixExpr_AST;
4597 currentAST.advanceChildToEnd();
4642 throw new NoViableAltException(
LT(1), getFilename());
4646 postfixExpr_AST = (
TNode)currentAST.root;
4648 catch (RecognitionException ex) {
4649 if (inputState.guessing==0) {
4656 returnAST = postfixExpr_AST;
4659 public final void unaryOperator() throws RecognitionException, TokenStreamException {
4662 ASTPair currentAST =
new ASTPair();
4663 TNode unaryOperator_AST =
null;
4669 TNode tmp163_AST =
null;
4670 tmp163_AST = (
TNode)astFactory.create(
LT(1));
4671 astFactory.addASTChild(currentAST, tmp163_AST);
4673 unaryOperator_AST = (
TNode)currentAST.root;
4678 TNode tmp164_AST =
null;
4679 tmp164_AST = (
TNode)astFactory.create(
LT(1));
4680 astFactory.addASTChild(currentAST, tmp164_AST);
4682 unaryOperator_AST = (
TNode)currentAST.root;
4687 TNode tmp165_AST =
null;
4688 tmp165_AST = (
TNode)astFactory.create(
LT(1));
4689 astFactory.addASTChild(currentAST, tmp165_AST);
4691 unaryOperator_AST = (
TNode)currentAST.root;
4696 TNode tmp166_AST =
null;
4697 tmp166_AST = (
TNode)astFactory.create(
LT(1));
4698 astFactory.addASTChild(currentAST, tmp166_AST);
4700 unaryOperator_AST = (
TNode)currentAST.root;
4705 TNode tmp167_AST =
null;
4706 tmp167_AST = (
TNode)astFactory.create(
LT(1));
4707 astFactory.addASTChild(currentAST, tmp167_AST);
4709 unaryOperator_AST = (
TNode)currentAST.root;
4714 TNode tmp168_AST =
null;
4715 tmp168_AST = (
TNode)astFactory.create(
LT(1));
4716 astFactory.addASTChild(currentAST, tmp168_AST);
4718 unaryOperator_AST = (
TNode)currentAST.root;
4723 throw new NoViableAltException(
LT(1), getFilename());
4727 catch (RecognitionException ex) {
4728 if (inputState.guessing==0) {
4735 returnAST = unaryOperator_AST;
4738 public final void primaryExpr() throws RecognitionException, TokenStreamException {
4741 ASTPair currentAST =
new ASTPair();
4742 TNode primaryExpr_AST =
null;
4748 TNode tmp169_AST =
null;
4749 tmp169_AST = (
TNode)astFactory.create(
LT(1));
4750 astFactory.addASTChild(currentAST, tmp169_AST);
4752 primaryExpr_AST = (
TNode)currentAST.root;
4758 astFactory.addASTChild(currentAST, returnAST);
4759 primaryExpr_AST = (
TNode)currentAST.root;
4773 astFactory.addASTChild(currentAST, returnAST);
4774 primaryExpr_AST = (
TNode)currentAST.root;
4782 astFactory.addASTChild(currentAST, returnAST);
4783 primaryExpr_AST = (
TNode)currentAST.root;
4789 astFactory.addASTChild(currentAST, returnAST);
4790 primaryExpr_AST = (
TNode)currentAST.root;
4797 astFactory.addASTChild(currentAST, returnAST);
4799 if ( inputState.guessing==0 ) {
4800 primaryExpr_AST = (
TNode)currentAST.root;
4801 primaryExpr_AST = (
TNode)astFactory.make( (
new ASTArray(2)).add((
TNode)astFactory.create(
NExpressionGroup,
"(")).add(primaryExpr_AST));
4802 currentAST.root = primaryExpr_AST;
4803 currentAST.child = primaryExpr_AST!=
null &&primaryExpr_AST.getFirstChild()!=
null ?
4804 primaryExpr_AST.getFirstChild() : primaryExpr_AST;
4805 currentAST.advanceChildToEnd();
4807 primaryExpr_AST = (
TNode)currentAST.root;
4812 throw new NoViableAltException(
LT(1), getFilename());
4816 catch (RecognitionException ex) {
4817 if (inputState.guessing==0) {
4824 returnAST = primaryExpr_AST;
4827 public final void postfixSuffix() throws RecognitionException, TokenStreamException {
4830 ASTPair currentAST =
new ASTPair();
4831 TNode postfixSuffix_AST =
null;
4841 TNode tmp172_AST =
null;
4842 tmp172_AST = (
TNode)astFactory.create(
LT(1));
4843 astFactory.addASTChild(currentAST, tmp172_AST);
4845 TNode tmp173_AST =
null;
4846 tmp173_AST = (
TNode)astFactory.create(
LT(1));
4847 astFactory.addASTChild(currentAST, tmp173_AST);
4853 TNode tmp174_AST =
null;
4854 tmp174_AST = (
TNode)astFactory.create(
LT(1));
4855 astFactory.addASTChild(currentAST, tmp174_AST);
4857 TNode tmp175_AST =
null;
4858 tmp175_AST = (
TNode)astFactory.create(
LT(1));
4859 astFactory.addASTChild(currentAST, tmp175_AST);
4866 astFactory.addASTChild(currentAST, returnAST);
4871 TNode tmp176_AST =
null;
4872 tmp176_AST = (
TNode)astFactory.create(
LT(1));
4873 astFactory.addASTChild(currentAST, tmp176_AST);
4876 astFactory.addASTChild(currentAST, returnAST);
4877 TNode tmp177_AST =
null;
4878 tmp177_AST = (
TNode)astFactory.create(
LT(1));
4879 astFactory.addASTChild(currentAST, tmp177_AST);
4885 TNode tmp178_AST =
null;
4886 tmp178_AST = (
TNode)astFactory.create(
LT(1));
4887 astFactory.addASTChild(currentAST, tmp178_AST);
4893 TNode tmp179_AST =
null;
4894 tmp179_AST = (
TNode)astFactory.create(
LT(1));
4895 astFactory.addASTChild(currentAST, tmp179_AST);
4901 if ( _cnt200>=1 ) {
break _loop200; }
else {
throw new NoViableAltException(
LT(1), getFilename());}
4907 postfixSuffix_AST = (
TNode)currentAST.root;
4909 catch (RecognitionException ex) {
4910 if (inputState.guessing==0) {
4917 returnAST = postfixSuffix_AST;
4920 public final void functionCall() throws RecognitionException, TokenStreamException {
4923 ASTPair currentAST =
new ASTPair();
4924 TNode functionCall_AST =
null;
4928 TNode tmp180_AST =
null;
4929 tmp180_AST = (
TNode)astFactory.create(
LT(1));
4930 astFactory.makeASTRoot(currentAST, tmp180_AST);
4961 a_AST = (
TNode)returnAST;
4962 astFactory.addASTChild(currentAST, returnAST);
4971 throw new NoViableAltException(
LT(1), getFilename());
4975 TNode tmp181_AST =
null;
4976 tmp181_AST = (
TNode)astFactory.create(
LT(1));
4977 astFactory.addASTChild(currentAST, tmp181_AST);
4979 if ( inputState.guessing==0 ) {
4980 functionCall_AST = (
TNode)currentAST.root;
4985 functionCall_AST = (
TNode)currentAST.root;
4987 catch (RecognitionException ex) {
4988 if (inputState.guessing==0) {
4995 returnAST = functionCall_AST;
4998 public final void argExprList() throws RecognitionException, TokenStreamException {
5001 ASTPair currentAST =
new ASTPair();
5002 TNode argExprList_AST =
null;
5006 astFactory.addASTChild(currentAST, returnAST);
5010 if ((LA(1)==
COMMA)) {
5013 astFactory.addASTChild(currentAST, returnAST);
5021 argExprList_AST = (
TNode)currentAST.root;
5023 catch (RecognitionException ex) {
5024 if (inputState.guessing==0) {
5031 returnAST = argExprList_AST;
5034 protected final void charConst() throws RecognitionException, TokenStreamException {
5037 ASTPair currentAST =
new ASTPair();
5038 TNode charConst_AST =
null;
5041 TNode tmp183_AST =
null;
5042 tmp183_AST = (
TNode)astFactory.create(
LT(1));
5043 astFactory.addASTChild(currentAST, tmp183_AST);
5045 charConst_AST = (
TNode)currentAST.root;
5047 catch (RecognitionException ex) {
5048 if (inputState.guessing==0) {
5055 returnAST = charConst_AST;
5058 protected final void intConst() throws RecognitionException, TokenStreamException {
5061 ASTPair currentAST =
new ASTPair();
5062 TNode intConst_AST =
null;
5068 TNode tmp184_AST =
null;
5069 tmp184_AST = (
TNode)astFactory.create(
LT(1));
5070 astFactory.addASTChild(currentAST, tmp184_AST);
5072 intConst_AST = (
TNode)currentAST.root;
5077 TNode tmp185_AST =
null;
5078 tmp185_AST = (
TNode)astFactory.create(
LT(1));
5079 astFactory.addASTChild(currentAST, tmp185_AST);
5081 intConst_AST = (
TNode)currentAST.root;
5086 TNode tmp186_AST =
null;
5087 tmp186_AST = (
TNode)astFactory.create(
LT(1));
5088 astFactory.addASTChild(currentAST, tmp186_AST);
5090 intConst_AST = (
TNode)currentAST.root;
5095 TNode tmp187_AST =
null;
5096 tmp187_AST = (
TNode)astFactory.create(
LT(1));
5097 astFactory.addASTChild(currentAST, tmp187_AST);
5099 intConst_AST = (
TNode)currentAST.root;
5104 TNode tmp188_AST =
null;
5105 tmp188_AST = (
TNode)astFactory.create(
LT(1));
5106 astFactory.addASTChild(currentAST, tmp188_AST);
5108 intConst_AST = (
TNode)currentAST.root;
5113 TNode tmp189_AST =
null;
5114 tmp189_AST = (
TNode)astFactory.create(
LT(1));
5115 astFactory.addASTChild(currentAST, tmp189_AST);
5117 intConst_AST = (
TNode)currentAST.root;
5122 TNode tmp190_AST =
null;
5123 tmp190_AST = (
TNode)astFactory.create(
LT(1));
5124 astFactory.addASTChild(currentAST, tmp190_AST);
5126 intConst_AST = (
TNode)currentAST.root;
5131 TNode tmp191_AST =
null;
5132 tmp191_AST = (
TNode)astFactory.create(
LT(1));
5133 astFactory.addASTChild(currentAST, tmp191_AST);
5135 intConst_AST = (
TNode)currentAST.root;
5140 TNode tmp192_AST =
null;
5141 tmp192_AST = (
TNode)astFactory.create(
LT(1));
5142 astFactory.addASTChild(currentAST, tmp192_AST);
5144 intConst_AST = (
TNode)currentAST.root;
5149 throw new NoViableAltException(
LT(1), getFilename());
5153 catch (RecognitionException ex) {
5154 if (inputState.guessing==0) {
5161 returnAST = intConst_AST;
5164 protected final void floatConst() throws RecognitionException, TokenStreamException {
5167 ASTPair currentAST =
new ASTPair();
5168 TNode floatConst_AST =
null;
5174 TNode tmp193_AST =
null;
5175 tmp193_AST = (
TNode)astFactory.create(
LT(1));
5176 astFactory.addASTChild(currentAST, tmp193_AST);
5178 floatConst_AST = (
TNode)currentAST.root;
5183 TNode tmp194_AST =
null;
5184 tmp194_AST = (
TNode)astFactory.create(
LT(1));
5185 astFactory.addASTChild(currentAST, tmp194_AST);
5187 floatConst_AST = (
TNode)currentAST.root;
5192 TNode tmp195_AST =
null;
5193 tmp195_AST = (
TNode)astFactory.create(
LT(1));
5194 astFactory.addASTChild(currentAST, tmp195_AST);
5196 floatConst_AST = (
TNode)currentAST.root;
5201 throw new NoViableAltException(
LT(1), getFilename());
5205 catch (RecognitionException ex) {
5206 if (inputState.guessing==0) {
5213 returnAST = floatConst_AST;
5216 protected final void stringConst() throws RecognitionException, TokenStreamException {
5219 ASTPair currentAST =
new ASTPair();
5220 TNode stringConst_AST =
null;
5228 TNode tmp196_AST =
null;
5229 tmp196_AST = (
TNode)astFactory.create(
LT(1));
5230 astFactory.addASTChild(currentAST, tmp196_AST);
5234 if ( _cnt210>=1 ) {
break _loop210; }
else {
throw new NoViableAltException(
LT(1), getFilename());}
5240 if ( inputState.guessing==0 ) {
5241 stringConst_AST = (
TNode)currentAST.root;
5242 stringConst_AST = (
TNode)astFactory.make( (
new ASTArray(2)).add((
TNode)astFactory.create(
NStringSeq)).add(stringConst_AST));
5243 currentAST.root = stringConst_AST;
5244 currentAST.child = stringConst_AST!=
null &&stringConst_AST.getFirstChild()!=
null ?
5245 stringConst_AST.getFirstChild() : stringConst_AST;
5246 currentAST.advanceChildToEnd();
5248 stringConst_AST = (
TNode)currentAST.root;
5250 catch (RecognitionException ex) {
5251 if (inputState.guessing==0) {
5258 returnAST = stringConst_AST;
5261 public final void dummy() throws RecognitionException, TokenStreamException {
5264 ASTPair currentAST =
new ASTPair();
5265 TNode dummy_AST =
null;
5271 TNode tmp197_AST =
null;
5272 tmp197_AST = (
TNode)astFactory.create(
LT(1));
5273 astFactory.addASTChild(currentAST, tmp197_AST);
5275 dummy_AST = (
TNode)currentAST.root;
5280 TNode tmp198_AST =
null;
5281 tmp198_AST = (
TNode)astFactory.create(
LT(1));
5282 astFactory.addASTChild(currentAST, tmp198_AST);
5284 dummy_AST = (
TNode)currentAST.root;
5289 TNode tmp199_AST =
null;
5290 tmp199_AST = (
TNode)astFactory.create(
LT(1));
5291 astFactory.addASTChild(currentAST, tmp199_AST);
5293 dummy_AST = (
TNode)currentAST.root;
5298 TNode tmp200_AST =
null;
5299 tmp200_AST = (
TNode)astFactory.create(
LT(1));
5300 astFactory.addASTChild(currentAST, tmp200_AST);
5302 dummy_AST = (
TNode)currentAST.root;
5307 TNode tmp201_AST =
null;
5308 tmp201_AST = (
TNode)astFactory.create(
LT(1));
5309 astFactory.addASTChild(currentAST, tmp201_AST);
5311 dummy_AST = (
TNode)currentAST.root;
5316 TNode tmp202_AST =
null;
5317 tmp202_AST = (
TNode)astFactory.create(
LT(1));
5318 astFactory.addASTChild(currentAST, tmp202_AST);
5320 dummy_AST = (
TNode)currentAST.root;
5325 TNode tmp203_AST =
null;
5326 tmp203_AST = (
TNode)astFactory.create(
LT(1));
5327 astFactory.addASTChild(currentAST, tmp203_AST);
5329 dummy_AST = (
TNode)currentAST.root;
5334 TNode tmp204_AST =
null;
5335 tmp204_AST = (
TNode)astFactory.create(
LT(1));
5336 astFactory.addASTChild(currentAST, tmp204_AST);
5338 dummy_AST = (
TNode)currentAST.root;
5343 TNode tmp205_AST =
null;
5344 tmp205_AST = (
TNode)astFactory.create(
LT(1));
5345 astFactory.addASTChild(currentAST, tmp205_AST);
5347 dummy_AST = (
TNode)currentAST.root;
5352 TNode tmp206_AST =
null;
5353 tmp206_AST = (
TNode)astFactory.create(
LT(1));
5354 astFactory.addASTChild(currentAST, tmp206_AST);
5356 dummy_AST = (
TNode)currentAST.root;
5361 TNode tmp207_AST =
null;
5362 tmp207_AST = (
TNode)astFactory.create(
LT(1));
5363 astFactory.addASTChild(currentAST, tmp207_AST);
5365 dummy_AST = (
TNode)currentAST.root;
5370 TNode tmp208_AST =
null;
5371 tmp208_AST = (
TNode)astFactory.create(
LT(1));
5372 astFactory.addASTChild(currentAST, tmp208_AST);
5374 dummy_AST = (
TNode)currentAST.root;
5379 TNode tmp209_AST =
null;
5380 tmp209_AST = (
TNode)astFactory.create(
LT(1));
5381 astFactory.addASTChild(currentAST, tmp209_AST);
5383 dummy_AST = (
TNode)currentAST.root;
5388 TNode tmp210_AST =
null;
5389 tmp210_AST = (
TNode)astFactory.create(
LT(1));
5390 astFactory.addASTChild(currentAST, tmp210_AST);
5392 dummy_AST = (
TNode)currentAST.root;
5397 TNode tmp211_AST =
null;
5398 tmp211_AST = (
TNode)astFactory.create(
LT(1));
5399 astFactory.addASTChild(currentAST, tmp211_AST);
5401 dummy_AST = (
TNode)currentAST.root;
5406 TNode tmp212_AST =
null;
5407 tmp212_AST = (
TNode)astFactory.create(
LT(1));
5408 astFactory.addASTChild(currentAST, tmp212_AST);
5410 dummy_AST = (
TNode)currentAST.root;
5415 TNode tmp213_AST =
null;
5416 tmp213_AST = (
TNode)astFactory.create(
LT(1));
5417 astFactory.addASTChild(currentAST, tmp213_AST);
5419 dummy_AST = (
TNode)currentAST.root;
5424 TNode tmp214_AST =
null;
5425 tmp214_AST = (
TNode)astFactory.create(
LT(1));
5426 astFactory.addASTChild(currentAST, tmp214_AST);
5428 dummy_AST = (
TNode)currentAST.root;
5433 TNode tmp215_AST =
null;
5434 tmp215_AST = (
TNode)astFactory.create(
LT(1));
5435 astFactory.addASTChild(currentAST, tmp215_AST);
5437 dummy_AST = (
TNode)currentAST.root;
5442 TNode tmp216_AST =
null;
5443 tmp216_AST = (
TNode)astFactory.create(
LT(1));
5444 astFactory.addASTChild(currentAST, tmp216_AST);
5446 dummy_AST = (
TNode)currentAST.root;
5451 TNode tmp217_AST =
null;
5452 tmp217_AST = (
TNode)astFactory.create(
LT(1));
5453 astFactory.addASTChild(currentAST, tmp217_AST);
5455 dummy_AST = (
TNode)currentAST.root;
5460 TNode tmp218_AST =
null;
5461 tmp218_AST = (
TNode)astFactory.create(
LT(1));
5462 astFactory.addASTChild(currentAST, tmp218_AST);
5464 dummy_AST = (
TNode)currentAST.root;
5469 TNode tmp219_AST =
null;
5470 tmp219_AST = (
TNode)astFactory.create(
LT(1));
5471 astFactory.addASTChild(currentAST, tmp219_AST);
5473 dummy_AST = (
TNode)currentAST.root;
5478 TNode tmp220_AST =
null;
5479 tmp220_AST = (
TNode)astFactory.create(
LT(1));
5480 astFactory.addASTChild(currentAST, tmp220_AST);
5482 dummy_AST = (
TNode)currentAST.root;
5487 TNode tmp221_AST =
null;
5488 tmp221_AST = (
TNode)astFactory.create(
LT(1));
5489 astFactory.addASTChild(currentAST, tmp221_AST);
5491 dummy_AST = (
TNode)currentAST.root;
5496 TNode tmp222_AST =
null;
5497 tmp222_AST = (
TNode)astFactory.create(
LT(1));
5498 astFactory.addASTChild(currentAST, tmp222_AST);
5500 dummy_AST = (
TNode)currentAST.root;
5505 TNode tmp223_AST =
null;
5506 tmp223_AST = (
TNode)astFactory.create(
LT(1));
5507 astFactory.addASTChild(currentAST, tmp223_AST);
5509 dummy_AST = (
TNode)currentAST.root;
5514 TNode tmp224_AST =
null;
5515 tmp224_AST = (
TNode)astFactory.create(
LT(1));
5516 astFactory.addASTChild(currentAST, tmp224_AST);
5518 dummy_AST = (
TNode)currentAST.root;
5523 throw new NoViableAltException(
LT(1), getFilename());
5527 catch (RecognitionException ex) {
5528 if (inputState.guessing==0) {
5535 returnAST = dummy_AST;
5543 "NULL_TREE_LOOKAHEAD",
5643 "UnsignedOctalConst",
5651 "DoubleDoubleConst",
5656 "NStructDeclarator",
5661 "NFunctionCallArgs",
5662 "NNonemptyAbstractDeclarator",
5666 "NParameterTypeList",
5668 "NCompoundStatement",
5669 "NParameterDeclaration",
5676 "NInitializerElementLabel",
5677 "NLcurlyInitializer",
5702 tokenTypeToASTClassMap=
null;
5705 private static final long[] mk_tokenSet_0() {
5706 long[] data = { 2L, 0L, 0L};
5710 private static final long[] mk_tokenSet_1() {
5711 long[] data = { 219902325554288L, 0L, 0L};
5715 private static final long[] mk_tokenSet_2() {
5716 long[] data = { 8796093021264L, 0L, 0L};
5720 private static final long[] mk_tokenSet_3() {
5721 long[] data = { 219902325554896L, 0L, 0L};
5725 private static final long[] mk_tokenSet_4() {
5726 long[] data = { 219902325529664L, 0L, 0L};
5730 private static final long[] mk_tokenSet_5() {
5731 long[] data = { 3034652092661456L, 0L, 0L};
5735 private static final long[] mk_tokenSet_6() {
5736 long[] data = { 219902325554290L, 0L, 0L};
5740 private static final long[] mk_tokenSet_7() {
5741 long[] data = { -4613717915915517966L, 562923965546496L, 0L, 0L};
5745 private static final long[] mk_tokenSet_8() {
5746 long[] data = { 8796092996672L, 0L, 0L};
5750 private static final long[] mk_tokenSet_9() {
5751 long[] data = { 219902325529792L, 0L, 0L};
5755 private static final long[] mk_tokenSet_10() {
5756 long[] data = { 215504279044096L, 0L, 0L};
5760 private static final long[] mk_tokenSet_11() {
5761 long[] data = { 215504279044096L, 562923965546496L, 0L, 0L};
5765 private static final long[] mk_tokenSet_12() {
5766 long[] data = { 1433763162620672L, 0L, 0L};
5770 private static final long[] mk_tokenSet_13() {
5771 long[] data = { 8796092767232L, 0L, 0L};
5775 private static final long[] mk_tokenSet_14() {
5776 long[] data = { 1073123348709072L, 0L, 0L};
5780 private static final long[] mk_tokenSet_15() {
5781 long[] data = { 1068725302198784L, 0L, 0L};
5785 private static final long[] mk_tokenSet_16() {
5786 long[] data = { 512L, 0L, 0L};
5790 private static final long[] mk_tokenSet_17() {
5791 long[] data = { 1073123348708944L, 0L, 0L};
5795 private static final long[] mk_tokenSet_18() {
5796 long[] data = { 1090715534753360L, 0L, 0L};
5800 private static final long[] mk_tokenSet_19() {
5801 long[] data = { 4398046511232L, 0L, 0L};
5805 private static final long[] mk_tokenSet_20() {
5806 long[] data = { 8796092898368L, 0L, 0L};
5810 private static final long[] mk_tokenSet_21() {
5811 long[] data = { 256L, 0L, 0L};
5815 private static final long[] mk_tokenSet_22() {
5816 long[] data = { 8796092898624L, 0L, 0L};
5820 private static final long[] mk_tokenSet_23() {
5821 long[] data = { 1081919441607872L, 0L, 0L};
5825 private static final long[] mk_tokenSet_24() {
5826 long[] data = { 1077521395220480L, 0L, 0L};
5830 private static final long[] mk_tokenSet_25() {
5831 long[] data = { 8796093022720L, 0L, 0L};
5835 private static final long[] mk_tokenSet_26() {
5836 long[] data = { 1152288185910016L, 0L, 0L};
5840 private static final long[] mk_tokenSet_27() {
5841 long[] data = { 1073123348708560L, 0L, 0L};
5845 private static final long[] mk_tokenSet_28() {
5846 long[] data = { 3307330976349904L, 0L, 0L};
5850 private static final long[] mk_tokenSet_29() {
5851 long[] data = { 2603643534573264L, 0L, 0L};
5855 private static final long[] mk_tokenSet_30() {
5856 long[] data = { 8796093022464L, 0L, 0L};
5860 private static final long[] mk_tokenSet_31() {
5861 long[] data = { 8796093022976L, 0L, 0L};
5865 private static final long[] mk_tokenSet_32() {
5866 long[] data = { 998356558020608L, 0L, 0L};
5870 private static final long[] mk_tokenSet_33() {
5871 long[] data = { 281474976710656L, 0L, 0L};
5875 private static final long[] mk_tokenSet_34() {
5876 long[] data = { 215504279044224L, 562923965546496L, 0L, 0L};
5880 private static final long[] mk_tokenSet_35() {
5881 long[] data = { 1068725302329408L, 0L, 0L};
5885 private static final long[] mk_tokenSet_36() {
5886 long[] data = { 774056185954304L, 0L, 0L};
5890 private static final long[] mk_tokenSet_37() {
5891 long[] data = { 2199023255551056L, 562923965546496L, 0L, 0L};
5895 private static final long[] mk_tokenSet_38() {
5896 long[] data = { 290271069732864L, 0L, 0L};
5900 private static final long[] mk_tokenSet_39() {
5901 long[] data = { -4615974113775713408L, 562923965546496L, 0L, 0L};
5905 private static final long[] mk_tokenSet_40() {
5906 long[] data = { -3659174697238542L, 562949953421311L, 0L, 0L};
5910 private static final long[] mk_tokenSet_41() {
5911 long[] data = { -4283697301815310L, 562923965546496L, 0L, 0L};
5915 private static final long[] mk_tokenSet_42() {
5916 long[] data = { -4615974113775713664L, 562923965546496L, 0L, 0L};
5920 private static final long[] mk_tokenSet_43() {
5921 long[] data = { -4288095348325504L, 562923965546496L, 0L, 0L};
5925 private static final long[] mk_tokenSet_44() {
5926 long[] data = { 826832743964224L, 562949953421311L, 0L, 0L};
5930 private static final long[] mk_tokenSet_45() {
5931 long[] data = { -3659174697238576L, 562949953421311L, 0L, 0L};
5935 private static final long[] mk_tokenSet_46() {
5936 long[] data = { 1468947534709504L, 1023L, 0L, 0L};
5940 private static final long[] mk_tokenSet_47() {
5941 long[] data = { 1468947534709504L, 2047L, 0L, 0L};
5945 private static final long[] mk_tokenSet_48() {
5946 long[] data = { 1468947534709504L, 4095L, 0L, 0L};
5950 private static final long[] mk_tokenSet_49() {
5951 long[] data = { 1468947534709504L, 8191L, 0L, 0L};
5955 private static final long[] mk_tokenSet_50() {
5956 long[] data = { 1468947534709504L, 16383L, 0L, 0L};
5960 private static final long[] mk_tokenSet_51() {
5961 long[] data = { 1468947534709504L, 32767L, 0L, 0L};
5965 private static final long[] mk_tokenSet_52() {
5966 long[] data = { 1468947534709504L, 65535L, 0L, 0L};
5970 private static final long[] mk_tokenSet_53() {
5971 long[] data = { 1468947534709504L, 262143L, 0L, 0L};
5975 private static final long[] mk_tokenSet_54() {
5976 long[] data = { 1468947534709504L, 4194303L, 0L, 0L};
5980 private static final long[] mk_tokenSet_55() {
5981 long[] data = { 1468947534709504L, 16777215L, 0L, 0L};
5985 private static final long[] mk_tokenSet_56() {
5986 long[] data = { 70368744177664L, 201326592L, 0L, 0L};
5990 private static final long[] mk_tokenSet_57() {
5991 long[] data = { 1468947534709504L, 67108863L, 0L, 0L};
5995 private static final long[] mk_tokenSet_58() {
5996 long[] data = { 2247401767174912L, 562949953421311L, 0L, 0L};
6000 private static final long[] mk_tokenSet_59() {
6001 long[] data = { 1539316278887168L, 268435455L, 0L, 0L};
6005 private static final long[] mk_tokenSet_60() {
6006 long[] data = { 2243003720663808L, 26843545599L, 0L, 0L};
void popScope()
pop the last scope off the scope stack.
TNode add(final String name, final TNode node)
add a node to the table with it's key as the current scope and the name
TNode lookupNameInCurrentScope(final String name)
lookup an unscoped name in the table by prepending the current scope.
void pushScope(final String s)
push a new scope onto the scope stack.
static final BitSet _tokenSet_57
static final BitSet _tokenSet_31
static final BitSet _tokenSet_13
static final BitSet _tokenSet_60
static final BitSet _tokenSet_12
final void structDeclarator()
static final BitSet _tokenSet_40
static final BitSet _tokenSet_42
StdCParser(TokenStream lexer)
static final BitSet _tokenSet_53
static boolean CPPComments
final void conditionalExpr()
static final BitSet _tokenSet_3
final void unaryOperator()
final void initDeclList(AST declarationSpecifiers)
static final BitSet _tokenSet_48
final void structDeclarationList()
void traceOut(String rname)
static final BitSet _tokenSet_52
static final BitSet _tokenSet_49
final void parameterTypeList()
final void functionDeclSpecifiers()
static final BitSet _tokenSet_43
final void inclusiveOrExpr()
static final BitSet _tokenSet_33
static final BitSet _tokenSet_16
final void functionStorageClassSpecifier()
final void logicalAndExpr()
final void translationUnit()
StdCParser(TokenStream lexer, int k)
static final BitSet _tokenSet_39
final void postfixSuffix()
static final BitSet _tokenSet_44
static final BitSet _tokenSet_36
static final BitSet _tokenSet_51
final void compoundStatement(String scopeName)
static final BitSet _tokenSet_25
static final BitSet _tokenSet_37
static final BitSet _tokenSet_4
static final BitSet _tokenSet_28
static final BitSet _tokenSet_55
final void enumList(String enumName)
static final BitSet _tokenSet_21
final void specifierQualifierList()
boolean isTypedefName(String name)
final void exclusiveOrExpr()
static final String[] _tokenNames
static final BitSet _tokenSet_45
static final BitSet _tokenSet_29
static final BitSet _tokenSet_0
final void logicalOrExpr()
final void initializerList()
static final BitSet _tokenSet_24
final void structDeclaration()
static final BitSet _tokenSet_34
static final BitSet _tokenSet_58
final int typeSpecifier(int specCount)
final void storageClassSpecifier()
static final BitSet _tokenSet_32
static final BitSet _tokenSet_6
void setDebug(boolean debug)
final void additiveExpr()
static final BitSet _tokenSet_46
final void structOrUnion()
StdCParser(TokenBuffer tokenBuf, int k)
final void structOrUnionSpecifier()
static final BitSet _tokenSet_30
final void enumSpecifier()
StdCParser(ParserSharedInputState state)
final void assignOperator()
static final BitSet _tokenSet_2
final void enumerator(String enumName)
static final BitSet _tokenSet_35
static final BitSet _tokenSet_10
final void pointerGroup()
static final BitSet _tokenSet_8
final void structDeclaratorList()
final void relationalExpr()
static final BitSet _tokenSet_14
StdCParser(TokenBuffer tokenBuf)
final void typeQualifier()
static final BitSet _tokenSet_18
final void declarationList()
static final BitSet _tokenSet_50
static final BitSet _tokenSet_56
final void equalityExpr()
static final BitSet _tokenSet_17
void pushScope(String scopeName)
final void statementList()
void reportError(String s)
final void functionCall()
static final BitSet _tokenSet_9
static final BitSet _tokenSet_38
static final BitSet _tokenSet_7
static final BitSet _tokenSet_26
static final BitSet _tokenSet_1
final void parameterDeclaration()
static final BitSet _tokenSet_41
static final BitSet _tokenSet_54
static final BitSet _tokenSet_5
final String declarator(boolean isFunctionDefinition)
final void declarationPredictor()
static final BitSet _tokenSet_15
final void declSpecifiers()
static final BitSet _tokenSet_20
final void initDecl(AST declarationSpecifiers)
void reportWarning(String s)
void traceIn(String rname)
static final BitSet _tokenSet_59
void buildTokenTypeASTClassMap()
static final BitSet _tokenSet_11
final void externalList()
static final BitSet _tokenSet_27
static final BitSet _tokenSet_19
static final BitSet _tokenSet_22
void reportError(RecognitionException ex)
static final BitSet _tokenSet_47
static final BitSet _tokenSet_23
final void nonemptyAbstractDeclarator()
Class TNode is an implementation of the AST interface and adds many useful features:
int getType()
Get the token type for this node.
void setText(final String text_)
Set the token text for this node.
String getText()
Get the token text for this node.
void setType(final int ttype_)
Set the token type for this node.
int NParameterDeclaration
int NNonemptyAbstractDeclarator
int NInitializerElementLabel