* If an optional expression is missing, its value is void (this coerces to null when a value is required).
*/
public final void branchStatement() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST branchStatement_AST = null;
AST returnE_AST = null;
Token breakI = null;
AST breakI_AST = null;
Token contI = null;
AST contI_AST = null;
AST throwE_AST = null;
AST assertAle_AST = null;
AST assertE_AST = null;
Token first = LT(1);
switch ( LA(1)) {
case LITERAL_return:
{
match(LITERAL_return);
{
switch ( LA(1)) {
case LBRACK:
case IDENT:
case STRING_LITERAL:
case LPAREN:
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 LCURLY:
case LITERAL_this:
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:
{
expression(0);
returnE_AST = (AST)returnAST;
break;
}
case EOF:
case RBRACK:
case COMMA:
case RPAREN:
case RCURLY:
case SEMI:
case LITERAL_default:
case LITERAL_else:
case LITERAL_case:
case NLS:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
if ( inputState.guessing==0 ) {
branchStatement_AST = (AST)currentAST.root;
branchStatement_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(LITERAL_return,"return",first,LT(1))).add(returnE_AST));
currentAST.root = branchStatement_AST;
currentAST.child = branchStatement_AST!=null &&branchStatement_AST.getFirstChild()!=null ?
branchStatement_AST.getFirstChild() : branchStatement_AST;
currentAST.advanceChildToEnd();
}
branchStatement_AST = (AST)currentAST.root;
break;
}
case LITERAL_break:
{
match(LITERAL_break);
{
switch ( LA(1)) {
case IDENT:
{
breakI = LT(1);
breakI_AST = astFactory.create(breakI);
match(IDENT);
break;
}
case EOF:
case RBRACK:
case COMMA:
case RPAREN:
case RCURLY:
case SEMI:
case LITERAL_default:
case LITERAL_else:
case LITERAL_case:
case NLS:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
if ( inputState.guessing==0 ) {
branchStatement_AST = (AST)currentAST.root;
branchStatement_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(LITERAL_break,"break",first,LT(1))).add(breakI_AST));
currentAST.root = branchStatement_AST;
currentAST.child = branchStatement_AST!=null &&branchStatement_AST.getFirstChild()!=null ?
branchStatement_AST.getFirstChild() : branchStatement_AST;
currentAST.advanceChildToEnd();
}
branchStatement_AST = (AST)currentAST.root;
break;
}
case LITERAL_continue:
{
match(LITERAL_continue);
{
switch ( LA(1)) {
case IDENT:
{
contI = LT(1);
contI_AST = astFactory.create(contI);
match(IDENT);
break;
}
case EOF:
case RBRACK:
case COMMA:
case RPAREN:
case RCURLY:
case SEMI:
case LITERAL_default:
case LITERAL_else:
case LITERAL_case:
case NLS:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
if ( inputState.guessing==0 ) {
branchStatement_AST = (AST)currentAST.root;
branchStatement_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(LITERAL_continue,"continue",first,LT(1))).add(contI_AST));
currentAST.root = branchStatement_AST;
currentAST.child = branchStatement_AST!=null &&branchStatement_AST.getFirstChild()!=null ?
branchStatement_AST.getFirstChild() : branchStatement_AST;
currentAST.advanceChildToEnd();
}
branchStatement_AST = (AST)currentAST.root;
break;
}
case LITERAL_throw:
{
match(LITERAL_throw);
expression(0);
throwE_AST = (AST)returnAST;
if ( inputState.guessing==0 ) {
branchStatement_AST = (AST)currentAST.root;
branchStatement_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(LITERAL_throw,"throw",first,LT(1))).add(throwE_AST));
currentAST.root = branchStatement_AST;
currentAST.child = branchStatement_AST!=null &&branchStatement_AST.getFirstChild()!=null ?
branchStatement_AST.getFirstChild() : branchStatement_AST;
currentAST.advanceChildToEnd();
}
branchStatement_AST = (AST)currentAST.root;
break;
}
case LITERAL_assert:
{
match(LITERAL_assert);
assignmentLessExpression();
assertAle_AST = (AST)returnAST;
{
if ((LA(1)==COMMA||LA(1)==COLON) && (_tokenSet_81.member(LA(2)))) {
{
switch ( LA(1)) {
case COMMA:
{
match(COMMA);
nls();
break;
}
case COLON:
{
match(COLON);
nls();
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
expression(0);
assertE_AST = (AST)returnAST;
}
else if ((_tokenSet_82.member(LA(1))) && (_tokenSet_11.member(LA(2)))) {
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
if ( inputState.guessing==0 ) {
branchStatement_AST = (AST)currentAST.root;
branchStatement_AST = (AST)astFactory.make( (new ASTArray(3)).add(create(LITERAL_assert,"assert",first,LT(1))).add(assertAle_AST).add(assertE_AST));
currentAST.root = branchStatement_AST;
currentAST.child = branchStatement_AST!=null &&branchStatement_AST.getFirstChild()!=null ?
branchStatement_AST.getFirstChild() : branchStatement_AST;
currentAST.advanceChildToEnd();
}
branchStatement_AST = (AST)currentAST.root;
break;
}
default: