public final void enumBlock() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST enumBlock_AST = null;
Token first = LT(1);
match(LCURLY);
nls();
{
boolean synPredMatched136 = false;
if (((LA(1)==IDENT||LA(1)==AT) && (_tokenSet_50.member(LA(2))))) {
int _m136 = mark();
synPredMatched136 = true;
inputState.guessing++;
try {
{
enumConstantsStart();
}
}
catch (RecognitionException pe) {
synPredMatched136 = false;
}
rewind(_m136);
inputState.guessing--;
}
if ( synPredMatched136 ) {
enumConstants();
astFactory.addASTChild(currentAST, returnAST);
}
else if ((_tokenSet_51.member(LA(1))) && (_tokenSet_52.member(LA(2)))) {
{
switch ( LA(1)) {
case FINAL:
case ABSTRACT:
case STRICTFP:
case LITERAL_static:
case LITERAL_def:
case IDENT:
case LITERAL_class:
case LITERAL_interface:
case LITERAL_enum:
case AT:
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:
{
classField();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case RCURLY:
case SEMI:
case NLS:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
{
_loop140:
do {
if ((LA(1)==SEMI||LA(1)==NLS)) {
sep();
{
switch ( LA(1)) {
case FINAL:
case ABSTRACT:
case STRICTFP:
case LITERAL_static:
case LITERAL_def:
case IDENT:
case LITERAL_class:
case LITERAL_interface:
case LITERAL_enum:
case AT:
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:
{
classField();
astFactory.addASTChild(currentAST, returnAST);
break;
}
case RCURLY:
case SEMI:
case NLS:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
}
else {
break _loop140;
}
} while (true);
}
match(RCURLY);
if ( inputState.guessing==0 ) {
enumBlock_AST = (AST)currentAST.root;
enumBlock_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(OBJBLOCK,"OBJBLOCK",first,LT(1))).add(enumBlock_AST));
currentAST.root = enumBlock_AST;
currentAST.child = enumBlock_AST!=null &&enumBlock_AST.getFirstChild()!=null ?
enumBlock_AST.getFirstChild() : enumBlock_AST;
currentAST.advanceChildToEnd();
}
enumBlock_AST = (AST)currentAST.root;
returnAST = enumBlock_AST;
}