}
public final void stat(AST _t) throws RecognitionException
{
AST stat_AST_in = (AST) _t;
try
{ // for error handling
if ( _t == null ) _t = ASTNULL;
switch ( _t.getType() )
{
case CLASS_DEF :
case INTERFACE_DEF :
{
typeDefinition( _t );
_t = _retTree;
break;
}
case VARIABLE_DEF :
{
variableDef( _t );
_t = _retTree;
break;
}
case EXPR :
{
expression( _t );
_t = _retTree;
break;
}
case LABELED_STAT :
{
AST __t427 = _t;
AST tmp74_AST_in = (AST) _t;
match( _t,
LABELED_STAT );
_t = _t.getFirstChild();
AST tmp75_AST_in = (AST) _t;
match( _t,
IDENT );
_t = _t.getNextSibling();
stat( _t );
_t = _retTree;
_t = __t427;
_t = _t.getNextSibling();
break;
}
case LITERAL_if :
{
AST __t428 = _t;
AST tmp76_AST_in = (AST) _t;
match( _t,
LITERAL_if );
_t = _t.getFirstChild();
expression( _t );
_t = _retTree;
stat( _t );
_t = _retTree;
{
if ( _t == null ) _t = ASTNULL;
switch ( _t.getType() )
{
case SLIST :
case VARIABLE_DEF :
case CLASS_DEF :
case INTERFACE_DEF :
case LABELED_STAT :
case EXPR :
case EMPTY_STAT :
case LITERAL_synchronized :
case LITERAL_if :
case LITERAL_for :
case LITERAL_while :
case LITERAL_do :
case LITERAL_break :
case LITERAL_continue :
case LITERAL_return :
case LITERAL_switch :
case LITERAL_throw :
case LITERAL_try :
{
stat( _t );
_t = _retTree;
break;
}
case 3 :
{
break;
}
default :
{
throw new NoViableAltException( _t );
}
}
}
_t = __t428;
_t = _t.getNextSibling();
break;
}
case LITERAL_for :
{
AST __t430 = _t;
AST tmp77_AST_in = (AST) _t;
match( _t,
LITERAL_for );
_t = _t.getFirstChild();
AST __t431 = _t;
AST tmp78_AST_in = (AST) _t;
match( _t,
FOR_INIT );
_t = _t.getFirstChild();
{
if ( _t == null ) _t = ASTNULL;
switch ( _t.getType() )
{
case VARIABLE_DEF :
{
variableDef( _t );
_t = _retTree;
break;
}
case ELIST :
{
elist( _t );
_t = _retTree;
break;
}
case 3 :
{
break;
}
default :
{
throw new NoViableAltException( _t );
}
}
}
_t = __t431;
_t = _t.getNextSibling();
AST __t433 = _t;
AST tmp79_AST_in = (AST) _t;
match( _t,
FOR_CONDITION );
_t = _t.getFirstChild();
{
if ( _t == null ) _t = ASTNULL;
switch ( _t.getType() )
{
case EXPR :
{
expression( _t );
_t = _retTree;
break;
}
case 3 :
{
break;
}
default :
{
throw new NoViableAltException( _t );
}
}
}
_t = __t433;
_t = _t.getNextSibling();
AST __t435 = _t;
AST tmp80_AST_in = (AST) _t;
match( _t,
FOR_ITERATOR );
_t = _t.getFirstChild();
{
if ( _t == null ) _t = ASTNULL;
switch ( _t.getType() )
{
case ELIST :
{
elist( _t );
_t = _retTree;
break;
}
case 3 :
{
break;
}
default :
{
throw new NoViableAltException( _t );
}
}
}
_t = __t435;
_t = _t.getNextSibling();
stat( _t );
_t = _retTree;
_t = __t430;
_t = _t.getNextSibling();
break;
}
case LITERAL_while :
{
AST __t437 = _t;
AST tmp81_AST_in = (AST) _t;
match( _t,
LITERAL_while );
_t = _t.getFirstChild();
expression( _t );
_t = _retTree;
stat( _t );
_t = _retTree;
_t = __t437;
_t = _t.getNextSibling();
break;
}
case LITERAL_do :
{
AST __t438 = _t;
AST tmp82_AST_in = (AST) _t;
match( _t,
LITERAL_do );
_t = _t.getFirstChild();
stat( _t );
_t = _retTree;
expression( _t );
_t = _retTree;
_t = __t438;
_t = _t.getNextSibling();
break;
}
case LITERAL_break :
{
AST __t439 = _t;
AST tmp83_AST_in = (AST) _t;
match( _t,
LITERAL_break );
_t = _t.getFirstChild();
{
if ( _t == null ) _t = ASTNULL;
switch ( _t.getType() )
{
case IDENT :
{
AST tmp84_AST_in = (AST) _t;
match( _t,
IDENT );
_t = _t.getNextSibling();
break;
}
case 3 :
{
break;
}
default :
{
throw new NoViableAltException( _t );
}
}
}
_t = __t439;
_t = _t.getNextSibling();
break;
}
case LITERAL_continue :
{
AST __t441 = _t;
AST tmp85_AST_in = (AST) _t;
match( _t,
LITERAL_continue );
_t = _t.getFirstChild();
{
if ( _t == null ) _t = ASTNULL;
switch ( _t.getType() )
{
case IDENT :
{
AST tmp86_AST_in = (AST) _t;
match( _t,
IDENT );
_t = _t.getNextSibling();
break;
}
case 3 :
{
break;
}
default :
{
throw new NoViableAltException( _t );
}
}
}
_t = __t441;
_t = _t.getNextSibling();
break;
}
case LITERAL_return :
{
AST __t443 = _t;
AST tmp87_AST_in = (AST) _t;
match( _t,
LITERAL_return );
_t = _t.getFirstChild();
{
if ( _t == null ) _t = ASTNULL;
switch ( _t.getType() )
{
case EXPR :
{
expression( _t );
_t = _retTree;
break;
}
case 3 :
{
break;
}
default :
{
throw new NoViableAltException( _t );
}
}
}
_t = __t443;
_t = _t.getNextSibling();
break;
}
case LITERAL_switch :
{
AST __t445 = _t;
AST tmp88_AST_in = (AST) _t;
match( _t,
LITERAL_switch );
_t = _t.getFirstChild();
expression( _t );
_t = _retTree;
{
_loop447 : do
{
if ( _t == null ) _t = ASTNULL;
if ( (_t.getType() == CASE_GROUP) )
{
caseGroup( _t );
_t = _retTree;
}
else
{
break _loop447;
}
}
while ( true );
}
_t = __t445;
_t = _t.getNextSibling();
break;
}
case LITERAL_throw :
{
AST __t448 = _t;
AST tmp89_AST_in = (AST) _t;
match( _t,
LITERAL_throw );
_t = _t.getFirstChild();
expression( _t );
_t = _retTree;
_t = __t448;
_t = _t.getNextSibling();
break;
}
case LITERAL_synchronized :
{
AST __t449 = _t;
AST tmp90_AST_in = (AST) _t;
match( _t,
LITERAL_synchronized );
_t = _t.getFirstChild();
expression( _t );
_t = _retTree;
stat( _t );
_t = _retTree;
_t = __t449;
_t = _t.getNextSibling();
break;
}
case LITERAL_try :
{
tryBlock( _t );
_t = _retTree;
break;
}
case SLIST :
{
slist( _t );
_t = _retTree;
break;
}
case EMPTY_STAT :
{
AST tmp91_AST_in = (AST) _t;
match( _t,
EMPTY_STAT );
_t = _t.getNextSibling();
break;
}