}
public final void forStatement() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST forStatement_AST = null;
AST cl_AST = null;
AST fic_AST = null;
Token s = null;
AST s_AST = null;
AST forCbs_AST = null;
Token first = LT(1);
match(LITERAL_for);
match(LPAREN);
{
boolean synPredMatched305 = false;
if (((_tokenSet_76.member(LA(1))) && (_tokenSet_77.member(LA(2))))) {
int _m305 = mark();
synPredMatched305 = true;
inputState.guessing++;
try {
{
switch ( LA(1)) {
case SEMI:
{
match(SEMI);
break;
}
case FINAL:
case ABSTRACT:
case STRICTFP:
case LITERAL_static:
case LITERAL_def:
case LBRACK:
case IDENT:
case STRING_LITERAL:
case LPAREN:
case AT:
case LITERAL_super:
case LITERAL_void:
case LITERAL_boolean:
case LITERAL_byte:
case LITERAL_char:
case LITERAL_short:
case LITERAL_int:
case LITERAL_float:
case LITERAL_long:
case LITERAL_double:
case LITERAL_private:
case LITERAL_public:
case LITERAL_protected:
case LITERAL_transient:
case LITERAL_native:
case LITERAL_threadsafe:
case LITERAL_synchronized:
case LITERAL_volatile:
case LCURLY:
case LITERAL_this:
case LITERAL_return:
case LITERAL_break:
case LITERAL_continue:
case LITERAL_throw:
case LITERAL_assert:
case PLUS:
case MINUS:
case LITERAL_false:
case LITERAL_new:
case LITERAL_null:
case LITERAL_true:
case INC:
case DEC:
case BNOT:
case LNOT:
case STRING_CTOR_START:
case NUM_INT:
case NUM_FLOAT:
case NUM_LONG:
case NUM_DOUBLE:
case NUM_BIG_INT:
case NUM_BIG_DECIMAL:
{
{
strictContextExpression(true);
match(SEMI);
}
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
}
catch (RecognitionException pe) {
synPredMatched305 = false;
}
rewind(_m305);
inputState.guessing--;
}
if ( synPredMatched305 ) {
closureList();
cl_AST = (AST)returnAST;
}
else if ((_tokenSet_15.member(LA(1))) && (_tokenSet_78.member(LA(2)))) {
forInClause();
fic_AST = (AST)returnAST;
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
match(RPAREN);
nls();
{
switch ( LA(1)) {
case SEMI:
{
s = LT(1);
s_AST = astFactory.create(s);
match(SEMI);
break;
}
case FINAL:
case ABSTRACT:
case STRICTFP:
case LITERAL_import:
case LITERAL_static:
case LITERAL_def:
case LBRACK:
case IDENT:
case STRING_LITERAL:
case LPAREN:
case LITERAL_class:
case LITERAL_interface:
case LITERAL_enum:
case AT:
case LITERAL_super:
case LITERAL_void:
case LITERAL_boolean:
case LITERAL_byte:
case LITERAL_char:
case LITERAL_short:
case LITERAL_int:
case LITERAL_float:
case LITERAL_long:
case LITERAL_double:
case LITERAL_private:
case LITERAL_public:
case LITERAL_protected:
case LITERAL_transient:
case LITERAL_native:
case LITERAL_threadsafe:
case LITERAL_synchronized:
case LITERAL_volatile:
case LCURLY:
case LITERAL_this:
case LITERAL_if:
case LITERAL_while:
case LITERAL_switch:
case LITERAL_for:
case LITERAL_return:
case LITERAL_break:
case LITERAL_continue:
case LITERAL_throw:
case LITERAL_assert:
case PLUS:
case MINUS:
case LITERAL_try:
case LITERAL_false:
case LITERAL_new:
case LITERAL_null:
case LITERAL_true:
case INC:
case DEC:
case BNOT:
case LNOT:
case STRING_CTOR_START:
case NUM_INT:
case NUM_FLOAT:
case NUM_LONG:
case NUM_DOUBLE:
case NUM_BIG_INT:
case NUM_BIG_DECIMAL:
{
compatibleBodyStatement();
forCbs_AST = (AST)returnAST;
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
if ( inputState.guessing==0 ) {
forStatement_AST = (AST)currentAST.root;
if (cl_AST != null) {
if (s_AST != null)
forStatement_AST = (AST)astFactory.make( (new ASTArray(3)).add(create(LITERAL_for,"for",first,LT(1))).add(cl_AST).add(s_AST));
else
forStatement_AST = (AST)astFactory.make( (new ASTArray(3)).add(create(LITERAL_for,"for",first,LT(1))).add(cl_AST).add(forCbs_AST));
} else {
if (s_AST != null)
forStatement_AST = (AST)astFactory.make( (new ASTArray(3)).add(create(LITERAL_for,"for",first,LT(1))).add(fic_AST).add(s_AST));
else
forStatement_AST = (AST)astFactory.make( (new ASTArray(3)).add(create(LITERAL_for,"for",first,LT(1))).add(fic_AST).add(forCbs_AST));
}
currentAST.root = forStatement_AST;
currentAST.child = forStatement_AST!=null &&forStatement_AST.getFirstChild()!=null ?
forStatement_AST.getFirstChild() : forStatement_AST;
currentAST.advanceChildToEnd();
}
forStatement_AST = (AST)currentAST.root;
returnAST = forStatement_AST;
}