}
public final void enumConstantField() throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST enumConstantField_AST = null;
AST mods_AST = null;
AST td_AST = null;
AST tp_AST = null;
AST t_AST = null;
AST param_AST = null;
AST tc_AST = null;
AST s2_AST = null;
AST v_AST = null;
AST s4_AST = null;
Token first = LT(1);
switch ( LA(1)) {
case FINAL:
case ABSTRACT:
case STRICTFP:
case LITERAL_static:
case LITERAL_def:
case IDENT:
case LT:
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:
{
modifiersOpt();
mods_AST = (AST)returnAST;
{
switch ( LA(1)) {
case LITERAL_class:
case LITERAL_interface:
case LITERAL_enum:
case AT:
{
typeDefinitionInternal(mods_AST);
td_AST = (AST)returnAST;
if ( inputState.guessing==0 ) {
enumConstantField_AST = (AST)currentAST.root;
enumConstantField_AST = td_AST;
currentAST.root = enumConstantField_AST;
currentAST.child = enumConstantField_AST!=null &&enumConstantField_AST.getFirstChild()!=null ?
enumConstantField_AST.getFirstChild() : enumConstantField_AST;
currentAST.advanceChildToEnd();
}
break;
}
case IDENT:
case LT:
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:
{
{
switch ( LA(1)) {
case LT:
{
typeParameters();
tp_AST = (AST)returnAST;
break;
}
case IDENT:
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:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
typeSpec(false);
t_AST = (AST)returnAST;
{
boolean synPredMatched175 = false;
if (((LA(1)==IDENT) && (LA(2)==LPAREN))) {
int _m175 = mark();
synPredMatched175 = true;
inputState.guessing++;
try {
{
match(IDENT);
match(LPAREN);
}
}
catch (RecognitionException pe) {
synPredMatched175 = false;
}
rewind(_m175);
inputState.guessing--;
}
if ( synPredMatched175 ) {
AST tmp174_AST = null;
tmp174_AST = astFactory.create(LT(1));
match(IDENT);
match(LPAREN);
parameterDeclarationList();
param_AST = (AST)returnAST;
match(RPAREN);
{
boolean synPredMatched178 = false;
if (((LA(1)==LITERAL_throws||LA(1)==NLS) && (_tokenSet_28.member(LA(2))))) {
int _m178 = mark();
synPredMatched178 = true;
inputState.guessing++;
try {
{
nls();
match(LITERAL_throws);
}
}
catch (RecognitionException pe) {
synPredMatched178 = false;
}
rewind(_m178);
inputState.guessing--;
}
if ( synPredMatched178 ) {
throwsClause();
tc_AST = (AST)returnAST;
}
else if ((_tokenSet_63.member(LA(1))) && (_tokenSet_64.member(LA(2)))) {
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
{
switch ( LA(1)) {
case LCURLY:
{
compoundStatement();
s2_AST = (AST)returnAST;
break;
}
case RCURLY:
case SEMI:
case NLS:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
if ( inputState.guessing==0 ) {
enumConstantField_AST = (AST)currentAST.root;
enumConstantField_AST = (AST)astFactory.make( (new ASTArray(8)).add(create(METHOD_DEF,"METHOD_DEF",first,LT(1))).add(mods_AST).add(tp_AST).add((AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(t_AST))).add(tmp174_AST).add(param_AST).add(tc_AST).add(s2_AST));
currentAST.root = enumConstantField_AST;
currentAST.child = enumConstantField_AST!=null &&enumConstantField_AST.getFirstChild()!=null ?
enumConstantField_AST.getFirstChild() : enumConstantField_AST;
currentAST.advanceChildToEnd();
}
}
else if ((LA(1)==IDENT||LA(1)==STRING_LITERAL) && (_tokenSet_57.member(LA(2)))) {
variableDefinitions(mods_AST,t_AST);
v_AST = (AST)returnAST;
if ( inputState.guessing==0 ) {
enumConstantField_AST = (AST)currentAST.root;
enumConstantField_AST = v_AST;
currentAST.root = enumConstantField_AST;
currentAST.child = enumConstantField_AST!=null &&enumConstantField_AST.getFirstChild()!=null ?
enumConstantField_AST.getFirstChild() : enumConstantField_AST;
currentAST.advanceChildToEnd();
}
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
break;
}
case LCURLY:
{
compoundStatement();
s4_AST = (AST)returnAST;
if ( inputState.guessing==0 ) {
enumConstantField_AST = (AST)currentAST.root;
enumConstantField_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(INSTANCE_INIT,"INSTANCE_INIT",first,LT(1))).add(s4_AST));
currentAST.root = enumConstantField_AST;
currentAST.child = enumConstantField_AST!=null &&enumConstantField_AST.getFirstChild()!=null ?
enumConstantField_AST.getFirstChild() : enumConstantField_AST;
currentAST.advanceChildToEnd();
}
break;
}
default:
{