com.jogamp.gluegen.cgram.StdCParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gluegen-rt Show documentation
Show all versions of gluegen-rt Show documentation
JNI binding generator (runtime)
// $ANTLR 2.7.7 (2006-11-01): "StdCParser.g" -> "StdCParser.java"$
package com.jogamp.gluegen.cgram;
import java.io.*;
import antlr.CommonAST;
import antlr.DumpASTVisitor;
import antlr.TokenBuffer;
import antlr.TokenStreamException;
import antlr.TokenStreamIOException;
import antlr.ANTLRException;
import antlr.LLkParser;
import antlr.Token;
import antlr.TokenStream;
import antlr.RecognitionException;
import antlr.NoViableAltException;
import antlr.MismatchedTokenException;
import antlr.SemanticException;
import antlr.ParserSharedInputState;
import antlr.collections.impl.BitSet;
import antlr.collections.AST;
import java.util.Hashtable;
import antlr.ASTFactory;
import antlr.ASTPair;
import antlr.collections.impl.ASTArray;
public class StdCParser extends antlr.LLkParser implements STDCTokenTypes
{
// Suppport C++-style single-line comments?
public static boolean CPPComments = true;
// access to symbol table
public CSymbolTable symbolTable = new CSymbolTable();
// source for names to unnamed scopes
protected int unnamedScopeCounter = 0;
public boolean isTypedefName(String name) {
boolean returnValue = false;
TNode node = symbolTable.lookupNameInCurrentScope(name);
for (; node != null; node = (TNode) node.getNextSibling() ) {
if(node.getType() == LITERAL_typedef) {
returnValue = true;
break;
}
}
return returnValue;
}
public String getAScopeName() {
return "" + (unnamedScopeCounter++);
}
public void pushScope(String scopeName) {
symbolTable.pushScope(scopeName);
}
public void popScope() {
symbolTable.popScope();
}
int traceDepth = 0;
public void reportError(RecognitionException ex) {
try {
System.err.println("ANTLR Parsing Error: "+ex + " token name:" + tokenNames[LA(1)]);
ex.printStackTrace(System.err);
}
catch (TokenStreamException e) {
System.err.println("ANTLR Parsing Error: "+ex);
ex.printStackTrace(System.err);
}
}
public void reportError(String s) {
System.err.println("ANTLR Parsing Error from String: " + s);
}
public void reportWarning(String s) {
System.err.println("ANTLR Parsing Warning from String: " + s);
}
public void match(int t) throws MismatchedTokenException {
boolean debugging = false;
if ( debugging ) {
for (int x=0; x0)?" [inputState.guessing "+ inputState.guessing + "]":""));
}
catch (TokenStreamException e) {
System.out.println("Match("+tokenNames[t]+") " + ((inputState.guessing>0)?" [inputState.guessing "+ inputState.guessing + "]":""));
}
}
try {
if ( LA(1)!=t ) {
if ( debugging ){
for (int x=0; x "+rname+"; LA(1)==("+ tokenNames[LT(1).getType()]
+ ") " + LT(1).getText() + " [inputState.guessing "+ inputState.guessing + "]");
}
catch (TokenStreamException e) {
}
}
public void traceOut(String rname) {
for (int x=0; x=1 ) { break _loop4; } else {throw new NoViableAltException(LT(1), getFilename());}
}
_cnt4++;
} while (true);
}
externalList_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_0);
} else {
throw ex;
}
}
returnAST = externalList_AST;
}
public final void externalDef() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode externalDef_AST = null;
try { // for error handling
boolean synPredMatched7 = false;
if (((_tokenSet_2.member(LA(1))) && (_tokenSet_3.member(LA(2))))) {
int _m7 = mark();
synPredMatched7 = true;
inputState.guessing++;
try {
{
if ((LA(1)==LITERAL_typedef) && (true)) {
match(LITERAL_typedef);
}
else if ((_tokenSet_2.member(LA(1))) && (_tokenSet_3.member(LA(2)))) {
declaration();
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
}
catch (RecognitionException pe) {
synPredMatched7 = false;
}
rewind(_m7);
inputState.guessing--;
}
if ( synPredMatched7 ) {
declaration();
astFactory.addASTChild(currentAST, returnAST);
externalDef_AST = (TNode)currentAST.root;
}
else if ((_tokenSet_4.member(LA(1))) && (_tokenSet_5.member(LA(2)))) {
functionDef();
astFactory.addASTChild(currentAST, returnAST);
externalDef_AST = (TNode)currentAST.root;
}
else if ((LA(1)==LITERAL_asm)) {
asm_expr();
astFactory.addASTChild(currentAST, returnAST);
externalDef_AST = (TNode)currentAST.root;
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_6);
} else {
throw ex;
}
}
returnAST = externalDef_AST;
}
public final void declaration() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode declaration_AST = null;
TNode ds_AST = null;
AST ds1 = null;
try { // for error handling
declSpecifiers();
ds_AST = (TNode)returnAST;
astFactory.addASTChild(currentAST, returnAST);
if ( inputState.guessing==0 ) {
ds1 = astFactory.dupList(ds_AST);
}
{
switch ( LA(1)) {
case ID:
case STAR:
case LPAREN:
{
initDeclList(ds1);
astFactory.addASTChild(currentAST, returnAST);
break;
}
case SEMI:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
match(SEMI);
if ( inputState.guessing==0 ) {
declaration_AST = (TNode)currentAST.root;
declaration_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NDeclaration)).add(declaration_AST));
currentAST.root = declaration_AST;
currentAST.child = declaration_AST!=null &&declaration_AST.getFirstChild()!=null ?
declaration_AST.getFirstChild() : declaration_AST;
currentAST.advanceChildToEnd();
}
declaration_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_7);
} else {
throw ex;
}
}
returnAST = declaration_AST;
}
public final void functionDef() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode functionDef_AST = null;
TNode ds_AST = null;
TNode d_AST = null;
String declName;
try { // for error handling
{
boolean synPredMatched94 = false;
if (((_tokenSet_8.member(LA(1))) && (_tokenSet_9.member(LA(2))))) {
int _m94 = mark();
synPredMatched94 = true;
inputState.guessing++;
try {
{
functionDeclSpecifiers();
}
}
catch (RecognitionException pe) {
synPredMatched94 = false;
}
rewind(_m94);
inputState.guessing--;
}
if ( synPredMatched94 ) {
functionDeclSpecifiers();
ds_AST = (TNode)returnAST;
astFactory.addASTChild(currentAST, returnAST);
}
else if ((_tokenSet_10.member(LA(1))) && (_tokenSet_5.member(LA(2)))) {
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
declName=declarator(true);
d_AST = (TNode)returnAST;
astFactory.addASTChild(currentAST, returnAST);
if ( inputState.guessing==0 ) {
AST d2, ds2;
d2 = astFactory.dupList(d_AST);
ds2 = astFactory.dupList(ds_AST);
symbolTable.add(declName, (TNode)astFactory.make( (new ASTArray(3)).add(null).add(ds2).add(d2)));
pushScope(declName);
}
{
_loop96:
do {
if ((_tokenSet_2.member(LA(1)))) {
declaration();
astFactory.addASTChild(currentAST, returnAST);
}
else {
break _loop96;
}
} while (true);
}
{
switch ( LA(1)) {
case VARARGS:
{
TNode tmp2_AST = null;
tmp2_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp2_AST);
match(VARARGS);
break;
}
case LCURLY:
case SEMI:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
{
_loop99:
do {
if ((LA(1)==SEMI)) {
match(SEMI);
}
else {
break _loop99;
}
} while (true);
}
if ( inputState.guessing==0 ) {
popScope();
}
compoundStatement(declName);
astFactory.addASTChild(currentAST, returnAST);
if ( inputState.guessing==0 ) {
functionDef_AST = (TNode)currentAST.root;
functionDef_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NFunctionDef)).add(functionDef_AST));
currentAST.root = functionDef_AST;
currentAST.child = functionDef_AST!=null &&functionDef_AST.getFirstChild()!=null ?
functionDef_AST.getFirstChild() : functionDef_AST;
currentAST.advanceChildToEnd();
}
functionDef_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_6);
} else {
throw ex;
}
}
returnAST = functionDef_AST;
}
public final void asm_expr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode asm_expr_AST = null;
try { // for error handling
TNode tmp4_AST = null;
tmp4_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp4_AST);
match(LITERAL_asm);
{
switch ( LA(1)) {
case LITERAL_volatile:
{
TNode tmp5_AST = null;
tmp5_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp5_AST);
match(LITERAL_volatile);
break;
}
case LCURLY:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
match(LCURLY);
expr();
astFactory.addASTChild(currentAST, returnAST);
match(RCURLY);
match(SEMI);
asm_expr_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_6);
} else {
throw ex;
}
}
returnAST = asm_expr_AST;
}
public final void expr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode expr_AST = null;
Token c = null;
TNode c_AST = null;
try { // for error handling
assignExpr();
astFactory.addASTChild(currentAST, returnAST);
{
_loop129:
do {
if ((LA(1)==COMMA) && (_tokenSet_11.member(LA(2)))) {
c = LT(1);
c_AST = (TNode)astFactory.create(c);
astFactory.makeASTRoot(currentAST, c_AST);
match(COMMA);
if ( inputState.guessing==0 ) {
c_AST.setType(NCommaExpr);
}
assignExpr();
astFactory.addASTChild(currentAST, returnAST);
}
else {
break _loop129;
}
} while (true);
}
expr_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_12);
} else {
throw ex;
}
}
returnAST = expr_AST;
}
public final void declSpecifiers() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode declSpecifiers_AST = null;
TNode s_AST = null;
int specCount=0;
try { // for error handling
{
int _cnt16=0;
_loop16:
do {
switch ( LA(1)) {
case LITERAL_typedef:
case LITERAL_auto:
case LITERAL_register:
case LITERAL_extern:
case LITERAL_static:
{
storageClassSpecifier();
s_AST = (TNode)returnAST;
astFactory.addASTChild(currentAST, returnAST);
break;
}
case LITERAL_volatile:
case LITERAL_const:
{
typeQualifier();
astFactory.addASTChild(currentAST, returnAST);
break;
}
default:
boolean synPredMatched15 = false;
if (((_tokenSet_13.member(LA(1))) && (_tokenSet_14.member(LA(2))))) {
int _m15 = mark();
synPredMatched15 = true;
inputState.guessing++;
try {
{
if ((LA(1)==LITERAL_struct) && (true)) {
match(LITERAL_struct);
}
else if ((LA(1)==LITERAL_union) && (true)) {
match(LITERAL_union);
}
else if ((LA(1)==LITERAL_enum) && (true)) {
match(LITERAL_enum);
}
else if ((_tokenSet_13.member(LA(1))) && (true)) {
typeSpecifier(specCount);
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
}
catch (RecognitionException pe) {
synPredMatched15 = false;
}
rewind(_m15);
inputState.guessing--;
}
if ( synPredMatched15 ) {
specCount=typeSpecifier(specCount);
astFactory.addASTChild(currentAST, returnAST);
}
else {
if ( _cnt16>=1 ) { break _loop16; } else {throw new NoViableAltException(LT(1), getFilename());}
}
}
_cnt16++;
} while (true);
}
declSpecifiers_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_15);
} else {
throw ex;
}
}
returnAST = declSpecifiers_AST;
}
public final void initDeclList(
AST declarationSpecifiers
) throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode initDeclList_AST = null;
try { // for error handling
initDecl(declarationSpecifiers);
astFactory.addASTChild(currentAST, returnAST);
{
_loop56:
do {
if ((LA(1)==COMMA)) {
match(COMMA);
initDecl(declarationSpecifiers);
astFactory.addASTChild(currentAST, returnAST);
}
else {
break _loop56;
}
} while (true);
}
initDeclList_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_16);
} else {
throw ex;
}
}
returnAST = initDeclList_AST;
}
public final void storageClassSpecifier() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode storageClassSpecifier_AST = null;
try { // for error handling
switch ( LA(1)) {
case LITERAL_auto:
{
TNode tmp10_AST = null;
tmp10_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp10_AST);
match(LITERAL_auto);
storageClassSpecifier_AST = (TNode)currentAST.root;
break;
}
case LITERAL_register:
{
TNode tmp11_AST = null;
tmp11_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp11_AST);
match(LITERAL_register);
storageClassSpecifier_AST = (TNode)currentAST.root;
break;
}
case LITERAL_typedef:
{
TNode tmp12_AST = null;
tmp12_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp12_AST);
match(LITERAL_typedef);
storageClassSpecifier_AST = (TNode)currentAST.root;
break;
}
case LITERAL_extern:
case LITERAL_static:
{
functionStorageClassSpecifier();
astFactory.addASTChild(currentAST, returnAST);
storageClassSpecifier_AST = (TNode)currentAST.root;
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_17);
} else {
throw ex;
}
}
returnAST = storageClassSpecifier_AST;
}
public final void typeQualifier() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode typeQualifier_AST = null;
try { // for error handling
switch ( LA(1)) {
case LITERAL_const:
{
TNode tmp13_AST = null;
tmp13_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp13_AST);
match(LITERAL_const);
typeQualifier_AST = (TNode)currentAST.root;
break;
}
case LITERAL_volatile:
{
TNode tmp14_AST = null;
tmp14_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp14_AST);
match(LITERAL_volatile);
typeQualifier_AST = (TNode)currentAST.root;
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_18);
} else {
throw ex;
}
}
returnAST = typeQualifier_AST;
}
public final int typeSpecifier(
int specCount
) throws RecognitionException, TokenStreamException {
int retSpecCount;
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode typeSpecifier_AST = null;
retSpecCount = specCount + 1;
try { // for error handling
{
switch ( LA(1)) {
case LITERAL_void:
{
TNode tmp15_AST = null;
tmp15_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp15_AST);
match(LITERAL_void);
break;
}
case LITERAL_char:
{
TNode tmp16_AST = null;
tmp16_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp16_AST);
match(LITERAL_char);
break;
}
case LITERAL_short:
{
TNode tmp17_AST = null;
tmp17_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp17_AST);
match(LITERAL_short);
break;
}
case LITERAL_int:
{
TNode tmp18_AST = null;
tmp18_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp18_AST);
match(LITERAL_int);
break;
}
case LITERAL_long:
{
TNode tmp19_AST = null;
tmp19_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp19_AST);
match(LITERAL_long);
break;
}
case LITERAL_float:
{
TNode tmp20_AST = null;
tmp20_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp20_AST);
match(LITERAL_float);
break;
}
case LITERAL_double:
{
TNode tmp21_AST = null;
tmp21_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp21_AST);
match(LITERAL_double);
break;
}
case LITERAL_signed:
{
TNode tmp22_AST = null;
tmp22_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp22_AST);
match(LITERAL_signed);
break;
}
case LITERAL_unsigned:
{
TNode tmp23_AST = null;
tmp23_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp23_AST);
match(LITERAL_unsigned);
break;
}
case 27:
{
TNode tmp24_AST = null;
tmp24_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp24_AST);
match(27);
break;
}
case 28:
{
TNode tmp25_AST = null;
tmp25_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp25_AST);
match(28);
break;
}
case 29:
{
TNode tmp26_AST = null;
tmp26_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp26_AST);
match(29);
break;
}
case 30:
{
TNode tmp27_AST = null;
tmp27_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp27_AST);
match(30);
break;
}
case 31:
{
TNode tmp28_AST = null;
tmp28_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp28_AST);
match(31);
break;
}
case 32:
{
TNode tmp29_AST = null;
tmp29_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp29_AST);
match(32);
break;
}
case LITERAL_wchar_t:
{
TNode tmp30_AST = null;
tmp30_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp30_AST);
match(LITERAL_wchar_t);
break;
}
case 34:
{
TNode tmp31_AST = null;
tmp31_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp31_AST);
match(34);
break;
}
case 35:
{
TNode tmp32_AST = null;
tmp32_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp32_AST);
match(35);
break;
}
case 36:
{
TNode tmp33_AST = null;
tmp33_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp33_AST);
match(36);
break;
}
case 37:
{
TNode tmp34_AST = null;
tmp34_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp34_AST);
match(37);
break;
}
case LITERAL_ptrdiff_t:
{
TNode tmp35_AST = null;
tmp35_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp35_AST);
match(LITERAL_ptrdiff_t);
break;
}
case LITERAL_intptr_t:
{
TNode tmp36_AST = null;
tmp36_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp36_AST);
match(LITERAL_intptr_t);
break;
}
case LITERAL_size_t:
{
TNode tmp37_AST = null;
tmp37_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp37_AST);
match(LITERAL_size_t);
break;
}
case LITERAL_uintptr_t:
{
TNode tmp38_AST = null;
tmp38_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp38_AST);
match(LITERAL_uintptr_t);
break;
}
case LITERAL_struct:
case LITERAL_union:
{
structOrUnionSpecifier();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case LITERAL_enum:
{
enumSpecifier();
astFactory.addASTChild(currentAST, returnAST);
break;
}
default:
if (((LA(1)==ID))&&( specCount == 0 )) {
typedefName();
astFactory.addASTChild(currentAST, returnAST);
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
}
typeSpecifier_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_18);
} else {
throw ex;
}
}
returnAST = typeSpecifier_AST;
return retSpecCount;
}
public final void functionStorageClassSpecifier() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode functionStorageClassSpecifier_AST = null;
try { // for error handling
switch ( LA(1)) {
case LITERAL_extern:
{
TNode tmp39_AST = null;
tmp39_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp39_AST);
match(LITERAL_extern);
functionStorageClassSpecifier_AST = (TNode)currentAST.root;
break;
}
case LITERAL_static:
{
TNode tmp40_AST = null;
tmp40_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp40_AST);
match(LITERAL_static);
functionStorageClassSpecifier_AST = (TNode)currentAST.root;
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_17);
} else {
throw ex;
}
}
returnAST = functionStorageClassSpecifier_AST;
}
public final void structOrUnionSpecifier() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode structOrUnionSpecifier_AST = null;
TNode sou_AST = null;
Token i = null;
TNode i_AST = null;
Token l = null;
TNode l_AST = null;
Token l1 = null;
TNode l1_AST = null;
String scopeName;
try { // for error handling
structOrUnion();
sou_AST = (TNode)returnAST;
{
boolean synPredMatched26 = false;
if (((LA(1)==ID) && (LA(2)==LCURLY))) {
int _m26 = mark();
synPredMatched26 = true;
inputState.guessing++;
try {
{
match(ID);
match(LCURLY);
}
}
catch (RecognitionException pe) {
synPredMatched26 = false;
}
rewind(_m26);
inputState.guessing--;
}
if ( synPredMatched26 ) {
i = LT(1);
i_AST = (TNode)astFactory.create(i);
astFactory.addASTChild(currentAST, i_AST);
match(ID);
l = LT(1);
l_AST = (TNode)astFactory.create(l);
astFactory.addASTChild(currentAST, l_AST);
match(LCURLY);
if ( inputState.guessing==0 ) {
scopeName = sou_AST.getText() + " " + i_AST.getText();
l_AST.setText(scopeName);
pushScope(scopeName);
}
structDeclarationList();
astFactory.addASTChild(currentAST, returnAST);
if ( inputState.guessing==0 ) {
popScope();
}
match(RCURLY);
}
else if ((LA(1)==LCURLY)) {
l1 = LT(1);
l1_AST = (TNode)astFactory.create(l1);
astFactory.addASTChild(currentAST, l1_AST);
match(LCURLY);
if ( inputState.guessing==0 ) {
scopeName = getAScopeName();
l1_AST.setText(scopeName);
pushScope(scopeName);
}
structDeclarationList();
astFactory.addASTChild(currentAST, returnAST);
if ( inputState.guessing==0 ) {
popScope();
}
match(RCURLY);
}
else if ((LA(1)==ID) && (_tokenSet_18.member(LA(2)))) {
TNode tmp43_AST = null;
tmp43_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp43_AST);
match(ID);
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
if ( inputState.guessing==0 ) {
structOrUnionSpecifier_AST = (TNode)currentAST.root;
structOrUnionSpecifier_AST = (TNode)astFactory.make( (new ASTArray(2)).add(sou_AST).add(structOrUnionSpecifier_AST));
currentAST.root = structOrUnionSpecifier_AST;
currentAST.child = structOrUnionSpecifier_AST!=null &&structOrUnionSpecifier_AST.getFirstChild()!=null ?
structOrUnionSpecifier_AST.getFirstChild() : structOrUnionSpecifier_AST;
currentAST.advanceChildToEnd();
}
structOrUnionSpecifier_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_18);
} else {
throw ex;
}
}
returnAST = structOrUnionSpecifier_AST;
}
public final void enumSpecifier() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode enumSpecifier_AST = null;
Token i = null;
TNode i_AST = null;
try { // for error handling
TNode tmp44_AST = null;
tmp44_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp44_AST);
match(LITERAL_enum);
{
boolean synPredMatched48 = false;
if (((LA(1)==ID) && (LA(2)==LCURLY))) {
int _m48 = mark();
synPredMatched48 = true;
inputState.guessing++;
try {
{
match(ID);
match(LCURLY);
}
}
catch (RecognitionException pe) {
synPredMatched48 = false;
}
rewind(_m48);
inputState.guessing--;
}
if ( synPredMatched48 ) {
i = LT(1);
i_AST = (TNode)astFactory.create(i);
astFactory.addASTChild(currentAST, i_AST);
match(ID);
TNode tmp45_AST = null;
tmp45_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp45_AST);
match(LCURLY);
enumList(i.getText());
astFactory.addASTChild(currentAST, returnAST);
match(RCURLY);
}
else if ((LA(1)==LCURLY)) {
TNode tmp47_AST = null;
tmp47_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp47_AST);
match(LCURLY);
enumList("anonymous");
astFactory.addASTChild(currentAST, returnAST);
match(RCURLY);
}
else if ((LA(1)==ID) && (_tokenSet_18.member(LA(2)))) {
TNode tmp49_AST = null;
tmp49_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp49_AST);
match(ID);
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
enumSpecifier_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_18);
} else {
throw ex;
}
}
returnAST = enumSpecifier_AST;
}
public final void typedefName() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode typedefName_AST = null;
Token i = null;
TNode i_AST = null;
try { // for error handling
if (!( isTypedefName ( LT(1).getText() ) ))
throw new SemanticException(" isTypedefName ( LT(1).getText() ) ");
i = LT(1);
i_AST = (TNode)astFactory.create(i);
astFactory.addASTChild(currentAST, i_AST);
match(ID);
if ( inputState.guessing==0 ) {
typedefName_AST = (TNode)currentAST.root;
typedefName_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NTypedefName)).add(i_AST));
currentAST.root = typedefName_AST;
currentAST.child = typedefName_AST!=null &&typedefName_AST.getFirstChild()!=null ?
typedefName_AST.getFirstChild() : typedefName_AST;
currentAST.advanceChildToEnd();
}
typedefName_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_18);
} else {
throw ex;
}
}
returnAST = typedefName_AST;
}
public final void structOrUnion() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode structOrUnion_AST = null;
try { // for error handling
switch ( LA(1)) {
case LITERAL_struct:
{
TNode tmp50_AST = null;
tmp50_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp50_AST);
match(LITERAL_struct);
structOrUnion_AST = (TNode)currentAST.root;
break;
}
case LITERAL_union:
{
TNode tmp51_AST = null;
tmp51_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp51_AST);
match(LITERAL_union);
structOrUnion_AST = (TNode)currentAST.root;
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_19);
} else {
throw ex;
}
}
returnAST = structOrUnion_AST;
}
public final void structDeclarationList() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode structDeclarationList_AST = null;
try { // for error handling
{
int _cnt30=0;
_loop30:
do {
if ((_tokenSet_20.member(LA(1)))) {
structDeclaration();
astFactory.addASTChild(currentAST, returnAST);
}
else {
if ( _cnt30>=1 ) { break _loop30; } else {throw new NoViableAltException(LT(1), getFilename());}
}
_cnt30++;
} while (true);
}
structDeclarationList_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_21);
} else {
throw ex;
}
}
returnAST = structDeclarationList_AST;
}
public final void structDeclaration() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode structDeclaration_AST = null;
try { // for error handling
specifierQualifierList();
astFactory.addASTChild(currentAST, returnAST);
structDeclaratorList();
astFactory.addASTChild(currentAST, returnAST);
{
int _cnt33=0;
_loop33:
do {
if ((LA(1)==SEMI)) {
match(SEMI);
}
else {
if ( _cnt33>=1 ) { break _loop33; } else {throw new NoViableAltException(LT(1), getFilename());}
}
_cnt33++;
} while (true);
}
structDeclaration_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_22);
} else {
throw ex;
}
}
returnAST = structDeclaration_AST;
}
public final void specifierQualifierList() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode specifierQualifierList_AST = null;
int specCount = 0;
try { // for error handling
{
int _cnt38=0;
_loop38:
do {
boolean synPredMatched37 = false;
if (((_tokenSet_13.member(LA(1))) && (_tokenSet_23.member(LA(2))))) {
int _m37 = mark();
synPredMatched37 = true;
inputState.guessing++;
try {
{
if ((LA(1)==LITERAL_struct) && (true)) {
match(LITERAL_struct);
}
else if ((LA(1)==LITERAL_union) && (true)) {
match(LITERAL_union);
}
else if ((LA(1)==LITERAL_enum) && (true)) {
match(LITERAL_enum);
}
else if ((_tokenSet_13.member(LA(1))) && (true)) {
typeSpecifier(specCount);
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
}
catch (RecognitionException pe) {
synPredMatched37 = false;
}
rewind(_m37);
inputState.guessing--;
}
if ( synPredMatched37 ) {
specCount=typeSpecifier(specCount);
astFactory.addASTChild(currentAST, returnAST);
}
else if ((LA(1)==LITERAL_volatile||LA(1)==LITERAL_const)) {
typeQualifier();
astFactory.addASTChild(currentAST, returnAST);
}
else {
if ( _cnt38>=1 ) { break _loop38; } else {throw new NoViableAltException(LT(1), getFilename());}
}
_cnt38++;
} while (true);
}
specifierQualifierList_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_24);
} else {
throw ex;
}
}
returnAST = specifierQualifierList_AST;
}
public final void structDeclaratorList() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode structDeclaratorList_AST = null;
try { // for error handling
structDeclarator();
astFactory.addASTChild(currentAST, returnAST);
{
_loop41:
do {
if ((LA(1)==COMMA)) {
match(COMMA);
structDeclarator();
astFactory.addASTChild(currentAST, returnAST);
}
else {
break _loop41;
}
} while (true);
}
structDeclaratorList_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_16);
} else {
throw ex;
}
}
returnAST = structDeclaratorList_AST;
}
public final void structDeclarator() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode structDeclarator_AST = null;
try { // for error handling
{
switch ( LA(1)) {
case COLON:
{
TNode tmp54_AST = null;
tmp54_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp54_AST);
match(COLON);
constExpr();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case ID:
case STAR:
case LPAREN:
{
declarator(false);
astFactory.addASTChild(currentAST, returnAST);
{
switch ( LA(1)) {
case COLON:
{
TNode tmp55_AST = null;
tmp55_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp55_AST);
match(COLON);
constExpr();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case SEMI:
case COMMA:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
if ( inputState.guessing==0 ) {
structDeclarator_AST = (TNode)currentAST.root;
structDeclarator_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NStructDeclarator)).add(structDeclarator_AST));
currentAST.root = structDeclarator_AST;
currentAST.child = structDeclarator_AST!=null &&structDeclarator_AST.getFirstChild()!=null ?
structDeclarator_AST.getFirstChild() : structDeclarator_AST;
currentAST.advanceChildToEnd();
}
structDeclarator_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_25);
} else {
throw ex;
}
}
returnAST = structDeclarator_AST;
}
public final void constExpr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode constExpr_AST = null;
try { // for error handling
conditionalExpr();
astFactory.addASTChild(currentAST, returnAST);
constExpr_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_26);
} else {
throw ex;
}
}
returnAST = constExpr_AST;
}
public final String declarator(
boolean isFunctionDefinition
) throws RecognitionException, TokenStreamException {
String declName;
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode declarator_AST = null;
Token id = null;
TNode id_AST = null;
TNode p_AST = null;
TNode i_AST = null;
declName = "";
try { // for error handling
{
switch ( LA(1)) {
case STAR:
{
pointerGroup();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case ID:
case LPAREN:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
{
switch ( LA(1)) {
case ID:
{
id = LT(1);
id_AST = (TNode)astFactory.create(id);
astFactory.addASTChild(currentAST, id_AST);
match(ID);
if ( inputState.guessing==0 ) {
declName = id.getText();
}
break;
}
case LPAREN:
{
TNode tmp56_AST = null;
tmp56_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp56_AST);
match(LPAREN);
declName=declarator(false);
astFactory.addASTChild(currentAST, returnAST);
TNode tmp57_AST = null;
tmp57_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp57_AST);
match(RPAREN);
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
{
_loop82:
do {
switch ( LA(1)) {
case LPAREN:
{
TNode tmp58_AST = null;
tmp58_AST = (TNode)astFactory.create(LT(1));
match(LPAREN);
if ( inputState.guessing==0 ) {
if (isFunctionDefinition) {
pushScope(declName);
}
else {
pushScope("!"+declName);
}
}
{
boolean synPredMatched79 = false;
if (((_tokenSet_2.member(LA(1))) && (_tokenSet_27.member(LA(2))))) {
int _m79 = mark();
synPredMatched79 = true;
inputState.guessing++;
try {
{
declSpecifiers();
}
}
catch (RecognitionException pe) {
synPredMatched79 = false;
}
rewind(_m79);
inputState.guessing--;
}
if ( synPredMatched79 ) {
parameterTypeList();
p_AST = (TNode)returnAST;
if ( inputState.guessing==0 ) {
declarator_AST = (TNode)currentAST.root;
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))));
currentAST.root = declarator_AST;
currentAST.child = declarator_AST!=null &&declarator_AST.getFirstChild()!=null ?
declarator_AST.getFirstChild() : declarator_AST;
currentAST.advanceChildToEnd();
}
}
else if ((LA(1)==ID||LA(1)==RPAREN) && (_tokenSet_28.member(LA(2)))) {
{
switch ( LA(1)) {
case ID:
{
idList();
i_AST = (TNode)returnAST;
break;
}
case RPAREN:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
if ( inputState.guessing==0 ) {
declarator_AST = (TNode)currentAST.root;
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))));
currentAST.root = declarator_AST;
currentAST.child = declarator_AST!=null &&declarator_AST.getFirstChild()!=null ?
declarator_AST.getFirstChild() : declarator_AST;
currentAST.advanceChildToEnd();
}
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
if ( inputState.guessing==0 ) {
popScope();
}
TNode tmp59_AST = null;
tmp59_AST = (TNode)astFactory.create(LT(1));
match(RPAREN);
break;
}
case LBRACKET:
{
TNode tmp60_AST = null;
tmp60_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp60_AST);
match(LBRACKET);
{
switch ( LA(1)) {
case ID:
case STAR:
case LPAREN:
case BAND:
case PLUS:
case MINUS:
case INC:
case DEC:
case LITERAL_sizeof:
case BNOT:
case LNOT:
case CharLiteral:
case StringLiteral:
case IntOctalConst:
case LongOctalConst:
case UnsignedOctalConst:
case IntIntConst:
case LongIntConst:
case UnsignedIntConst:
case IntHexConst:
case LongHexConst:
case UnsignedHexConst:
case FloatDoubleConst:
case DoubleDoubleConst:
case LongDoubleConst:
{
constExpr();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case RBRACKET:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
TNode tmp61_AST = null;
tmp61_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp61_AST);
match(RBRACKET);
break;
}
default:
{
break _loop82;
}
}
} while (true);
}
if ( inputState.guessing==0 ) {
declarator_AST = (TNode)currentAST.root;
declarator_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NDeclarator)).add(declarator_AST));
currentAST.root = declarator_AST;
currentAST.child = declarator_AST!=null &&declarator_AST.getFirstChild()!=null ?
declarator_AST.getFirstChild() : declarator_AST;
currentAST.advanceChildToEnd();
}
declarator_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_29);
} else {
throw ex;
}
}
returnAST = declarator_AST;
return declName;
}
public final void enumList(
String enumName
) throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode enumList_AST = null;
try { // for error handling
enumerator(enumName);
astFactory.addASTChild(currentAST, returnAST);
{
_loop51:
do {
if ((LA(1)==COMMA)) {
match(COMMA);
enumerator(enumName);
astFactory.addASTChild(currentAST, returnAST);
}
else {
break _loop51;
}
} while (true);
}
enumList_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_21);
} else {
throw ex;
}
}
returnAST = enumList_AST;
}
public final void enumerator(
String enumName
) throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode enumerator_AST = null;
Token i = null;
TNode i_AST = null;
try { // for error handling
i = LT(1);
i_AST = (TNode)astFactory.create(i);
astFactory.addASTChild(currentAST, i_AST);
match(ID);
if ( inputState.guessing==0 ) {
symbolTable.add( i.getText(),
(TNode)astFactory.make( (new ASTArray(3)).add(null).add((TNode)astFactory.create(LITERAL_enum,"enum")).add((TNode)astFactory.create(ID,enumName)))
);
}
{
switch ( LA(1)) {
case ASSIGN:
{
TNode tmp63_AST = null;
tmp63_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp63_AST);
match(ASSIGN);
constExpr();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case RCURLY:
case COMMA:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
enumerator_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_30);
} else {
throw ex;
}
}
returnAST = enumerator_AST;
}
public final void initDecl(
AST declarationSpecifiers
) throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode initDecl_AST = null;
TNode d_AST = null;
String declName = "";
try { // for error handling
declName=declarator(false);
d_AST = (TNode)returnAST;
astFactory.addASTChild(currentAST, returnAST);
if ( inputState.guessing==0 ) {
AST ds1, d1;
ds1 = astFactory.dupList(declarationSpecifiers);
d1 = astFactory.dupList(d_AST);
symbolTable.add(declName, (TNode)astFactory.make( (new ASTArray(3)).add(null).add(ds1).add(d1)) );
}
{
switch ( LA(1)) {
case ASSIGN:
{
TNode tmp64_AST = null;
tmp64_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp64_AST);
match(ASSIGN);
initializer();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case COLON:
{
TNode tmp65_AST = null;
tmp65_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp65_AST);
match(COLON);
expr();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case SEMI:
case COMMA:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
if ( inputState.guessing==0 ) {
initDecl_AST = (TNode)currentAST.root;
initDecl_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NInitDecl)).add(initDecl_AST));
currentAST.root = initDecl_AST;
currentAST.child = initDecl_AST!=null &&initDecl_AST.getFirstChild()!=null ?
initDecl_AST.getFirstChild() : initDecl_AST;
currentAST.advanceChildToEnd();
}
initDecl_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_25);
} else {
throw ex;
}
}
returnAST = initDecl_AST;
}
public final void initializer() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode initializer_AST = null;
try { // for error handling
{
switch ( LA(1)) {
case ID:
case STAR:
case LPAREN:
case BAND:
case PLUS:
case MINUS:
case INC:
case DEC:
case LITERAL_sizeof:
case BNOT:
case LNOT:
case CharLiteral:
case StringLiteral:
case IntOctalConst:
case LongOctalConst:
case UnsignedOctalConst:
case IntIntConst:
case LongIntConst:
case UnsignedIntConst:
case IntHexConst:
case LongHexConst:
case UnsignedHexConst:
case FloatDoubleConst:
case DoubleDoubleConst:
case LongDoubleConst:
{
assignExpr();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case LCURLY:
{
TNode tmp66_AST = null;
tmp66_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp66_AST);
match(LCURLY);
initializerList();
astFactory.addASTChild(currentAST, returnAST);
{
switch ( LA(1)) {
case COMMA:
{
match(COMMA);
break;
}
case RCURLY:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
match(RCURLY);
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
if ( inputState.guessing==0 ) {
initializer_AST = (TNode)currentAST.root;
initializer_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NInitializer)).add(initializer_AST));
currentAST.root = initializer_AST;
currentAST.child = initializer_AST!=null &&initializer_AST.getFirstChild()!=null ?
initializer_AST.getFirstChild() : initializer_AST;
currentAST.advanceChildToEnd();
}
initializer_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_31);
} else {
throw ex;
}
}
returnAST = initializer_AST;
}
public final void pointerGroup() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode pointerGroup_AST = null;
try { // for error handling
{
int _cnt63=0;
_loop63:
do {
if ((LA(1)==STAR)) {
TNode tmp69_AST = null;
tmp69_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp69_AST);
match(STAR);
{
_loop62:
do {
if ((LA(1)==LITERAL_volatile||LA(1)==LITERAL_const)) {
typeQualifier();
astFactory.addASTChild(currentAST, returnAST);
}
else {
break _loop62;
}
} while (true);
}
}
else {
if ( _cnt63>=1 ) { break _loop63; } else {throw new NoViableAltException(LT(1), getFilename());}
}
_cnt63++;
} while (true);
}
if ( inputState.guessing==0 ) {
pointerGroup_AST = (TNode)currentAST.root;
pointerGroup_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NPointerGroup)).add(pointerGroup_AST));
currentAST.root = pointerGroup_AST;
currentAST.child = pointerGroup_AST!=null &&pointerGroup_AST.getFirstChild()!=null ?
pointerGroup_AST.getFirstChild() : pointerGroup_AST;
currentAST.advanceChildToEnd();
}
pointerGroup_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_32);
} else {
throw ex;
}
}
returnAST = pointerGroup_AST;
}
public final void idList() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode idList_AST = null;
try { // for error handling
TNode tmp70_AST = null;
tmp70_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp70_AST);
match(ID);
{
_loop66:
do {
if ((LA(1)==COMMA)) {
match(COMMA);
TNode tmp72_AST = null;
tmp72_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp72_AST);
match(ID);
}
else {
break _loop66;
}
} while (true);
}
idList_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_33);
} else {
throw ex;
}
}
returnAST = idList_AST;
}
public final void assignExpr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode assignExpr_AST = null;
TNode a_AST = null;
try { // for error handling
conditionalExpr();
astFactory.addASTChild(currentAST, returnAST);
{
switch ( LA(1)) {
case ASSIGN:
case DIV_ASSIGN:
case PLUS_ASSIGN:
case MINUS_ASSIGN:
case STAR_ASSIGN:
case MOD_ASSIGN:
case RSHIFT_ASSIGN:
case LSHIFT_ASSIGN:
case BAND_ASSIGN:
case BOR_ASSIGN:
case BXOR_ASSIGN:
{
assignOperator();
a_AST = (TNode)returnAST;
assignExpr();
astFactory.addASTChild(currentAST, returnAST);
if ( inputState.guessing==0 ) {
assignExpr_AST = (TNode)currentAST.root;
assignExpr_AST = (TNode)astFactory.make( (new ASTArray(2)).add(a_AST).add(assignExpr_AST));
currentAST.root = assignExpr_AST;
currentAST.child = assignExpr_AST!=null &&assignExpr_AST.getFirstChild()!=null ?
assignExpr_AST.getFirstChild() : assignExpr_AST;
currentAST.advanceChildToEnd();
}
break;
}
case RCURLY:
case SEMI:
case COMMA:
case COLON:
case RPAREN:
case RBRACKET:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
assignExpr_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_12);
} else {
throw ex;
}
}
returnAST = assignExpr_AST;
}
public final void initializerList() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode initializerList_AST = null;
try { // for error handling
initializer();
astFactory.addASTChild(currentAST, returnAST);
{
_loop72:
do {
if ((LA(1)==COMMA) && (_tokenSet_34.member(LA(2)))) {
match(COMMA);
initializer();
astFactory.addASTChild(currentAST, returnAST);
}
else {
break _loop72;
}
} while (true);
}
initializerList_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_30);
} else {
throw ex;
}
}
returnAST = initializerList_AST;
}
public final void parameterTypeList() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode parameterTypeList_AST = null;
try { // for error handling
parameterDeclaration();
astFactory.addASTChild(currentAST, returnAST);
{
_loop85:
do {
if ((LA(1)==COMMA) && (_tokenSet_2.member(LA(2)))) {
match(COMMA);
parameterDeclaration();
astFactory.addASTChild(currentAST, returnAST);
}
else {
break _loop85;
}
} while (true);
}
{
switch ( LA(1)) {
case COMMA:
{
match(COMMA);
TNode tmp76_AST = null;
tmp76_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp76_AST);
match(VARARGS);
break;
}
case RPAREN:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
parameterTypeList_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_33);
} else {
throw ex;
}
}
returnAST = parameterTypeList_AST;
}
public final void parameterDeclaration() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode parameterDeclaration_AST = null;
TNode ds_AST = null;
TNode d_AST = null;
String declName;
try { // for error handling
declSpecifiers();
ds_AST = (TNode)returnAST;
astFactory.addASTChild(currentAST, returnAST);
{
boolean synPredMatched90 = false;
if (((_tokenSet_10.member(LA(1))) && (_tokenSet_35.member(LA(2))))) {
int _m90 = mark();
synPredMatched90 = true;
inputState.guessing++;
try {
{
declarator(false);
}
}
catch (RecognitionException pe) {
synPredMatched90 = false;
}
rewind(_m90);
inputState.guessing--;
}
if ( synPredMatched90 ) {
declName=declarator(false);
d_AST = (TNode)returnAST;
astFactory.addASTChild(currentAST, returnAST);
if ( inputState.guessing==0 ) {
AST d2, ds2;
d2 = astFactory.dupList(d_AST);
ds2 = astFactory.dupList(ds_AST);
symbolTable.add(declName, (TNode)astFactory.make( (new ASTArray(3)).add(null).add(ds2).add(d2)));
}
}
else if ((_tokenSet_36.member(LA(1))) && (_tokenSet_37.member(LA(2)))) {
nonemptyAbstractDeclarator();
astFactory.addASTChild(currentAST, returnAST);
}
else if ((LA(1)==COMMA||LA(1)==RPAREN)) {
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
if ( inputState.guessing==0 ) {
parameterDeclaration_AST = (TNode)currentAST.root;
parameterDeclaration_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NParameterDeclaration)).add(parameterDeclaration_AST));
currentAST.root = parameterDeclaration_AST;
currentAST.child = parameterDeclaration_AST!=null &¶meterDeclaration_AST.getFirstChild()!=null ?
parameterDeclaration_AST.getFirstChild() : parameterDeclaration_AST;
currentAST.advanceChildToEnd();
}
parameterDeclaration_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_38);
} else {
throw ex;
}
}
returnAST = parameterDeclaration_AST;
}
public final void nonemptyAbstractDeclarator() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode nonemptyAbstractDeclarator_AST = null;
try { // for error handling
{
switch ( LA(1)) {
case STAR:
{
pointerGroup();
astFactory.addASTChild(currentAST, returnAST);
{
_loop184:
do {
switch ( LA(1)) {
case LPAREN:
{
{
TNode tmp77_AST = null;
tmp77_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp77_AST);
match(LPAREN);
{
switch ( LA(1)) {
case STAR:
case LPAREN:
case LBRACKET:
{
nonemptyAbstractDeclarator();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case LITERAL_typedef:
case LITERAL_volatile:
case LITERAL_struct:
case LITERAL_union:
case LITERAL_enum:
case LITERAL_auto:
case LITERAL_register:
case LITERAL_extern:
case LITERAL_static:
case LITERAL_const:
case LITERAL_void:
case LITERAL_char:
case LITERAL_short:
case LITERAL_int:
case LITERAL_long:
case LITERAL_float:
case LITERAL_double:
case LITERAL_signed:
case LITERAL_unsigned:
case 27:
case 28:
case 29:
case 30:
case 31:
case 32:
case LITERAL_wchar_t:
case 34:
case 35:
case 36:
case 37:
case LITERAL_ptrdiff_t:
case LITERAL_intptr_t:
case LITERAL_size_t:
case LITERAL_uintptr_t:
case ID:
{
parameterTypeList();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case RPAREN:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
TNode tmp78_AST = null;
tmp78_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp78_AST);
match(RPAREN);
}
break;
}
case LBRACKET:
{
{
TNode tmp79_AST = null;
tmp79_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp79_AST);
match(LBRACKET);
{
switch ( LA(1)) {
case ID:
case STAR:
case LPAREN:
case BAND:
case PLUS:
case MINUS:
case INC:
case DEC:
case LITERAL_sizeof:
case BNOT:
case LNOT:
case CharLiteral:
case StringLiteral:
case IntOctalConst:
case LongOctalConst:
case UnsignedOctalConst:
case IntIntConst:
case LongIntConst:
case UnsignedIntConst:
case IntHexConst:
case LongHexConst:
case UnsignedHexConst:
case FloatDoubleConst:
case DoubleDoubleConst:
case LongDoubleConst:
{
expr();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case RBRACKET:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
TNode tmp80_AST = null;
tmp80_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp80_AST);
match(RBRACKET);
}
break;
}
default:
{
break _loop184;
}
}
} while (true);
}
break;
}
case LPAREN:
case LBRACKET:
{
{
int _cnt190=0;
_loop190:
do {
switch ( LA(1)) {
case LPAREN:
{
{
TNode tmp81_AST = null;
tmp81_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp81_AST);
match(LPAREN);
{
switch ( LA(1)) {
case STAR:
case LPAREN:
case LBRACKET:
{
nonemptyAbstractDeclarator();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case LITERAL_typedef:
case LITERAL_volatile:
case LITERAL_struct:
case LITERAL_union:
case LITERAL_enum:
case LITERAL_auto:
case LITERAL_register:
case LITERAL_extern:
case LITERAL_static:
case LITERAL_const:
case LITERAL_void:
case LITERAL_char:
case LITERAL_short:
case LITERAL_int:
case LITERAL_long:
case LITERAL_float:
case LITERAL_double:
case LITERAL_signed:
case LITERAL_unsigned:
case 27:
case 28:
case 29:
case 30:
case 31:
case 32:
case LITERAL_wchar_t:
case 34:
case 35:
case 36:
case 37:
case LITERAL_ptrdiff_t:
case LITERAL_intptr_t:
case LITERAL_size_t:
case LITERAL_uintptr_t:
case ID:
{
parameterTypeList();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case RPAREN:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
TNode tmp82_AST = null;
tmp82_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp82_AST);
match(RPAREN);
}
break;
}
case LBRACKET:
{
{
TNode tmp83_AST = null;
tmp83_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp83_AST);
match(LBRACKET);
{
switch ( LA(1)) {
case ID:
case STAR:
case LPAREN:
case BAND:
case PLUS:
case MINUS:
case INC:
case DEC:
case LITERAL_sizeof:
case BNOT:
case LNOT:
case CharLiteral:
case StringLiteral:
case IntOctalConst:
case LongOctalConst:
case UnsignedOctalConst:
case IntIntConst:
case LongIntConst:
case UnsignedIntConst:
case IntHexConst:
case LongHexConst:
case UnsignedHexConst:
case FloatDoubleConst:
case DoubleDoubleConst:
case LongDoubleConst:
{
expr();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case RBRACKET:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
TNode tmp84_AST = null;
tmp84_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp84_AST);
match(RBRACKET);
}
break;
}
default:
{
if ( _cnt190>=1 ) { break _loop190; } else {throw new NoViableAltException(LT(1), getFilename());}
}
}
_cnt190++;
} while (true);
}
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
if ( inputState.guessing==0 ) {
nonemptyAbstractDeclarator_AST = (TNode)currentAST.root;
nonemptyAbstractDeclarator_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NNonemptyAbstractDeclarator)).add(nonemptyAbstractDeclarator_AST));
currentAST.root = nonemptyAbstractDeclarator_AST;
currentAST.child = nonemptyAbstractDeclarator_AST!=null &&nonemptyAbstractDeclarator_AST.getFirstChild()!=null ?
nonemptyAbstractDeclarator_AST.getFirstChild() : nonemptyAbstractDeclarator_AST;
currentAST.advanceChildToEnd();
}
nonemptyAbstractDeclarator_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_38);
} else {
throw ex;
}
}
returnAST = nonemptyAbstractDeclarator_AST;
}
public final void functionDeclSpecifiers() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode functionDeclSpecifiers_AST = null;
int specCount = 0;
try { // for error handling
{
int _cnt104=0;
_loop104:
do {
switch ( LA(1)) {
case LITERAL_extern:
case LITERAL_static:
{
functionStorageClassSpecifier();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case LITERAL_volatile:
case LITERAL_const:
{
typeQualifier();
astFactory.addASTChild(currentAST, returnAST);
break;
}
default:
boolean synPredMatched103 = false;
if (((_tokenSet_13.member(LA(1))) && (_tokenSet_9.member(LA(2))))) {
int _m103 = mark();
synPredMatched103 = true;
inputState.guessing++;
try {
{
if ((LA(1)==LITERAL_struct) && (true)) {
match(LITERAL_struct);
}
else if ((LA(1)==LITERAL_union) && (true)) {
match(LITERAL_union);
}
else if ((LA(1)==LITERAL_enum) && (true)) {
match(LITERAL_enum);
}
else if ((_tokenSet_13.member(LA(1))) && (true)) {
typeSpecifier(specCount);
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
}
catch (RecognitionException pe) {
synPredMatched103 = false;
}
rewind(_m103);
inputState.guessing--;
}
if ( synPredMatched103 ) {
specCount=typeSpecifier(specCount);
astFactory.addASTChild(currentAST, returnAST);
}
else {
if ( _cnt104>=1 ) { break _loop104; } else {throw new NoViableAltException(LT(1), getFilename());}
}
}
_cnt104++;
} while (true);
}
functionDeclSpecifiers_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_10);
} else {
throw ex;
}
}
returnAST = functionDeclSpecifiers_AST;
}
public final void compoundStatement(
String scopeName
) throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode compoundStatement_AST = null;
try { // for error handling
match(LCURLY);
if ( inputState.guessing==0 ) {
pushScope(scopeName);
}
{
boolean synPredMatched115 = false;
if (((_tokenSet_2.member(LA(1))) && (_tokenSet_3.member(LA(2))))) {
int _m115 = mark();
synPredMatched115 = true;
inputState.guessing++;
try {
{
declarationPredictor();
}
}
catch (RecognitionException pe) {
synPredMatched115 = false;
}
rewind(_m115);
inputState.guessing--;
}
if ( synPredMatched115 ) {
declarationList();
astFactory.addASTChild(currentAST, returnAST);
}
else if ((_tokenSet_39.member(LA(1))) && (_tokenSet_40.member(LA(2)))) {
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
{
switch ( LA(1)) {
case LCURLY:
case SEMI:
case ID:
case STAR:
case LPAREN:
case LITERAL_while:
case LITERAL_do:
case LITERAL_for:
case LITERAL_goto:
case LITERAL_continue:
case LITERAL_break:
case LITERAL_return:
case LITERAL_case:
case LITERAL_default:
case LITERAL_if:
case LITERAL_switch:
case BAND:
case PLUS:
case MINUS:
case INC:
case DEC:
case LITERAL_sizeof:
case BNOT:
case LNOT:
case CharLiteral:
case StringLiteral:
case IntOctalConst:
case LongOctalConst:
case UnsignedOctalConst:
case IntIntConst:
case LongIntConst:
case UnsignedIntConst:
case IntHexConst:
case LongHexConst:
case UnsignedHexConst:
case FloatDoubleConst:
case DoubleDoubleConst:
case LongDoubleConst:
{
statementList();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case RCURLY:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
if ( inputState.guessing==0 ) {
popScope();
}
match(RCURLY);
if ( inputState.guessing==0 ) {
compoundStatement_AST = (TNode)currentAST.root;
compoundStatement_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NCompoundStatement,scopeName)).add(compoundStatement_AST));
currentAST.root = compoundStatement_AST;
currentAST.child = compoundStatement_AST!=null &&compoundStatement_AST.getFirstChild()!=null ?
compoundStatement_AST.getFirstChild() : compoundStatement_AST;
currentAST.advanceChildToEnd();
}
compoundStatement_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_41);
} else {
throw ex;
}
}
returnAST = compoundStatement_AST;
}
public final void declarationList() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode declarationList_AST = null;
try { // for error handling
{
int _cnt109=0;
_loop109:
do {
boolean synPredMatched108 = false;
if (((_tokenSet_2.member(LA(1))) && (_tokenSet_3.member(LA(2))))) {
int _m108 = mark();
synPredMatched108 = true;
inputState.guessing++;
try {
{
declarationPredictor();
}
}
catch (RecognitionException pe) {
synPredMatched108 = false;
}
rewind(_m108);
inputState.guessing--;
}
if ( synPredMatched108 ) {
declaration();
astFactory.addASTChild(currentAST, returnAST);
}
else {
if ( _cnt109>=1 ) { break _loop109; } else {throw new NoViableAltException(LT(1), getFilename());}
}
_cnt109++;
} while (true);
}
declarationList_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_39);
} else {
throw ex;
}
}
returnAST = declarationList_AST;
}
public final void declarationPredictor() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode declarationPredictor_AST = null;
try { // for error handling
{
if ((LA(1)==LITERAL_typedef) && (LA(2)==EOF)) {
TNode tmp87_AST = null;
tmp87_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp87_AST);
match(LITERAL_typedef);
}
else if ((_tokenSet_2.member(LA(1))) && (_tokenSet_3.member(LA(2)))) {
declaration();
astFactory.addASTChild(currentAST, returnAST);
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
declarationPredictor_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_0);
} else {
throw ex;
}
}
returnAST = declarationPredictor_AST;
}
public final void statementList() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode statementList_AST = null;
try { // for error handling
{
int _cnt119=0;
_loop119:
do {
if ((_tokenSet_42.member(LA(1)))) {
statement();
astFactory.addASTChild(currentAST, returnAST);
}
else {
if ( _cnt119>=1 ) { break _loop119; } else {throw new NoViableAltException(LT(1), getFilename());}
}
_cnt119++;
} while (true);
}
statementList_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_21);
} else {
throw ex;
}
}
returnAST = statementList_AST;
}
public final void statement() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode statement_AST = null;
TNode e1_AST = null;
TNode e2_AST = null;
TNode e3_AST = null;
TNode s_AST = null;
try { // for error handling
switch ( LA(1)) {
case SEMI:
{
TNode tmp88_AST = null;
tmp88_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp88_AST);
match(SEMI);
statement_AST = (TNode)currentAST.root;
break;
}
case LCURLY:
{
compoundStatement(getAScopeName());
astFactory.addASTChild(currentAST, returnAST);
statement_AST = (TNode)currentAST.root;
break;
}
case LITERAL_while:
{
TNode tmp89_AST = null;
tmp89_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp89_AST);
match(LITERAL_while);
match(LPAREN);
expr();
astFactory.addASTChild(currentAST, returnAST);
match(RPAREN);
statement();
astFactory.addASTChild(currentAST, returnAST);
statement_AST = (TNode)currentAST.root;
break;
}
case LITERAL_do:
{
TNode tmp92_AST = null;
tmp92_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp92_AST);
match(LITERAL_do);
statement();
astFactory.addASTChild(currentAST, returnAST);
match(LITERAL_while);
match(LPAREN);
expr();
astFactory.addASTChild(currentAST, returnAST);
match(RPAREN);
match(SEMI);
statement_AST = (TNode)currentAST.root;
break;
}
case LITERAL_for:
{
match(LITERAL_for);
TNode tmp98_AST = null;
tmp98_AST = (TNode)astFactory.create(LT(1));
match(LPAREN);
{
switch ( LA(1)) {
case ID:
case STAR:
case LPAREN:
case BAND:
case PLUS:
case MINUS:
case INC:
case DEC:
case LITERAL_sizeof:
case BNOT:
case LNOT:
case CharLiteral:
case StringLiteral:
case IntOctalConst:
case LongOctalConst:
case UnsignedOctalConst:
case IntIntConst:
case LongIntConst:
case UnsignedIntConst:
case IntHexConst:
case LongHexConst:
case UnsignedHexConst:
case FloatDoubleConst:
case DoubleDoubleConst:
case LongDoubleConst:
{
expr();
e1_AST = (TNode)returnAST;
break;
}
case SEMI:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
TNode tmp99_AST = null;
tmp99_AST = (TNode)astFactory.create(LT(1));
match(SEMI);
{
switch ( LA(1)) {
case ID:
case STAR:
case LPAREN:
case BAND:
case PLUS:
case MINUS:
case INC:
case DEC:
case LITERAL_sizeof:
case BNOT:
case LNOT:
case CharLiteral:
case StringLiteral:
case IntOctalConst:
case LongOctalConst:
case UnsignedOctalConst:
case IntIntConst:
case LongIntConst:
case UnsignedIntConst:
case IntHexConst:
case LongHexConst:
case UnsignedHexConst:
case FloatDoubleConst:
case DoubleDoubleConst:
case LongDoubleConst:
{
expr();
e2_AST = (TNode)returnAST;
break;
}
case SEMI:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
TNode tmp100_AST = null;
tmp100_AST = (TNode)astFactory.create(LT(1));
match(SEMI);
{
switch ( LA(1)) {
case ID:
case STAR:
case LPAREN:
case BAND:
case PLUS:
case MINUS:
case INC:
case DEC:
case LITERAL_sizeof:
case BNOT:
case LNOT:
case CharLiteral:
case StringLiteral:
case IntOctalConst:
case LongOctalConst:
case UnsignedOctalConst:
case IntIntConst:
case LongIntConst:
case UnsignedIntConst:
case IntHexConst:
case LongHexConst:
case UnsignedHexConst:
case FloatDoubleConst:
case DoubleDoubleConst:
case LongDoubleConst:
{
expr();
e3_AST = (TNode)returnAST;
break;
}
case RPAREN:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
TNode tmp101_AST = null;
tmp101_AST = (TNode)astFactory.create(LT(1));
match(RPAREN);
statement();
s_AST = (TNode)returnAST;
if ( inputState.guessing==0 ) {
statement_AST = (TNode)currentAST.root;
if ( e1_AST == null) { e1_AST = (TNode) (TNode)astFactory.create(NEmptyExpression); }
if ( e2_AST == null) { e2_AST = (TNode) (TNode)astFactory.create(NEmptyExpression); }
if ( e3_AST == null) { e3_AST = (TNode) (TNode)astFactory.create(NEmptyExpression); }
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));
currentAST.root = statement_AST;
currentAST.child = statement_AST!=null &&statement_AST.getFirstChild()!=null ?
statement_AST.getFirstChild() : statement_AST;
currentAST.advanceChildToEnd();
}
break;
}
case LITERAL_goto:
{
TNode tmp102_AST = null;
tmp102_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp102_AST);
match(LITERAL_goto);
TNode tmp103_AST = null;
tmp103_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp103_AST);
match(ID);
match(SEMI);
statement_AST = (TNode)currentAST.root;
break;
}
case LITERAL_continue:
{
TNode tmp105_AST = null;
tmp105_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp105_AST);
match(LITERAL_continue);
match(SEMI);
statement_AST = (TNode)currentAST.root;
break;
}
case LITERAL_break:
{
TNode tmp107_AST = null;
tmp107_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp107_AST);
match(LITERAL_break);
match(SEMI);
statement_AST = (TNode)currentAST.root;
break;
}
case LITERAL_return:
{
TNode tmp109_AST = null;
tmp109_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp109_AST);
match(LITERAL_return);
{
switch ( LA(1)) {
case ID:
case STAR:
case LPAREN:
case BAND:
case PLUS:
case MINUS:
case INC:
case DEC:
case LITERAL_sizeof:
case BNOT:
case LNOT:
case CharLiteral:
case StringLiteral:
case IntOctalConst:
case LongOctalConst:
case UnsignedOctalConst:
case IntIntConst:
case LongIntConst:
case UnsignedIntConst:
case IntHexConst:
case LongHexConst:
case UnsignedHexConst:
case FloatDoubleConst:
case DoubleDoubleConst:
case LongDoubleConst:
{
expr();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case SEMI:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
match(SEMI);
statement_AST = (TNode)currentAST.root;
break;
}
case LITERAL_case:
{
TNode tmp111_AST = null;
tmp111_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp111_AST);
match(LITERAL_case);
constExpr();
astFactory.addASTChild(currentAST, returnAST);
match(COLON);
statement();
astFactory.addASTChild(currentAST, returnAST);
statement_AST = (TNode)currentAST.root;
break;
}
case LITERAL_default:
{
TNode tmp113_AST = null;
tmp113_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp113_AST);
match(LITERAL_default);
match(COLON);
statement();
astFactory.addASTChild(currentAST, returnAST);
statement_AST = (TNode)currentAST.root;
break;
}
case LITERAL_if:
{
TNode tmp115_AST = null;
tmp115_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp115_AST);
match(LITERAL_if);
match(LPAREN);
expr();
astFactory.addASTChild(currentAST, returnAST);
match(RPAREN);
statement();
astFactory.addASTChild(currentAST, returnAST);
{
if ((LA(1)==LITERAL_else) && (_tokenSet_42.member(LA(2)))) {
TNode tmp118_AST = null;
tmp118_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp118_AST);
match(LITERAL_else);
statement();
astFactory.addASTChild(currentAST, returnAST);
}
else if ((_tokenSet_43.member(LA(1))) && (_tokenSet_40.member(LA(2)))) {
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
statement_AST = (TNode)currentAST.root;
break;
}
case LITERAL_switch:
{
TNode tmp119_AST = null;
tmp119_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp119_AST);
match(LITERAL_switch);
match(LPAREN);
expr();
astFactory.addASTChild(currentAST, returnAST);
match(RPAREN);
statement();
astFactory.addASTChild(currentAST, returnAST);
statement_AST = (TNode)currentAST.root;
break;
}
default:
if ((_tokenSet_11.member(LA(1))) && (_tokenSet_44.member(LA(2)))) {
expr();
astFactory.addASTChild(currentAST, returnAST);
match(SEMI);
if ( inputState.guessing==0 ) {
statement_AST = (TNode)currentAST.root;
statement_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NStatementExpr)).add(statement_AST));
currentAST.root = statement_AST;
currentAST.child = statement_AST!=null &&statement_AST.getFirstChild()!=null ?
statement_AST.getFirstChild() : statement_AST;
currentAST.advanceChildToEnd();
}
statement_AST = (TNode)currentAST.root;
}
else if ((LA(1)==ID) && (LA(2)==COLON)) {
TNode tmp123_AST = null;
tmp123_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp123_AST);
match(ID);
match(COLON);
{
if ((_tokenSet_42.member(LA(1))) && (_tokenSet_45.member(LA(2)))) {
statement();
astFactory.addASTChild(currentAST, returnAST);
}
else if ((_tokenSet_43.member(LA(1))) && (_tokenSet_40.member(LA(2)))) {
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
if ( inputState.guessing==0 ) {
statement_AST = (TNode)currentAST.root;
statement_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NLabel)).add(statement_AST));
currentAST.root = statement_AST;
currentAST.child = statement_AST!=null &&statement_AST.getFirstChild()!=null ?
statement_AST.getFirstChild() : statement_AST;
currentAST.advanceChildToEnd();
}
statement_AST = (TNode)currentAST.root;
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_43);
} else {
throw ex;
}
}
returnAST = statement_AST;
}
public final void conditionalExpr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode conditionalExpr_AST = null;
try { // for error handling
logicalOrExpr();
astFactory.addASTChild(currentAST, returnAST);
{
switch ( LA(1)) {
case QUESTION:
{
TNode tmp125_AST = null;
tmp125_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp125_AST);
match(QUESTION);
expr();
astFactory.addASTChild(currentAST, returnAST);
match(COLON);
conditionalExpr();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case RCURLY:
case SEMI:
case COMMA:
case COLON:
case ASSIGN:
case RPAREN:
case RBRACKET:
case DIV_ASSIGN:
case PLUS_ASSIGN:
case MINUS_ASSIGN:
case STAR_ASSIGN:
case MOD_ASSIGN:
case RSHIFT_ASSIGN:
case LSHIFT_ASSIGN:
case BAND_ASSIGN:
case BOR_ASSIGN:
case BXOR_ASSIGN:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
conditionalExpr_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_46);
} else {
throw ex;
}
}
returnAST = conditionalExpr_AST;
}
public final void assignOperator() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode assignOperator_AST = null;
try { // for error handling
switch ( LA(1)) {
case ASSIGN:
{
TNode tmp127_AST = null;
tmp127_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp127_AST);
match(ASSIGN);
assignOperator_AST = (TNode)currentAST.root;
break;
}
case DIV_ASSIGN:
{
TNode tmp128_AST = null;
tmp128_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp128_AST);
match(DIV_ASSIGN);
assignOperator_AST = (TNode)currentAST.root;
break;
}
case PLUS_ASSIGN:
{
TNode tmp129_AST = null;
tmp129_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp129_AST);
match(PLUS_ASSIGN);
assignOperator_AST = (TNode)currentAST.root;
break;
}
case MINUS_ASSIGN:
{
TNode tmp130_AST = null;
tmp130_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp130_AST);
match(MINUS_ASSIGN);
assignOperator_AST = (TNode)currentAST.root;
break;
}
case STAR_ASSIGN:
{
TNode tmp131_AST = null;
tmp131_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp131_AST);
match(STAR_ASSIGN);
assignOperator_AST = (TNode)currentAST.root;
break;
}
case MOD_ASSIGN:
{
TNode tmp132_AST = null;
tmp132_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp132_AST);
match(MOD_ASSIGN);
assignOperator_AST = (TNode)currentAST.root;
break;
}
case RSHIFT_ASSIGN:
{
TNode tmp133_AST = null;
tmp133_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp133_AST);
match(RSHIFT_ASSIGN);
assignOperator_AST = (TNode)currentAST.root;
break;
}
case LSHIFT_ASSIGN:
{
TNode tmp134_AST = null;
tmp134_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp134_AST);
match(LSHIFT_ASSIGN);
assignOperator_AST = (TNode)currentAST.root;
break;
}
case BAND_ASSIGN:
{
TNode tmp135_AST = null;
tmp135_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp135_AST);
match(BAND_ASSIGN);
assignOperator_AST = (TNode)currentAST.root;
break;
}
case BOR_ASSIGN:
{
TNode tmp136_AST = null;
tmp136_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp136_AST);
match(BOR_ASSIGN);
assignOperator_AST = (TNode)currentAST.root;
break;
}
case BXOR_ASSIGN:
{
TNode tmp137_AST = null;
tmp137_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp137_AST);
match(BXOR_ASSIGN);
assignOperator_AST = (TNode)currentAST.root;
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_11);
} else {
throw ex;
}
}
returnAST = assignOperator_AST;
}
public final void logicalOrExpr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode logicalOrExpr_AST = null;
try { // for error handling
logicalAndExpr();
astFactory.addASTChild(currentAST, returnAST);
{
_loop138:
do {
if ((LA(1)==LOR)) {
TNode tmp138_AST = null;
tmp138_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp138_AST);
match(LOR);
logicalAndExpr();
astFactory.addASTChild(currentAST, returnAST);
}
else {
break _loop138;
}
} while (true);
}
logicalOrExpr_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_47);
} else {
throw ex;
}
}
returnAST = logicalOrExpr_AST;
}
public final void logicalAndExpr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode logicalAndExpr_AST = null;
try { // for error handling
inclusiveOrExpr();
astFactory.addASTChild(currentAST, returnAST);
{
_loop141:
do {
if ((LA(1)==LAND)) {
TNode tmp139_AST = null;
tmp139_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp139_AST);
match(LAND);
inclusiveOrExpr();
astFactory.addASTChild(currentAST, returnAST);
}
else {
break _loop141;
}
} while (true);
}
logicalAndExpr_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_48);
} else {
throw ex;
}
}
returnAST = logicalAndExpr_AST;
}
public final void inclusiveOrExpr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode inclusiveOrExpr_AST = null;
try { // for error handling
exclusiveOrExpr();
astFactory.addASTChild(currentAST, returnAST);
{
_loop144:
do {
if ((LA(1)==BOR)) {
TNode tmp140_AST = null;
tmp140_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp140_AST);
match(BOR);
exclusiveOrExpr();
astFactory.addASTChild(currentAST, returnAST);
}
else {
break _loop144;
}
} while (true);
}
inclusiveOrExpr_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_49);
} else {
throw ex;
}
}
returnAST = inclusiveOrExpr_AST;
}
public final void exclusiveOrExpr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode exclusiveOrExpr_AST = null;
try { // for error handling
bitAndExpr();
astFactory.addASTChild(currentAST, returnAST);
{
_loop147:
do {
if ((LA(1)==BXOR)) {
TNode tmp141_AST = null;
tmp141_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp141_AST);
match(BXOR);
bitAndExpr();
astFactory.addASTChild(currentAST, returnAST);
}
else {
break _loop147;
}
} while (true);
}
exclusiveOrExpr_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_50);
} else {
throw ex;
}
}
returnAST = exclusiveOrExpr_AST;
}
public final void bitAndExpr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode bitAndExpr_AST = null;
try { // for error handling
equalityExpr();
astFactory.addASTChild(currentAST, returnAST);
{
_loop150:
do {
if ((LA(1)==BAND)) {
TNode tmp142_AST = null;
tmp142_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp142_AST);
match(BAND);
equalityExpr();
astFactory.addASTChild(currentAST, returnAST);
}
else {
break _loop150;
}
} while (true);
}
bitAndExpr_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_51);
} else {
throw ex;
}
}
returnAST = bitAndExpr_AST;
}
public final void equalityExpr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode equalityExpr_AST = null;
try { // for error handling
relationalExpr();
astFactory.addASTChild(currentAST, returnAST);
{
_loop154:
do {
if ((LA(1)==EQUAL||LA(1)==NOT_EQUAL)) {
{
switch ( LA(1)) {
case EQUAL:
{
TNode tmp143_AST = null;
tmp143_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp143_AST);
match(EQUAL);
break;
}
case NOT_EQUAL:
{
TNode tmp144_AST = null;
tmp144_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp144_AST);
match(NOT_EQUAL);
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
relationalExpr();
astFactory.addASTChild(currentAST, returnAST);
}
else {
break _loop154;
}
} while (true);
}
equalityExpr_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_52);
} else {
throw ex;
}
}
returnAST = equalityExpr_AST;
}
public final void relationalExpr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode relationalExpr_AST = null;
try { // for error handling
shiftExpr();
astFactory.addASTChild(currentAST, returnAST);
{
_loop158:
do {
if (((LA(1) >= LT && LA(1) <= GTE))) {
{
switch ( LA(1)) {
case LT:
{
TNode tmp145_AST = null;
tmp145_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp145_AST);
match(LT);
break;
}
case LTE:
{
TNode tmp146_AST = null;
tmp146_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp146_AST);
match(LTE);
break;
}
case GT:
{
TNode tmp147_AST = null;
tmp147_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp147_AST);
match(GT);
break;
}
case GTE:
{
TNode tmp148_AST = null;
tmp148_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp148_AST);
match(GTE);
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
shiftExpr();
astFactory.addASTChild(currentAST, returnAST);
}
else {
break _loop158;
}
} while (true);
}
relationalExpr_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_53);
} else {
throw ex;
}
}
returnAST = relationalExpr_AST;
}
public final void shiftExpr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode shiftExpr_AST = null;
try { // for error handling
additiveExpr();
astFactory.addASTChild(currentAST, returnAST);
{
_loop162:
do {
if ((LA(1)==LSHIFT||LA(1)==RSHIFT)) {
{
switch ( LA(1)) {
case LSHIFT:
{
TNode tmp149_AST = null;
tmp149_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp149_AST);
match(LSHIFT);
break;
}
case RSHIFT:
{
TNode tmp150_AST = null;
tmp150_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp150_AST);
match(RSHIFT);
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
additiveExpr();
astFactory.addASTChild(currentAST, returnAST);
}
else {
break _loop162;
}
} while (true);
}
shiftExpr_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_54);
} else {
throw ex;
}
}
returnAST = shiftExpr_AST;
}
public final void additiveExpr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode additiveExpr_AST = null;
try { // for error handling
multExpr();
astFactory.addASTChild(currentAST, returnAST);
{
_loop166:
do {
if ((LA(1)==PLUS||LA(1)==MINUS)) {
{
switch ( LA(1)) {
case PLUS:
{
TNode tmp151_AST = null;
tmp151_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp151_AST);
match(PLUS);
break;
}
case MINUS:
{
TNode tmp152_AST = null;
tmp152_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp152_AST);
match(MINUS);
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
multExpr();
astFactory.addASTChild(currentAST, returnAST);
}
else {
break _loop166;
}
} while (true);
}
additiveExpr_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_55);
} else {
throw ex;
}
}
returnAST = additiveExpr_AST;
}
public final void multExpr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode multExpr_AST = null;
try { // for error handling
castExpr();
astFactory.addASTChild(currentAST, returnAST);
{
_loop170:
do {
if ((_tokenSet_56.member(LA(1)))) {
{
switch ( LA(1)) {
case STAR:
{
TNode tmp153_AST = null;
tmp153_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp153_AST);
match(STAR);
break;
}
case DIV:
{
TNode tmp154_AST = null;
tmp154_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp154_AST);
match(DIV);
break;
}
case MOD:
{
TNode tmp155_AST = null;
tmp155_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp155_AST);
match(MOD);
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
castExpr();
astFactory.addASTChild(currentAST, returnAST);
}
else {
break _loop170;
}
} while (true);
}
multExpr_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_57);
} else {
throw ex;
}
}
returnAST = multExpr_AST;
}
public final void castExpr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode castExpr_AST = null;
try { // for error handling
boolean synPredMatched173 = false;
if (((LA(1)==LPAREN) && (_tokenSet_20.member(LA(2))))) {
int _m173 = mark();
synPredMatched173 = true;
inputState.guessing++;
try {
{
match(LPAREN);
typeName();
match(RPAREN);
}
}
catch (RecognitionException pe) {
synPredMatched173 = false;
}
rewind(_m173);
inputState.guessing--;
}
if ( synPredMatched173 ) {
match(LPAREN);
typeName();
astFactory.addASTChild(currentAST, returnAST);
match(RPAREN);
{
castExpr();
astFactory.addASTChild(currentAST, returnAST);
}
if ( inputState.guessing==0 ) {
castExpr_AST = (TNode)currentAST.root;
castExpr_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NCast,"(")).add(castExpr_AST));
currentAST.root = castExpr_AST;
currentAST.child = castExpr_AST!=null &&castExpr_AST.getFirstChild()!=null ?
castExpr_AST.getFirstChild() : castExpr_AST;
currentAST.advanceChildToEnd();
}
castExpr_AST = (TNode)currentAST.root;
}
else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_58.member(LA(2)))) {
unaryExpr();
astFactory.addASTChild(currentAST, returnAST);
castExpr_AST = (TNode)currentAST.root;
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_59);
} else {
throw ex;
}
}
returnAST = castExpr_AST;
}
public final void typeName() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode typeName_AST = null;
try { // for error handling
specifierQualifierList();
astFactory.addASTChild(currentAST, returnAST);
{
switch ( LA(1)) {
case STAR:
case LPAREN:
case LBRACKET:
{
nonemptyAbstractDeclarator();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case RPAREN:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
typeName_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_33);
} else {
throw ex;
}
}
returnAST = typeName_AST;
}
public final void unaryExpr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode unaryExpr_AST = null;
TNode u_AST = null;
try { // for error handling
switch ( LA(1)) {
case ID:
case LPAREN:
case CharLiteral:
case StringLiteral:
case IntOctalConst:
case LongOctalConst:
case UnsignedOctalConst:
case IntIntConst:
case LongIntConst:
case UnsignedIntConst:
case IntHexConst:
case LongHexConst:
case UnsignedHexConst:
case FloatDoubleConst:
case DoubleDoubleConst:
case LongDoubleConst:
{
postfixExpr();
astFactory.addASTChild(currentAST, returnAST);
unaryExpr_AST = (TNode)currentAST.root;
break;
}
case INC:
{
TNode tmp158_AST = null;
tmp158_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp158_AST);
match(INC);
unaryExpr();
astFactory.addASTChild(currentAST, returnAST);
unaryExpr_AST = (TNode)currentAST.root;
break;
}
case DEC:
{
TNode tmp159_AST = null;
tmp159_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp159_AST);
match(DEC);
unaryExpr();
astFactory.addASTChild(currentAST, returnAST);
unaryExpr_AST = (TNode)currentAST.root;
break;
}
case STAR:
case BAND:
case PLUS:
case MINUS:
case BNOT:
case LNOT:
{
unaryOperator();
u_AST = (TNode)returnAST;
astFactory.addASTChild(currentAST, returnAST);
castExpr();
astFactory.addASTChild(currentAST, returnAST);
if ( inputState.guessing==0 ) {
unaryExpr_AST = (TNode)currentAST.root;
unaryExpr_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NUnaryExpr)).add(unaryExpr_AST));
currentAST.root = unaryExpr_AST;
currentAST.child = unaryExpr_AST!=null &&unaryExpr_AST.getFirstChild()!=null ?
unaryExpr_AST.getFirstChild() : unaryExpr_AST;
currentAST.advanceChildToEnd();
}
unaryExpr_AST = (TNode)currentAST.root;
break;
}
case LITERAL_sizeof:
{
TNode tmp160_AST = null;
tmp160_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp160_AST);
match(LITERAL_sizeof);
{
boolean synPredMatched194 = false;
if (((LA(1)==LPAREN) && (_tokenSet_20.member(LA(2))))) {
int _m194 = mark();
synPredMatched194 = true;
inputState.guessing++;
try {
{
match(LPAREN);
typeName();
}
}
catch (RecognitionException pe) {
synPredMatched194 = false;
}
rewind(_m194);
inputState.guessing--;
}
if ( synPredMatched194 ) {
TNode tmp161_AST = null;
tmp161_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp161_AST);
match(LPAREN);
typeName();
astFactory.addASTChild(currentAST, returnAST);
TNode tmp162_AST = null;
tmp162_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp162_AST);
match(RPAREN);
}
else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_58.member(LA(2)))) {
unaryExpr();
astFactory.addASTChild(currentAST, returnAST);
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
unaryExpr_AST = (TNode)currentAST.root;
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_59);
} else {
throw ex;
}
}
returnAST = unaryExpr_AST;
}
public final void postfixExpr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode postfixExpr_AST = null;
try { // for error handling
primaryExpr();
astFactory.addASTChild(currentAST, returnAST);
{
switch ( LA(1)) {
case LPAREN:
case LBRACKET:
case INC:
case DEC:
case PTR:
case DOT:
{
postfixSuffix();
astFactory.addASTChild(currentAST, returnAST);
if ( inputState.guessing==0 ) {
postfixExpr_AST = (TNode)currentAST.root;
postfixExpr_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NPostfixExpr)).add(postfixExpr_AST));
currentAST.root = postfixExpr_AST;
currentAST.child = postfixExpr_AST!=null &&postfixExpr_AST.getFirstChild()!=null ?
postfixExpr_AST.getFirstChild() : postfixExpr_AST;
currentAST.advanceChildToEnd();
}
break;
}
case RCURLY:
case SEMI:
case COMMA:
case COLON:
case ASSIGN:
case STAR:
case RPAREN:
case RBRACKET:
case DIV_ASSIGN:
case PLUS_ASSIGN:
case MINUS_ASSIGN:
case STAR_ASSIGN:
case MOD_ASSIGN:
case RSHIFT_ASSIGN:
case LSHIFT_ASSIGN:
case BAND_ASSIGN:
case BOR_ASSIGN:
case BXOR_ASSIGN:
case QUESTION:
case LOR:
case LAND:
case BOR:
case BXOR:
case BAND:
case EQUAL:
case NOT_EQUAL:
case LT:
case LTE:
case GT:
case GTE:
case LSHIFT:
case RSHIFT:
case PLUS:
case MINUS:
case DIV:
case MOD:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
postfixExpr_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_59);
} else {
throw ex;
}
}
returnAST = postfixExpr_AST;
}
public final void unaryOperator() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode unaryOperator_AST = null;
try { // for error handling
switch ( LA(1)) {
case BAND:
{
TNode tmp163_AST = null;
tmp163_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp163_AST);
match(BAND);
unaryOperator_AST = (TNode)currentAST.root;
break;
}
case STAR:
{
TNode tmp164_AST = null;
tmp164_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp164_AST);
match(STAR);
unaryOperator_AST = (TNode)currentAST.root;
break;
}
case PLUS:
{
TNode tmp165_AST = null;
tmp165_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp165_AST);
match(PLUS);
unaryOperator_AST = (TNode)currentAST.root;
break;
}
case MINUS:
{
TNode tmp166_AST = null;
tmp166_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp166_AST);
match(MINUS);
unaryOperator_AST = (TNode)currentAST.root;
break;
}
case BNOT:
{
TNode tmp167_AST = null;
tmp167_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp167_AST);
match(BNOT);
unaryOperator_AST = (TNode)currentAST.root;
break;
}
case LNOT:
{
TNode tmp168_AST = null;
tmp168_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp168_AST);
match(LNOT);
unaryOperator_AST = (TNode)currentAST.root;
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_11);
} else {
throw ex;
}
}
returnAST = unaryOperator_AST;
}
public final void primaryExpr() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode primaryExpr_AST = null;
try { // for error handling
switch ( LA(1)) {
case ID:
{
TNode tmp169_AST = null;
tmp169_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp169_AST);
match(ID);
primaryExpr_AST = (TNode)currentAST.root;
break;
}
case CharLiteral:
{
charConst();
astFactory.addASTChild(currentAST, returnAST);
primaryExpr_AST = (TNode)currentAST.root;
break;
}
case IntOctalConst:
case LongOctalConst:
case UnsignedOctalConst:
case IntIntConst:
case LongIntConst:
case UnsignedIntConst:
case IntHexConst:
case LongHexConst:
case UnsignedHexConst:
{
intConst();
astFactory.addASTChild(currentAST, returnAST);
primaryExpr_AST = (TNode)currentAST.root;
break;
}
case FloatDoubleConst:
case DoubleDoubleConst:
case LongDoubleConst:
{
floatConst();
astFactory.addASTChild(currentAST, returnAST);
primaryExpr_AST = (TNode)currentAST.root;
break;
}
case StringLiteral:
{
stringConst();
astFactory.addASTChild(currentAST, returnAST);
primaryExpr_AST = (TNode)currentAST.root;
break;
}
case LPAREN:
{
match(LPAREN);
expr();
astFactory.addASTChild(currentAST, returnAST);
match(RPAREN);
if ( inputState.guessing==0 ) {
primaryExpr_AST = (TNode)currentAST.root;
primaryExpr_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NExpressionGroup,"(")).add(primaryExpr_AST));
currentAST.root = primaryExpr_AST;
currentAST.child = primaryExpr_AST!=null &&primaryExpr_AST.getFirstChild()!=null ?
primaryExpr_AST.getFirstChild() : primaryExpr_AST;
currentAST.advanceChildToEnd();
}
primaryExpr_AST = (TNode)currentAST.root;
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_60);
} else {
throw ex;
}
}
returnAST = primaryExpr_AST;
}
public final void postfixSuffix() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode postfixSuffix_AST = null;
try { // for error handling
{
int _cnt200=0;
_loop200:
do {
switch ( LA(1)) {
case PTR:
{
TNode tmp172_AST = null;
tmp172_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp172_AST);
match(PTR);
TNode tmp173_AST = null;
tmp173_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp173_AST);
match(ID);
break;
}
case DOT:
{
TNode tmp174_AST = null;
tmp174_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp174_AST);
match(DOT);
TNode tmp175_AST = null;
tmp175_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp175_AST);
match(ID);
break;
}
case LPAREN:
{
functionCall();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case LBRACKET:
{
TNode tmp176_AST = null;
tmp176_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp176_AST);
match(LBRACKET);
expr();
astFactory.addASTChild(currentAST, returnAST);
TNode tmp177_AST = null;
tmp177_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp177_AST);
match(RBRACKET);
break;
}
case INC:
{
TNode tmp178_AST = null;
tmp178_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp178_AST);
match(INC);
break;
}
case DEC:
{
TNode tmp179_AST = null;
tmp179_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp179_AST);
match(DEC);
break;
}
default:
{
if ( _cnt200>=1 ) { break _loop200; } else {throw new NoViableAltException(LT(1), getFilename());}
}
}
_cnt200++;
} while (true);
}
postfixSuffix_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_59);
} else {
throw ex;
}
}
returnAST = postfixSuffix_AST;
}
public final void functionCall() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode functionCall_AST = null;
TNode a_AST = null;
try { // for error handling
TNode tmp180_AST = null;
tmp180_AST = (TNode)astFactory.create(LT(1));
astFactory.makeASTRoot(currentAST, tmp180_AST);
match(LPAREN);
{
switch ( LA(1)) {
case ID:
case STAR:
case LPAREN:
case BAND:
case PLUS:
case MINUS:
case INC:
case DEC:
case LITERAL_sizeof:
case BNOT:
case LNOT:
case CharLiteral:
case StringLiteral:
case IntOctalConst:
case LongOctalConst:
case UnsignedOctalConst:
case IntIntConst:
case LongIntConst:
case UnsignedIntConst:
case IntHexConst:
case LongHexConst:
case UnsignedHexConst:
case FloatDoubleConst:
case DoubleDoubleConst:
case LongDoubleConst:
{
argExprList();
a_AST = (TNode)returnAST;
astFactory.addASTChild(currentAST, returnAST);
break;
}
case RPAREN:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
TNode tmp181_AST = null;
tmp181_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp181_AST);
match(RPAREN);
if ( inputState.guessing==0 ) {
functionCall_AST = (TNode)currentAST.root;
functionCall_AST.setType( NFunctionCallArgs );
}
functionCall_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_60);
} else {
throw ex;
}
}
returnAST = functionCall_AST;
}
public final void argExprList() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode argExprList_AST = null;
try { // for error handling
assignExpr();
astFactory.addASTChild(currentAST, returnAST);
{
_loop206:
do {
if ((LA(1)==COMMA)) {
match(COMMA);
assignExpr();
astFactory.addASTChild(currentAST, returnAST);
}
else {
break _loop206;
}
} while (true);
}
argExprList_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_33);
} else {
throw ex;
}
}
returnAST = argExprList_AST;
}
protected final void charConst() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode charConst_AST = null;
try { // for error handling
TNode tmp183_AST = null;
tmp183_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp183_AST);
match(CharLiteral);
charConst_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_60);
} else {
throw ex;
}
}
returnAST = charConst_AST;
}
protected final void intConst() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode intConst_AST = null;
try { // for error handling
switch ( LA(1)) {
case IntOctalConst:
{
TNode tmp184_AST = null;
tmp184_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp184_AST);
match(IntOctalConst);
intConst_AST = (TNode)currentAST.root;
break;
}
case LongOctalConst:
{
TNode tmp185_AST = null;
tmp185_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp185_AST);
match(LongOctalConst);
intConst_AST = (TNode)currentAST.root;
break;
}
case UnsignedOctalConst:
{
TNode tmp186_AST = null;
tmp186_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp186_AST);
match(UnsignedOctalConst);
intConst_AST = (TNode)currentAST.root;
break;
}
case IntIntConst:
{
TNode tmp187_AST = null;
tmp187_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp187_AST);
match(IntIntConst);
intConst_AST = (TNode)currentAST.root;
break;
}
case LongIntConst:
{
TNode tmp188_AST = null;
tmp188_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp188_AST);
match(LongIntConst);
intConst_AST = (TNode)currentAST.root;
break;
}
case UnsignedIntConst:
{
TNode tmp189_AST = null;
tmp189_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp189_AST);
match(UnsignedIntConst);
intConst_AST = (TNode)currentAST.root;
break;
}
case IntHexConst:
{
TNode tmp190_AST = null;
tmp190_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp190_AST);
match(IntHexConst);
intConst_AST = (TNode)currentAST.root;
break;
}
case LongHexConst:
{
TNode tmp191_AST = null;
tmp191_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp191_AST);
match(LongHexConst);
intConst_AST = (TNode)currentAST.root;
break;
}
case UnsignedHexConst:
{
TNode tmp192_AST = null;
tmp192_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp192_AST);
match(UnsignedHexConst);
intConst_AST = (TNode)currentAST.root;
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_60);
} else {
throw ex;
}
}
returnAST = intConst_AST;
}
protected final void floatConst() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode floatConst_AST = null;
try { // for error handling
switch ( LA(1)) {
case FloatDoubleConst:
{
TNode tmp193_AST = null;
tmp193_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp193_AST);
match(FloatDoubleConst);
floatConst_AST = (TNode)currentAST.root;
break;
}
case DoubleDoubleConst:
{
TNode tmp194_AST = null;
tmp194_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp194_AST);
match(DoubleDoubleConst);
floatConst_AST = (TNode)currentAST.root;
break;
}
case LongDoubleConst:
{
TNode tmp195_AST = null;
tmp195_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp195_AST);
match(LongDoubleConst);
floatConst_AST = (TNode)currentAST.root;
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_60);
} else {
throw ex;
}
}
returnAST = floatConst_AST;
}
protected final void stringConst() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode stringConst_AST = null;
try { // for error handling
{
int _cnt210=0;
_loop210:
do {
if ((LA(1)==StringLiteral)) {
TNode tmp196_AST = null;
tmp196_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp196_AST);
match(StringLiteral);
}
else {
if ( _cnt210>=1 ) { break _loop210; } else {throw new NoViableAltException(LT(1), getFilename());}
}
_cnt210++;
} while (true);
}
if ( inputState.guessing==0 ) {
stringConst_AST = (TNode)currentAST.root;
stringConst_AST = (TNode)astFactory.make( (new ASTArray(2)).add((TNode)astFactory.create(NStringSeq)).add(stringConst_AST));
currentAST.root = stringConst_AST;
currentAST.child = stringConst_AST!=null &&stringConst_AST.getFirstChild()!=null ?
stringConst_AST.getFirstChild() : stringConst_AST;
currentAST.advanceChildToEnd();
}
stringConst_AST = (TNode)currentAST.root;
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_60);
} else {
throw ex;
}
}
returnAST = stringConst_AST;
}
public final void dummy() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
TNode dummy_AST = null;
try { // for error handling
switch ( LA(1)) {
case NTypedefName:
{
TNode tmp197_AST = null;
tmp197_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp197_AST);
match(NTypedefName);
dummy_AST = (TNode)currentAST.root;
break;
}
case NInitDecl:
{
TNode tmp198_AST = null;
tmp198_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp198_AST);
match(NInitDecl);
dummy_AST = (TNode)currentAST.root;
break;
}
case NDeclarator:
{
TNode tmp199_AST = null;
tmp199_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp199_AST);
match(NDeclarator);
dummy_AST = (TNode)currentAST.root;
break;
}
case NStructDeclarator:
{
TNode tmp200_AST = null;
tmp200_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp200_AST);
match(NStructDeclarator);
dummy_AST = (TNode)currentAST.root;
break;
}
case NDeclaration:
{
TNode tmp201_AST = null;
tmp201_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp201_AST);
match(NDeclaration);
dummy_AST = (TNode)currentAST.root;
break;
}
case NCast:
{
TNode tmp202_AST = null;
tmp202_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp202_AST);
match(NCast);
dummy_AST = (TNode)currentAST.root;
break;
}
case NPointerGroup:
{
TNode tmp203_AST = null;
tmp203_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp203_AST);
match(NPointerGroup);
dummy_AST = (TNode)currentAST.root;
break;
}
case NExpressionGroup:
{
TNode tmp204_AST = null;
tmp204_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp204_AST);
match(NExpressionGroup);
dummy_AST = (TNode)currentAST.root;
break;
}
case NFunctionCallArgs:
{
TNode tmp205_AST = null;
tmp205_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp205_AST);
match(NFunctionCallArgs);
dummy_AST = (TNode)currentAST.root;
break;
}
case NNonemptyAbstractDeclarator:
{
TNode tmp206_AST = null;
tmp206_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp206_AST);
match(NNonemptyAbstractDeclarator);
dummy_AST = (TNode)currentAST.root;
break;
}
case NInitializer:
{
TNode tmp207_AST = null;
tmp207_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp207_AST);
match(NInitializer);
dummy_AST = (TNode)currentAST.root;
break;
}
case NStatementExpr:
{
TNode tmp208_AST = null;
tmp208_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp208_AST);
match(NStatementExpr);
dummy_AST = (TNode)currentAST.root;
break;
}
case NEmptyExpression:
{
TNode tmp209_AST = null;
tmp209_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp209_AST);
match(NEmptyExpression);
dummy_AST = (TNode)currentAST.root;
break;
}
case NParameterTypeList:
{
TNode tmp210_AST = null;
tmp210_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp210_AST);
match(NParameterTypeList);
dummy_AST = (TNode)currentAST.root;
break;
}
case NFunctionDef:
{
TNode tmp211_AST = null;
tmp211_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp211_AST);
match(NFunctionDef);
dummy_AST = (TNode)currentAST.root;
break;
}
case NCompoundStatement:
{
TNode tmp212_AST = null;
tmp212_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp212_AST);
match(NCompoundStatement);
dummy_AST = (TNode)currentAST.root;
break;
}
case NParameterDeclaration:
{
TNode tmp213_AST = null;
tmp213_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp213_AST);
match(NParameterDeclaration);
dummy_AST = (TNode)currentAST.root;
break;
}
case NCommaExpr:
{
TNode tmp214_AST = null;
tmp214_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp214_AST);
match(NCommaExpr);
dummy_AST = (TNode)currentAST.root;
break;
}
case NUnaryExpr:
{
TNode tmp215_AST = null;
tmp215_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp215_AST);
match(NUnaryExpr);
dummy_AST = (TNode)currentAST.root;
break;
}
case NLabel:
{
TNode tmp216_AST = null;
tmp216_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp216_AST);
match(NLabel);
dummy_AST = (TNode)currentAST.root;
break;
}
case NPostfixExpr:
{
TNode tmp217_AST = null;
tmp217_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp217_AST);
match(NPostfixExpr);
dummy_AST = (TNode)currentAST.root;
break;
}
case NRangeExpr:
{
TNode tmp218_AST = null;
tmp218_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp218_AST);
match(NRangeExpr);
dummy_AST = (TNode)currentAST.root;
break;
}
case NStringSeq:
{
TNode tmp219_AST = null;
tmp219_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp219_AST);
match(NStringSeq);
dummy_AST = (TNode)currentAST.root;
break;
}
case NInitializerElementLabel:
{
TNode tmp220_AST = null;
tmp220_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp220_AST);
match(NInitializerElementLabel);
dummy_AST = (TNode)currentAST.root;
break;
}
case NLcurlyInitializer:
{
TNode tmp221_AST = null;
tmp221_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp221_AST);
match(NLcurlyInitializer);
dummy_AST = (TNode)currentAST.root;
break;
}
case NAsmAttribute:
{
TNode tmp222_AST = null;
tmp222_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp222_AST);
match(NAsmAttribute);
dummy_AST = (TNode)currentAST.root;
break;
}
case NGnuAsmExpr:
{
TNode tmp223_AST = null;
tmp223_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp223_AST);
match(NGnuAsmExpr);
dummy_AST = (TNode)currentAST.root;
break;
}
case NTypeMissing:
{
TNode tmp224_AST = null;
tmp224_AST = (TNode)astFactory.create(LT(1));
astFactory.addASTChild(currentAST, tmp224_AST);
match(NTypeMissing);
dummy_AST = (TNode)currentAST.root;
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
catch (RecognitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_0);
} else {
throw ex;
}
}
returnAST = dummy_AST;
}
public static final String[] _tokenNames = {
"<0>",
"EOF",
"<2>",
"NULL_TREE_LOOKAHEAD",
"\"typedef\"",
"\"asm\"",
"\"volatile\"",
"LCURLY",
"RCURLY",
"SEMI",
"\"struct\"",
"\"union\"",
"\"enum\"",
"\"auto\"",
"\"register\"",
"\"extern\"",
"\"static\"",
"\"const\"",
"\"void\"",
"\"char\"",
"\"short\"",
"\"int\"",
"\"long\"",
"\"float\"",
"\"double\"",
"\"signed\"",
"\"unsigned\"",
"\"int8_t\"",
"\"uint8_t\"",
"\"int16_t\"",
"\"uint16_t\"",
"\"__int32\"",
"\"int32_t\"",
"\"wchar_t\"",
"\"uint32_t\"",
"\"__int64\"",
"\"int64_t\"",
"\"uint64_t\"",
"\"ptrdiff_t\"",
"\"intptr_t\"",
"\"size_t\"",
"\"uintptr_t\"",
"ID",
"COMMA",
"COLON",
"ASSIGN",
"STAR",
"LPAREN",
"RPAREN",
"LBRACKET",
"RBRACKET",
"VARARGS",
"\"while\"",
"\"do\"",
"\"for\"",
"\"goto\"",
"\"continue\"",
"\"break\"",
"\"return\"",
"\"case\"",
"\"default\"",
"\"if\"",
"\"else\"",
"\"switch\"",
"DIV_ASSIGN",
"PLUS_ASSIGN",
"MINUS_ASSIGN",
"STAR_ASSIGN",
"MOD_ASSIGN",
"RSHIFT_ASSIGN",
"LSHIFT_ASSIGN",
"BAND_ASSIGN",
"BOR_ASSIGN",
"BXOR_ASSIGN",
"QUESTION",
"LOR",
"LAND",
"BOR",
"BXOR",
"BAND",
"EQUAL",
"NOT_EQUAL",
"LT",
"LTE",
"GT",
"GTE",
"LSHIFT",
"RSHIFT",
"PLUS",
"MINUS",
"DIV",
"MOD",
"INC",
"DEC",
"\"sizeof\"",
"BNOT",
"LNOT",
"PTR",
"DOT",
"CharLiteral",
"StringLiteral",
"IntOctalConst",
"LongOctalConst",
"UnsignedOctalConst",
"IntIntConst",
"LongIntConst",
"UnsignedIntConst",
"IntHexConst",
"LongHexConst",
"UnsignedHexConst",
"FloatDoubleConst",
"DoubleDoubleConst",
"LongDoubleConst",
"NTypedefName",
"NInitDecl",
"NDeclarator",
"NStructDeclarator",
"NDeclaration",
"NCast",
"NPointerGroup",
"NExpressionGroup",
"NFunctionCallArgs",
"NNonemptyAbstractDeclarator",
"NInitializer",
"NStatementExpr",
"NEmptyExpression",
"NParameterTypeList",
"NFunctionDef",
"NCompoundStatement",
"NParameterDeclaration",
"NCommaExpr",
"NUnaryExpr",
"NLabel",
"NPostfixExpr",
"NRangeExpr",
"NStringSeq",
"NInitializerElementLabel",
"NLcurlyInitializer",
"NAsmAttribute",
"NGnuAsmExpr",
"NTypeMissing",
"Vocabulary",
"Whitespace",
"Comment",
"CPPComment",
"NonWhitespace",
"a line directive",
"DefineExpr",
"DefineExpr2",
"Space",
"LineDirective",
"BadStringLiteral",
"Escape",
"Digit",
"LongSuffix",
"UnsignedSuffix",
"FloatSuffix",
"Exponent",
"Number"
};
protected void buildTokenTypeASTClassMap() {
tokenTypeToASTClassMap=null;
};
private static final long[] mk_tokenSet_0() {
long[] data = { 2L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
private static final long[] mk_tokenSet_1() {
long[] data = { 219902325554288L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
private static final long[] mk_tokenSet_2() {
long[] data = { 8796093021264L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
private static final long[] mk_tokenSet_3() {
long[] data = { 219902325554896L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
private static final long[] mk_tokenSet_4() {
long[] data = { 219902325529664L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
private static final long[] mk_tokenSet_5() {
long[] data = { 3034652092661456L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
private static final long[] mk_tokenSet_6() {
long[] data = { 219902325554290L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
private static final long[] mk_tokenSet_7() {
long[] data = { -4613717915915517966L, 562923965546496L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
private static final long[] mk_tokenSet_8() {
long[] data = { 8796092996672L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
private static final long[] mk_tokenSet_9() {
long[] data = { 219902325529792L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
private static final long[] mk_tokenSet_10() {
long[] data = { 215504279044096L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());
private static final long[] mk_tokenSet_11() {
long[] data = { 215504279044096L, 562923965546496L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11());
private static final long[] mk_tokenSet_12() {
long[] data = { 1433763162620672L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_12 = new BitSet(mk_tokenSet_12());
private static final long[] mk_tokenSet_13() {
long[] data = { 8796092767232L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_13 = new BitSet(mk_tokenSet_13());
private static final long[] mk_tokenSet_14() {
long[] data = { 1073123348709072L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_14 = new BitSet(mk_tokenSet_14());
private static final long[] mk_tokenSet_15() {
long[] data = { 1068725302198784L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_15 = new BitSet(mk_tokenSet_15());
private static final long[] mk_tokenSet_16() {
long[] data = { 512L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_16 = new BitSet(mk_tokenSet_16());
private static final long[] mk_tokenSet_17() {
long[] data = { 1073123348708944L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_17 = new BitSet(mk_tokenSet_17());
private static final long[] mk_tokenSet_18() {
long[] data = { 1090715534753360L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_18 = new BitSet(mk_tokenSet_18());
private static final long[] mk_tokenSet_19() {
long[] data = { 4398046511232L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_19 = new BitSet(mk_tokenSet_19());
private static final long[] mk_tokenSet_20() {
long[] data = { 8796092898368L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_20 = new BitSet(mk_tokenSet_20());
private static final long[] mk_tokenSet_21() {
long[] data = { 256L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_21 = new BitSet(mk_tokenSet_21());
private static final long[] mk_tokenSet_22() {
long[] data = { 8796092898624L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_22 = new BitSet(mk_tokenSet_22());
private static final long[] mk_tokenSet_23() {
long[] data = { 1081919441607872L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_23 = new BitSet(mk_tokenSet_23());
private static final long[] mk_tokenSet_24() {
long[] data = { 1077521395220480L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_24 = new BitSet(mk_tokenSet_24());
private static final long[] mk_tokenSet_25() {
long[] data = { 8796093022720L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_25 = new BitSet(mk_tokenSet_25());
private static final long[] mk_tokenSet_26() {
long[] data = { 1152288185910016L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_26 = new BitSet(mk_tokenSet_26());
private static final long[] mk_tokenSet_27() {
long[] data = { 1073123348708560L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_27 = new BitSet(mk_tokenSet_27());
private static final long[] mk_tokenSet_28() {
long[] data = { 3307330976349904L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_28 = new BitSet(mk_tokenSet_28());
private static final long[] mk_tokenSet_29() {
long[] data = { 2603643534573264L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_29 = new BitSet(mk_tokenSet_29());
private static final long[] mk_tokenSet_30() {
long[] data = { 8796093022464L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_30 = new BitSet(mk_tokenSet_30());
private static final long[] mk_tokenSet_31() {
long[] data = { 8796093022976L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_31 = new BitSet(mk_tokenSet_31());
private static final long[] mk_tokenSet_32() {
long[] data = { 998356558020608L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_32 = new BitSet(mk_tokenSet_32());
private static final long[] mk_tokenSet_33() {
long[] data = { 281474976710656L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_33 = new BitSet(mk_tokenSet_33());
private static final long[] mk_tokenSet_34() {
long[] data = { 215504279044224L, 562923965546496L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_34 = new BitSet(mk_tokenSet_34());
private static final long[] mk_tokenSet_35() {
long[] data = { 1068725302329408L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_35 = new BitSet(mk_tokenSet_35());
private static final long[] mk_tokenSet_36() {
long[] data = { 774056185954304L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_36 = new BitSet(mk_tokenSet_36());
private static final long[] mk_tokenSet_37() {
long[] data = { 2199023255551056L, 562923965546496L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_37 = new BitSet(mk_tokenSet_37());
private static final long[] mk_tokenSet_38() {
long[] data = { 290271069732864L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_38 = new BitSet(mk_tokenSet_38());
private static final long[] mk_tokenSet_39() {
long[] data = { -4615974113775713408L, 562923965546496L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_39 = new BitSet(mk_tokenSet_39());
private static final long[] mk_tokenSet_40() {
long[] data = { -3659174697238542L, 562949953421311L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_40 = new BitSet(mk_tokenSet_40());
private static final long[] mk_tokenSet_41() {
long[] data = { -4283697301815310L, 562923965546496L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_41 = new BitSet(mk_tokenSet_41());
private static final long[] mk_tokenSet_42() {
long[] data = { -4615974113775713664L, 562923965546496L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_42 = new BitSet(mk_tokenSet_42());
private static final long[] mk_tokenSet_43() {
long[] data = { -4288095348325504L, 562923965546496L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_43 = new BitSet(mk_tokenSet_43());
private static final long[] mk_tokenSet_44() {
long[] data = { 826832743964224L, 562949953421311L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_44 = new BitSet(mk_tokenSet_44());
private static final long[] mk_tokenSet_45() {
long[] data = { -3659174697238576L, 562949953421311L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_45 = new BitSet(mk_tokenSet_45());
private static final long[] mk_tokenSet_46() {
long[] data = { 1468947534709504L, 1023L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_46 = new BitSet(mk_tokenSet_46());
private static final long[] mk_tokenSet_47() {
long[] data = { 1468947534709504L, 2047L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_47 = new BitSet(mk_tokenSet_47());
private static final long[] mk_tokenSet_48() {
long[] data = { 1468947534709504L, 4095L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_48 = new BitSet(mk_tokenSet_48());
private static final long[] mk_tokenSet_49() {
long[] data = { 1468947534709504L, 8191L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_49 = new BitSet(mk_tokenSet_49());
private static final long[] mk_tokenSet_50() {
long[] data = { 1468947534709504L, 16383L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_50 = new BitSet(mk_tokenSet_50());
private static final long[] mk_tokenSet_51() {
long[] data = { 1468947534709504L, 32767L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_51 = new BitSet(mk_tokenSet_51());
private static final long[] mk_tokenSet_52() {
long[] data = { 1468947534709504L, 65535L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_52 = new BitSet(mk_tokenSet_52());
private static final long[] mk_tokenSet_53() {
long[] data = { 1468947534709504L, 262143L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_53 = new BitSet(mk_tokenSet_53());
private static final long[] mk_tokenSet_54() {
long[] data = { 1468947534709504L, 4194303L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_54 = new BitSet(mk_tokenSet_54());
private static final long[] mk_tokenSet_55() {
long[] data = { 1468947534709504L, 16777215L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_55 = new BitSet(mk_tokenSet_55());
private static final long[] mk_tokenSet_56() {
long[] data = { 70368744177664L, 201326592L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_56 = new BitSet(mk_tokenSet_56());
private static final long[] mk_tokenSet_57() {
long[] data = { 1468947534709504L, 67108863L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_57 = new BitSet(mk_tokenSet_57());
private static final long[] mk_tokenSet_58() {
long[] data = { 2247401767174912L, 562949953421311L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_58 = new BitSet(mk_tokenSet_58());
private static final long[] mk_tokenSet_59() {
long[] data = { 1539316278887168L, 268435455L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_59 = new BitSet(mk_tokenSet_59());
private static final long[] mk_tokenSet_60() {
long[] data = { 2243003720663808L, 26843545599L, 0L, 0L};
return data;
}
public static final BitSet _tokenSet_60 = new BitSet(mk_tokenSet_60());
}