use of org.antlr.runtime.NoViableAltException in project freud by LMAX-Exchange.
the class JavaParser method qualifiedIdentExpression.
// $ANTLR start "qualifiedIdentExpression"
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1104:1: qualifiedIdentExpression : ( qualifiedIdentifier -> qualifiedIdentifier ) ( ( arrayDeclarator -> ^( arrayDeclarator $qualifiedIdentExpression) )+ ( DOT CLASS -> ^( DOT $qualifiedIdentExpression CLASS ) ) | arguments -> ^( METHOD_CALL qualifiedIdentifier arguments ) | outerDot= DOT ( CLASS -> ^( DOT qualifiedIdentifier CLASS ) | genericTypeArgumentListSimplified (Super= SUPER arguments -> ^( SUPER_CONSTRUCTOR_CALL[$Super, \"SUPER_CONSTRUCTOR_CALL\"] qualifiedIdentifier genericTypeArgumentListSimplified arguments ) | SUPER innerDot= DOT IDENT arguments -> ^( METHOD_CALL ^( $innerDot ^( $outerDot qualifiedIdentifier SUPER ) IDENT ) genericTypeArgumentListSimplified arguments ) | IDENT arguments -> ^( METHOD_CALL ^( DOT qualifiedIdentifier IDENT ) genericTypeArgumentListSimplified arguments ) ) | THIS -> ^( DOT qualifiedIdentifier THIS ) | Super= SUPER arguments -> ^( SUPER_CONSTRUCTOR_CALL[$Super, \"SUPER_CONSTRUCTOR_CALL\"] qualifiedIdentifier arguments ) | innerNewExpression -> ^( DOT qualifiedIdentifier innerNewExpression ) ) )? ;
public final JavaParser.qualifiedIdentExpression_return qualifiedIdentExpression() throws RecognitionException {
JavaParser.qualifiedIdentExpression_return retval = new JavaParser.qualifiedIdentExpression_return();
retval.start = input.LT(1);
int qualifiedIdentExpression_StartIndex = input.index();
CommonTree root_0 = null;
Token outerDot = null;
Token Super = null;
Token innerDot = null;
Token DOT495 = null;
Token CLASS496 = null;
Token CLASS498 = null;
Token SUPER501 = null;
Token IDENT502 = null;
Token IDENT504 = null;
Token THIS506 = null;
JavaParser.qualifiedIdentifier_return qualifiedIdentifier493 = null;
JavaParser.arrayDeclarator_return arrayDeclarator494 = null;
JavaParser.arguments_return arguments497 = null;
JavaParser.genericTypeArgumentListSimplified_return genericTypeArgumentListSimplified499 = null;
JavaParser.arguments_return arguments500 = null;
JavaParser.arguments_return arguments503 = null;
JavaParser.arguments_return arguments505 = null;
JavaParser.arguments_return arguments507 = null;
JavaParser.innerNewExpression_return innerNewExpression508 = null;
CommonTree outerDot_tree = null;
CommonTree Super_tree = null;
CommonTree innerDot_tree = null;
CommonTree DOT495_tree = null;
CommonTree CLASS496_tree = null;
CommonTree CLASS498_tree = null;
CommonTree SUPER501_tree = null;
CommonTree IDENT502_tree = null;
CommonTree IDENT504_tree = null;
CommonTree THIS506_tree = null;
RewriteRuleTokenStream stream_IDENT = new RewriteRuleTokenStream(adaptor, "token IDENT");
RewriteRuleTokenStream stream_CLASS = new RewriteRuleTokenStream(adaptor, "token CLASS");
RewriteRuleTokenStream stream_SUPER = new RewriteRuleTokenStream(adaptor, "token SUPER");
RewriteRuleTokenStream stream_DOT = new RewriteRuleTokenStream(adaptor, "token DOT");
RewriteRuleTokenStream stream_THIS = new RewriteRuleTokenStream(adaptor, "token THIS");
RewriteRuleSubtreeStream stream_arrayDeclarator = new RewriteRuleSubtreeStream(adaptor, "rule arrayDeclarator");
RewriteRuleSubtreeStream stream_arguments = new RewriteRuleSubtreeStream(adaptor, "rule arguments");
RewriteRuleSubtreeStream stream_qualifiedIdentifier = new RewriteRuleSubtreeStream(adaptor, "rule qualifiedIdentifier");
RewriteRuleSubtreeStream stream_genericTypeArgumentListSimplified = new RewriteRuleSubtreeStream(adaptor, "rule genericTypeArgumentListSimplified");
RewriteRuleSubtreeStream stream_innerNewExpression = new RewriteRuleSubtreeStream(adaptor, "rule innerNewExpression");
try {
if (state.backtracking > 0 && alreadyParsedRule(input, 106)) {
return retval;
}
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1106:5: ( ( qualifiedIdentifier -> qualifiedIdentifier ) ( ( arrayDeclarator -> ^( arrayDeclarator $qualifiedIdentExpression) )+ ( DOT CLASS -> ^( DOT $qualifiedIdentExpression CLASS ) ) | arguments -> ^( METHOD_CALL qualifiedIdentifier arguments ) | outerDot= DOT ( CLASS -> ^( DOT qualifiedIdentifier CLASS ) | genericTypeArgumentListSimplified (Super= SUPER arguments -> ^( SUPER_CONSTRUCTOR_CALL[$Super, \"SUPER_CONSTRUCTOR_CALL\"] qualifiedIdentifier genericTypeArgumentListSimplified arguments ) | SUPER innerDot= DOT IDENT arguments -> ^( METHOD_CALL ^( $innerDot ^( $outerDot qualifiedIdentifier SUPER ) IDENT ) genericTypeArgumentListSimplified arguments ) | IDENT arguments -> ^( METHOD_CALL ^( DOT qualifiedIdentifier IDENT ) genericTypeArgumentListSimplified arguments ) ) | THIS -> ^( DOT qualifiedIdentifier THIS ) | Super= SUPER arguments -> ^( SUPER_CONSTRUCTOR_CALL[$Super, \"SUPER_CONSTRUCTOR_CALL\"] qualifiedIdentifier arguments ) | innerNewExpression -> ^( DOT qualifiedIdentifier innerNewExpression ) ) )? )
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1106:9: ( qualifiedIdentifier -> qualifiedIdentifier ) ( ( arrayDeclarator -> ^( arrayDeclarator $qualifiedIdentExpression) )+ ( DOT CLASS -> ^( DOT $qualifiedIdentExpression CLASS ) ) | arguments -> ^( METHOD_CALL qualifiedIdentifier arguments ) | outerDot= DOT ( CLASS -> ^( DOT qualifiedIdentifier CLASS ) | genericTypeArgumentListSimplified (Super= SUPER arguments -> ^( SUPER_CONSTRUCTOR_CALL[$Super, \"SUPER_CONSTRUCTOR_CALL\"] qualifiedIdentifier genericTypeArgumentListSimplified arguments ) | SUPER innerDot= DOT IDENT arguments -> ^( METHOD_CALL ^( $innerDot ^( $outerDot qualifiedIdentifier SUPER ) IDENT ) genericTypeArgumentListSimplified arguments ) | IDENT arguments -> ^( METHOD_CALL ^( DOT qualifiedIdentifier IDENT ) genericTypeArgumentListSimplified arguments ) ) | THIS -> ^( DOT qualifiedIdentifier THIS ) | Super= SUPER arguments -> ^( SUPER_CONSTRUCTOR_CALL[$Super, \"SUPER_CONSTRUCTOR_CALL\"] qualifiedIdentifier arguments ) | innerNewExpression -> ^( DOT qualifiedIdentifier innerNewExpression ) ) )?
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1106:9: ( qualifiedIdentifier -> qualifiedIdentifier )
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1106:13: qualifiedIdentifier
{
pushFollow(FOLLOW_qualifiedIdentifier_in_qualifiedIdentExpression13286);
qualifiedIdentifier493 = qualifiedIdentifier();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_qualifiedIdentifier.add(qualifiedIdentifier493.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1106:61: -> qualifiedIdentifier
{
adaptor.addChild(root_0, stream_qualifiedIdentifier.nextTree());
}
retval.tree = root_0;
}
}
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1109:9: ( ( arrayDeclarator -> ^( arrayDeclarator $qualifiedIdentExpression) )+ ( DOT CLASS -> ^( DOT $qualifiedIdentExpression CLASS ) ) | arguments -> ^( METHOD_CALL qualifiedIdentifier arguments ) | outerDot= DOT ( CLASS -> ^( DOT qualifiedIdentifier CLASS ) | genericTypeArgumentListSimplified (Super= SUPER arguments -> ^( SUPER_CONSTRUCTOR_CALL[$Super, \"SUPER_CONSTRUCTOR_CALL\"] qualifiedIdentifier genericTypeArgumentListSimplified arguments ) | SUPER innerDot= DOT IDENT arguments -> ^( METHOD_CALL ^( $innerDot ^( $outerDot qualifiedIdentifier SUPER ) IDENT ) genericTypeArgumentListSimplified arguments ) | IDENT arguments -> ^( METHOD_CALL ^( DOT qualifiedIdentifier IDENT ) genericTypeArgumentListSimplified arguments ) ) | THIS -> ^( DOT qualifiedIdentifier THIS ) | Super= SUPER arguments -> ^( SUPER_CONSTRUCTOR_CALL[$Super, \"SUPER_CONSTRUCTOR_CALL\"] qualifiedIdentifier arguments ) | innerNewExpression -> ^( DOT qualifiedIdentifier innerNewExpression ) ) )?
int alt144 = 4;
alt144 = dfa144.predict(input);
switch(alt144) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1109:13: ( arrayDeclarator -> ^( arrayDeclarator $qualifiedIdentExpression) )+ ( DOT CLASS -> ^( DOT $qualifiedIdentExpression CLASS ) )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1109:13: ( arrayDeclarator -> ^( arrayDeclarator $qualifiedIdentExpression) )+
int cnt141 = 0;
loop141: do {
int alt141 = 2;
int LA141_0 = input.LA(1);
if ((LA141_0 == LBRACK)) {
alt141 = 1;
}
switch(alt141) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1109:17: arrayDeclarator
{
pushFollow(FOLLOW_arrayDeclarator_in_qualifiedIdentExpression13356);
arrayDeclarator494 = arrayDeclarator();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_arrayDeclarator.add(arrayDeclarator494.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1109:57: -> ^( arrayDeclarator $qualifiedIdentExpression)
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1109:61: ^( arrayDeclarator $qualifiedIdentExpression)
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot(stream_arrayDeclarator.nextNode(), root_1);
adaptor.addChild(root_1, stream_retval.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
default:
if (cnt141 >= 1) {
break loop141;
}
if (state.backtracking > 0) {
state.failed = true;
return retval;
}
EarlyExitException eee = new EarlyExitException(141, input);
throw eee;
}
cnt141++;
} while (true);
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1111:13: ( DOT CLASS -> ^( DOT $qualifiedIdentExpression CLASS ) )
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1111:17: DOT CLASS
{
DOT495 = (Token) match(input, DOT, FOLLOW_DOT_in_qualifiedIdentExpression13423);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_DOT.add(DOT495);
}
CLASS496 = (Token) match(input, CLASS, FOLLOW_CLASS_in_qualifiedIdentExpression13425);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_CLASS.add(CLASS496);
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1111:57: -> ^( DOT $qualifiedIdentExpression CLASS )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1111:61: ^( DOT $qualifiedIdentExpression CLASS )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot(stream_DOT.nextNode(), root_1);
adaptor.addChild(root_1, stream_retval.nextTree());
adaptor.addChild(root_1, stream_CLASS.nextNode());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
}
break;
case 2:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1113:13: arguments
{
pushFollow(FOLLOW_arguments_in_qualifiedIdentExpression13495);
arguments497 = arguments();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_arguments.add(arguments497.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1113:57: -> ^( METHOD_CALL qualifiedIdentifier arguments )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1113:61: ^( METHOD_CALL qualifiedIdentifier arguments )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot((CommonTree) adaptor.create(METHOD_CALL, "METHOD_CALL"), root_1);
adaptor.addChild(root_1, stream_qualifiedIdentifier.nextTree());
adaptor.addChild(root_1, stream_arguments.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 3:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1114:13: outerDot= DOT ( CLASS -> ^( DOT qualifiedIdentifier CLASS ) | genericTypeArgumentListSimplified (Super= SUPER arguments -> ^( SUPER_CONSTRUCTOR_CALL[$Super, \"SUPER_CONSTRUCTOR_CALL\"] qualifiedIdentifier genericTypeArgumentListSimplified arguments ) | SUPER innerDot= DOT IDENT arguments -> ^( METHOD_CALL ^( $innerDot ^( $outerDot qualifiedIdentifier SUPER ) IDENT ) genericTypeArgumentListSimplified arguments ) | IDENT arguments -> ^( METHOD_CALL ^( DOT qualifiedIdentifier IDENT ) genericTypeArgumentListSimplified arguments ) ) | THIS -> ^( DOT qualifiedIdentifier THIS ) | Super= SUPER arguments -> ^( SUPER_CONSTRUCTOR_CALL[$Super, \"SUPER_CONSTRUCTOR_CALL\"] qualifiedIdentifier arguments ) | innerNewExpression -> ^( DOT qualifiedIdentifier innerNewExpression ) )
{
outerDot = (Token) match(input, DOT, FOLLOW_DOT_in_qualifiedIdentExpression13556);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_DOT.add(outerDot);
}
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1115:13: ( CLASS -> ^( DOT qualifiedIdentifier CLASS ) | genericTypeArgumentListSimplified (Super= SUPER arguments -> ^( SUPER_CONSTRUCTOR_CALL[$Super, \"SUPER_CONSTRUCTOR_CALL\"] qualifiedIdentifier genericTypeArgumentListSimplified arguments ) | SUPER innerDot= DOT IDENT arguments -> ^( METHOD_CALL ^( $innerDot ^( $outerDot qualifiedIdentifier SUPER ) IDENT ) genericTypeArgumentListSimplified arguments ) | IDENT arguments -> ^( METHOD_CALL ^( DOT qualifiedIdentifier IDENT ) genericTypeArgumentListSimplified arguments ) ) | THIS -> ^( DOT qualifiedIdentifier THIS ) | Super= SUPER arguments -> ^( SUPER_CONSTRUCTOR_CALL[$Super, \"SUPER_CONSTRUCTOR_CALL\"] qualifiedIdentifier arguments ) | innerNewExpression -> ^( DOT qualifiedIdentifier innerNewExpression ) )
int alt143 = 5;
switch(input.LA(1)) {
case CLASS:
{
alt143 = 1;
}
break;
case LESS_THAN:
{
alt143 = 2;
}
break;
case THIS:
{
alt143 = 3;
}
break;
case SUPER:
{
alt143 = 4;
}
break;
case NEW:
{
alt143 = 5;
}
break;
default:
if (state.backtracking > 0) {
state.failed = true;
return retval;
}
NoViableAltException nvae = new NoViableAltException("", 143, 0, input);
throw nvae;
}
switch(alt143) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1115:17: CLASS
{
CLASS498 = (Token) match(input, CLASS, FOLLOW_CLASS_in_qualifiedIdentExpression13574);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_CLASS.add(CLASS498);
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1115:57: -> ^( DOT qualifiedIdentifier CLASS )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1115:61: ^( DOT qualifiedIdentifier CLASS )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot(stream_DOT.nextNode(), root_1);
adaptor.addChild(root_1, stream_qualifiedIdentifier.nextTree());
adaptor.addChild(root_1, stream_CLASS.nextNode());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 2:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1116:17: genericTypeArgumentListSimplified (Super= SUPER arguments -> ^( SUPER_CONSTRUCTOR_CALL[$Super, \"SUPER_CONSTRUCTOR_CALL\"] qualifiedIdentifier genericTypeArgumentListSimplified arguments ) | SUPER innerDot= DOT IDENT arguments -> ^( METHOD_CALL ^( $innerDot ^( $outerDot qualifiedIdentifier SUPER ) IDENT ) genericTypeArgumentListSimplified arguments ) | IDENT arguments -> ^( METHOD_CALL ^( DOT qualifiedIdentifier IDENT ) genericTypeArgumentListSimplified arguments ) )
{
pushFollow(FOLLOW_genericTypeArgumentListSimplified_in_qualifiedIdentExpression13637);
genericTypeArgumentListSimplified499 = genericTypeArgumentListSimplified();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_genericTypeArgumentListSimplified.add(genericTypeArgumentListSimplified499.getTree());
}
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1117:17: (Super= SUPER arguments -> ^( SUPER_CONSTRUCTOR_CALL[$Super, \"SUPER_CONSTRUCTOR_CALL\"] qualifiedIdentifier genericTypeArgumentListSimplified arguments ) | SUPER innerDot= DOT IDENT arguments -> ^( METHOD_CALL ^( $innerDot ^( $outerDot qualifiedIdentifier SUPER ) IDENT ) genericTypeArgumentListSimplified arguments ) | IDENT arguments -> ^( METHOD_CALL ^( DOT qualifiedIdentifier IDENT ) genericTypeArgumentListSimplified arguments ) )
int alt142 = 3;
int LA142_0 = input.LA(1);
if ((LA142_0 == SUPER)) {
int LA142_1 = input.LA(2);
if ((LA142_1 == DOT)) {
alt142 = 2;
} else if ((LA142_1 == LPAREN)) {
alt142 = 1;
} else {
if (state.backtracking > 0) {
state.failed = true;
return retval;
}
NoViableAltException nvae = new NoViableAltException("", 142, 1, input);
throw nvae;
}
} else if ((LA142_0 == IDENT)) {
alt142 = 3;
} else {
if (state.backtracking > 0) {
state.failed = true;
return retval;
}
NoViableAltException nvae = new NoViableAltException("", 142, 0, input);
throw nvae;
}
switch(alt142) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1117:21: Super= SUPER arguments
{
Super = (Token) match(input, SUPER, FOLLOW_SUPER_in_qualifiedIdentExpression13661);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_SUPER.add(Super);
}
pushFollow(FOLLOW_arguments_in_qualifiedIdentExpression13663);
arguments500 = arguments();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_arguments.add(arguments500.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1117:57: -> ^( SUPER_CONSTRUCTOR_CALL[$Super, \"SUPER_CONSTRUCTOR_CALL\"] qualifiedIdentifier genericTypeArgumentListSimplified arguments )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1117:61: ^( SUPER_CONSTRUCTOR_CALL[$Super, \"SUPER_CONSTRUCTOR_CALL\"] qualifiedIdentifier genericTypeArgumentListSimplified arguments )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot((CommonTree) adaptor.create(SUPER_CONSTRUCTOR_CALL, Super, "SUPER_CONSTRUCTOR_CALL"), root_1);
adaptor.addChild(root_1, stream_qualifiedIdentifier.nextTree());
adaptor.addChild(root_1, stream_genericTypeArgumentListSimplified.nextTree());
adaptor.addChild(root_1, stream_arguments.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 2:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1118:21: SUPER innerDot= DOT IDENT arguments
{
SUPER501 = (Token) match(input, SUPER, FOLLOW_SUPER_in_qualifiedIdentExpression13713);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_SUPER.add(SUPER501);
}
innerDot = (Token) match(input, DOT, FOLLOW_DOT_in_qualifiedIdentExpression13717);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_DOT.add(innerDot);
}
IDENT502 = (Token) match(input, IDENT, FOLLOW_IDENT_in_qualifiedIdentExpression13719);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_IDENT.add(IDENT502);
}
pushFollow(FOLLOW_arguments_in_qualifiedIdentExpression13721);
arguments503 = arguments();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_arguments.add(arguments503.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleTokenStream stream_outerDot = new RewriteRuleTokenStream(adaptor, "token outerDot", outerDot);
RewriteRuleTokenStream stream_innerDot = new RewriteRuleTokenStream(adaptor, "token innerDot", innerDot);
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1118:57: -> ^( METHOD_CALL ^( $innerDot ^( $outerDot qualifiedIdentifier SUPER ) IDENT ) genericTypeArgumentListSimplified arguments )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1118:61: ^( METHOD_CALL ^( $innerDot ^( $outerDot qualifiedIdentifier SUPER ) IDENT ) genericTypeArgumentListSimplified arguments )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot((CommonTree) adaptor.create(METHOD_CALL, "METHOD_CALL"), root_1);
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1118:75: ^( $innerDot ^( $outerDot qualifiedIdentifier SUPER ) IDENT )
{
CommonTree root_2 = (CommonTree) adaptor.nil();
root_2 = (CommonTree) adaptor.becomeRoot(stream_innerDot.nextNode(), root_2);
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1118:87: ^( $outerDot qualifiedIdentifier SUPER )
{
CommonTree root_3 = (CommonTree) adaptor.nil();
root_3 = (CommonTree) adaptor.becomeRoot(stream_outerDot.nextNode(), root_3);
adaptor.addChild(root_3, stream_qualifiedIdentifier.nextTree());
adaptor.addChild(root_3, stream_SUPER.nextNode());
adaptor.addChild(root_2, root_3);
}
adaptor.addChild(root_2, stream_IDENT.nextNode());
adaptor.addChild(root_1, root_2);
}
adaptor.addChild(root_1, stream_genericTypeArgumentListSimplified.nextTree());
adaptor.addChild(root_1, stream_arguments.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 3:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1119:21: IDENT arguments
{
IDENT504 = (Token) match(input, IDENT, FOLLOW_IDENT_in_qualifiedIdentExpression13771);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_IDENT.add(IDENT504);
}
pushFollow(FOLLOW_arguments_in_qualifiedIdentExpression13773);
arguments505 = arguments();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_arguments.add(arguments505.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1119:57: -> ^( METHOD_CALL ^( DOT qualifiedIdentifier IDENT ) genericTypeArgumentListSimplified arguments )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1119:61: ^( METHOD_CALL ^( DOT qualifiedIdentifier IDENT ) genericTypeArgumentListSimplified arguments )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot((CommonTree) adaptor.create(METHOD_CALL, "METHOD_CALL"), root_1);
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1119:75: ^( DOT qualifiedIdentifier IDENT )
{
CommonTree root_2 = (CommonTree) adaptor.nil();
root_2 = (CommonTree) adaptor.becomeRoot(stream_DOT.nextNode(), root_2);
adaptor.addChild(root_2, stream_qualifiedIdentifier.nextTree());
adaptor.addChild(root_2, stream_IDENT.nextNode());
adaptor.addChild(root_1, root_2);
}
adaptor.addChild(root_1, stream_genericTypeArgumentListSimplified.nextTree());
adaptor.addChild(root_1, stream_arguments.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
}
}
break;
case 3:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1121:17: THIS
{
THIS506 = (Token) match(input, THIS, FOLLOW_THIS_in_qualifiedIdentExpression13848);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_THIS.add(THIS506);
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1121:57: -> ^( DOT qualifiedIdentifier THIS )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1121:61: ^( DOT qualifiedIdentifier THIS )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot(stream_DOT.nextNode(), root_1);
adaptor.addChild(root_1, stream_qualifiedIdentifier.nextTree());
adaptor.addChild(root_1, stream_THIS.nextNode());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 4:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1122:17: Super= SUPER arguments
{
Super = (Token) match(input, SUPER, FOLLOW_SUPER_in_qualifiedIdentExpression13914);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_SUPER.add(Super);
}
pushFollow(FOLLOW_arguments_in_qualifiedIdentExpression13916);
arguments507 = arguments();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_arguments.add(arguments507.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1122:57: -> ^( SUPER_CONSTRUCTOR_CALL[$Super, \"SUPER_CONSTRUCTOR_CALL\"] qualifiedIdentifier arguments )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1122:61: ^( SUPER_CONSTRUCTOR_CALL[$Super, \"SUPER_CONSTRUCTOR_CALL\"] qualifiedIdentifier arguments )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot((CommonTree) adaptor.create(SUPER_CONSTRUCTOR_CALL, Super, "SUPER_CONSTRUCTOR_CALL"), root_1);
adaptor.addChild(root_1, stream_qualifiedIdentifier.nextTree());
adaptor.addChild(root_1, stream_arguments.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 5:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1123:17: innerNewExpression
{
pushFollow(FOLLOW_innerNewExpression_in_qualifiedIdentExpression13964);
innerNewExpression508 = innerNewExpression();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_innerNewExpression.add(innerNewExpression508.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1123:57: -> ^( DOT qualifiedIdentifier innerNewExpression )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1123:61: ^( DOT qualifiedIdentifier innerNewExpression )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot(stream_DOT.nextNode(), root_1);
adaptor.addChild(root_1, stream_qualifiedIdentifier.nextTree());
adaptor.addChild(root_1, stream_innerNewExpression.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
}
}
break;
}
}
retval.stop = input.LT(-1);
if (state.backtracking == 0) {
retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
} catch (RecognitionException re) {
reportError(re);
recover(input, re);
retval.tree = (CommonTree) adaptor.errorNode(input, retval.start, input.LT(-1), re);
} finally {
if (state.backtracking > 0) {
memoize(input, 106, qualifiedIdentExpression_StartIndex);
}
}
return retval;
}
use of org.antlr.runtime.NoViableAltException in project freud by LMAX-Exchange.
the class JavaParser method assignmentExpression.
// $ANTLR start "assignmentExpression"
// /home/langera/dev/freud/trunk/src/grammar/Java.g:934:1: assignmentExpression : conditionalExpression ( ( ASSIGN | PLUS_ASSIGN | MINUS_ASSIGN | STAR_ASSIGN | DIV_ASSIGN | AND_ASSIGN | OR_ASSIGN | XOR_ASSIGN | MOD_ASSIGN | SHIFT_LEFT_ASSIGN | SHIFT_RIGHT_ASSIGN | BIT_SHIFT_RIGHT_ASSIGN ) assignmentExpression )? ;
public final JavaParser.assignmentExpression_return assignmentExpression() throws RecognitionException {
JavaParser.assignmentExpression_return retval = new JavaParser.assignmentExpression_return();
retval.start = input.LT(1);
int assignmentExpression_StartIndex = input.index();
CommonTree root_0 = null;
Token ASSIGN367 = null;
Token PLUS_ASSIGN368 = null;
Token MINUS_ASSIGN369 = null;
Token STAR_ASSIGN370 = null;
Token DIV_ASSIGN371 = null;
Token AND_ASSIGN372 = null;
Token OR_ASSIGN373 = null;
Token XOR_ASSIGN374 = null;
Token MOD_ASSIGN375 = null;
Token SHIFT_LEFT_ASSIGN376 = null;
Token SHIFT_RIGHT_ASSIGN377 = null;
Token BIT_SHIFT_RIGHT_ASSIGN378 = null;
JavaParser.conditionalExpression_return conditionalExpression366 = null;
JavaParser.assignmentExpression_return assignmentExpression379 = null;
CommonTree ASSIGN367_tree = null;
CommonTree PLUS_ASSIGN368_tree = null;
CommonTree MINUS_ASSIGN369_tree = null;
CommonTree STAR_ASSIGN370_tree = null;
CommonTree DIV_ASSIGN371_tree = null;
CommonTree AND_ASSIGN372_tree = null;
CommonTree OR_ASSIGN373_tree = null;
CommonTree XOR_ASSIGN374_tree = null;
CommonTree MOD_ASSIGN375_tree = null;
CommonTree SHIFT_LEFT_ASSIGN376_tree = null;
CommonTree SHIFT_RIGHT_ASSIGN377_tree = null;
CommonTree BIT_SHIFT_RIGHT_ASSIGN378_tree = null;
try {
if (state.backtracking > 0 && alreadyParsedRule(input, 89)) {
return retval;
}
// /home/langera/dev/freud/trunk/src/grammar/Java.g:935:5: ( conditionalExpression ( ( ASSIGN | PLUS_ASSIGN | MINUS_ASSIGN | STAR_ASSIGN | DIV_ASSIGN | AND_ASSIGN | OR_ASSIGN | XOR_ASSIGN | MOD_ASSIGN | SHIFT_LEFT_ASSIGN | SHIFT_RIGHT_ASSIGN | BIT_SHIFT_RIGHT_ASSIGN ) assignmentExpression )? )
// /home/langera/dev/freud/trunk/src/grammar/Java.g:935:9: conditionalExpression ( ( ASSIGN | PLUS_ASSIGN | MINUS_ASSIGN | STAR_ASSIGN | DIV_ASSIGN | AND_ASSIGN | OR_ASSIGN | XOR_ASSIGN | MOD_ASSIGN | SHIFT_LEFT_ASSIGN | SHIFT_RIGHT_ASSIGN | BIT_SHIFT_RIGHT_ASSIGN ) assignmentExpression )?
{
root_0 = (CommonTree) adaptor.nil();
pushFollow(FOLLOW_conditionalExpression_in_assignmentExpression10252);
conditionalExpression366 = conditionalExpression();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
adaptor.addChild(root_0, conditionalExpression366.getTree());
}
// /home/langera/dev/freud/trunk/src/grammar/Java.g:936:9: ( ( ASSIGN | PLUS_ASSIGN | MINUS_ASSIGN | STAR_ASSIGN | DIV_ASSIGN | AND_ASSIGN | OR_ASSIGN | XOR_ASSIGN | MOD_ASSIGN | SHIFT_LEFT_ASSIGN | SHIFT_RIGHT_ASSIGN | BIT_SHIFT_RIGHT_ASSIGN ) assignmentExpression )?
int alt109 = 2;
int LA109_0 = input.LA(1);
if (((LA109_0 >= AND_ASSIGN && LA109_0 <= ASSIGN) || LA109_0 == BIT_SHIFT_RIGHT_ASSIGN || LA109_0 == DIV_ASSIGN || LA109_0 == MINUS_ASSIGN || LA109_0 == MOD_ASSIGN || LA109_0 == OR_ASSIGN || LA109_0 == PLUS_ASSIGN || LA109_0 == SHIFT_LEFT_ASSIGN || LA109_0 == SHIFT_RIGHT_ASSIGN || LA109_0 == STAR_ASSIGN || LA109_0 == XOR_ASSIGN)) {
alt109 = 1;
}
switch(alt109) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:936:13: ( ASSIGN | PLUS_ASSIGN | MINUS_ASSIGN | STAR_ASSIGN | DIV_ASSIGN | AND_ASSIGN | OR_ASSIGN | XOR_ASSIGN | MOD_ASSIGN | SHIFT_LEFT_ASSIGN | SHIFT_RIGHT_ASSIGN | BIT_SHIFT_RIGHT_ASSIGN ) assignmentExpression
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:936:13: ( ASSIGN | PLUS_ASSIGN | MINUS_ASSIGN | STAR_ASSIGN | DIV_ASSIGN | AND_ASSIGN | OR_ASSIGN | XOR_ASSIGN | MOD_ASSIGN | SHIFT_LEFT_ASSIGN | SHIFT_RIGHT_ASSIGN | BIT_SHIFT_RIGHT_ASSIGN )
int alt108 = 12;
switch(input.LA(1)) {
case ASSIGN:
{
alt108 = 1;
}
break;
case PLUS_ASSIGN:
{
alt108 = 2;
}
break;
case MINUS_ASSIGN:
{
alt108 = 3;
}
break;
case STAR_ASSIGN:
{
alt108 = 4;
}
break;
case DIV_ASSIGN:
{
alt108 = 5;
}
break;
case AND_ASSIGN:
{
alt108 = 6;
}
break;
case OR_ASSIGN:
{
alt108 = 7;
}
break;
case XOR_ASSIGN:
{
alt108 = 8;
}
break;
case MOD_ASSIGN:
{
alt108 = 9;
}
break;
case SHIFT_LEFT_ASSIGN:
{
alt108 = 10;
}
break;
case SHIFT_RIGHT_ASSIGN:
{
alt108 = 11;
}
break;
case BIT_SHIFT_RIGHT_ASSIGN:
{
alt108 = 12;
}
break;
default:
if (state.backtracking > 0) {
state.failed = true;
return retval;
}
NoViableAltException nvae = new NoViableAltException("", 108, 0, input);
throw nvae;
}
switch(alt108) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:936:17: ASSIGN
{
ASSIGN367 = (Token) match(input, ASSIGN, FOLLOW_ASSIGN_in_assignmentExpression10270);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
ASSIGN367_tree = (CommonTree) adaptor.create(ASSIGN367);
root_0 = (CommonTree) adaptor.becomeRoot(ASSIGN367_tree, root_0);
}
}
break;
case 2:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:937:17: PLUS_ASSIGN
{
PLUS_ASSIGN368 = (Token) match(input, PLUS_ASSIGN, FOLLOW_PLUS_ASSIGN_in_assignmentExpression10289);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
PLUS_ASSIGN368_tree = (CommonTree) adaptor.create(PLUS_ASSIGN368);
root_0 = (CommonTree) adaptor.becomeRoot(PLUS_ASSIGN368_tree, root_0);
}
}
break;
case 3:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:938:17: MINUS_ASSIGN
{
MINUS_ASSIGN369 = (Token) match(input, MINUS_ASSIGN, FOLLOW_MINUS_ASSIGN_in_assignmentExpression10308);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
MINUS_ASSIGN369_tree = (CommonTree) adaptor.create(MINUS_ASSIGN369);
root_0 = (CommonTree) adaptor.becomeRoot(MINUS_ASSIGN369_tree, root_0);
}
}
break;
case 4:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:939:17: STAR_ASSIGN
{
STAR_ASSIGN370 = (Token) match(input, STAR_ASSIGN, FOLLOW_STAR_ASSIGN_in_assignmentExpression10327);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
STAR_ASSIGN370_tree = (CommonTree) adaptor.create(STAR_ASSIGN370);
root_0 = (CommonTree) adaptor.becomeRoot(STAR_ASSIGN370_tree, root_0);
}
}
break;
case 5:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:940:17: DIV_ASSIGN
{
DIV_ASSIGN371 = (Token) match(input, DIV_ASSIGN, FOLLOW_DIV_ASSIGN_in_assignmentExpression10346);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
DIV_ASSIGN371_tree = (CommonTree) adaptor.create(DIV_ASSIGN371);
root_0 = (CommonTree) adaptor.becomeRoot(DIV_ASSIGN371_tree, root_0);
}
}
break;
case 6:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:941:17: AND_ASSIGN
{
AND_ASSIGN372 = (Token) match(input, AND_ASSIGN, FOLLOW_AND_ASSIGN_in_assignmentExpression10365);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
AND_ASSIGN372_tree = (CommonTree) adaptor.create(AND_ASSIGN372);
root_0 = (CommonTree) adaptor.becomeRoot(AND_ASSIGN372_tree, root_0);
}
}
break;
case 7:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:942:17: OR_ASSIGN
{
OR_ASSIGN373 = (Token) match(input, OR_ASSIGN, FOLLOW_OR_ASSIGN_in_assignmentExpression10384);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
OR_ASSIGN373_tree = (CommonTree) adaptor.create(OR_ASSIGN373);
root_0 = (CommonTree) adaptor.becomeRoot(OR_ASSIGN373_tree, root_0);
}
}
break;
case 8:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:943:17: XOR_ASSIGN
{
XOR_ASSIGN374 = (Token) match(input, XOR_ASSIGN, FOLLOW_XOR_ASSIGN_in_assignmentExpression10403);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
XOR_ASSIGN374_tree = (CommonTree) adaptor.create(XOR_ASSIGN374);
root_0 = (CommonTree) adaptor.becomeRoot(XOR_ASSIGN374_tree, root_0);
}
}
break;
case 9:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:944:17: MOD_ASSIGN
{
MOD_ASSIGN375 = (Token) match(input, MOD_ASSIGN, FOLLOW_MOD_ASSIGN_in_assignmentExpression10422);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
MOD_ASSIGN375_tree = (CommonTree) adaptor.create(MOD_ASSIGN375);
root_0 = (CommonTree) adaptor.becomeRoot(MOD_ASSIGN375_tree, root_0);
}
}
break;
case 10:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:945:17: SHIFT_LEFT_ASSIGN
{
SHIFT_LEFT_ASSIGN376 = (Token) match(input, SHIFT_LEFT_ASSIGN, FOLLOW_SHIFT_LEFT_ASSIGN_in_assignmentExpression10441);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
SHIFT_LEFT_ASSIGN376_tree = (CommonTree) adaptor.create(SHIFT_LEFT_ASSIGN376);
root_0 = (CommonTree) adaptor.becomeRoot(SHIFT_LEFT_ASSIGN376_tree, root_0);
}
}
break;
case 11:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:946:17: SHIFT_RIGHT_ASSIGN
{
SHIFT_RIGHT_ASSIGN377 = (Token) match(input, SHIFT_RIGHT_ASSIGN, FOLLOW_SHIFT_RIGHT_ASSIGN_in_assignmentExpression10460);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
SHIFT_RIGHT_ASSIGN377_tree = (CommonTree) adaptor.create(SHIFT_RIGHT_ASSIGN377);
root_0 = (CommonTree) adaptor.becomeRoot(SHIFT_RIGHT_ASSIGN377_tree, root_0);
}
}
break;
case 12:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:947:17: BIT_SHIFT_RIGHT_ASSIGN
{
BIT_SHIFT_RIGHT_ASSIGN378 = (Token) match(input, BIT_SHIFT_RIGHT_ASSIGN, FOLLOW_BIT_SHIFT_RIGHT_ASSIGN_in_assignmentExpression10479);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
BIT_SHIFT_RIGHT_ASSIGN378_tree = (CommonTree) adaptor.create(BIT_SHIFT_RIGHT_ASSIGN378);
root_0 = (CommonTree) adaptor.becomeRoot(BIT_SHIFT_RIGHT_ASSIGN378_tree, root_0);
}
}
break;
}
pushFollow(FOLLOW_assignmentExpression_in_assignmentExpression10500);
assignmentExpression379 = assignmentExpression();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
adaptor.addChild(root_0, assignmentExpression379.getTree());
}
}
break;
}
}
retval.stop = input.LT(-1);
if (state.backtracking == 0) {
retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
} catch (RecognitionException re) {
reportError(re);
recover(input, re);
retval.tree = (CommonTree) adaptor.errorNode(input, retval.start, input.LT(-1), re);
} finally {
if (state.backtracking > 0) {
memoize(input, 89, assignmentExpression_StartIndex);
}
}
return retval;
}
use of org.antlr.runtime.NoViableAltException in project freud by LMAX-Exchange.
the class JavaParser method unaryExpressionAll.
// $ANTLR start "unaryExpressionAll"
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1029:1: unaryExpressionAll : ( PLUS unaryExpressionAll -> ^( UNARY_PLUS[$PLUS, \"UNARY_PLUS\"] unaryExpressionAll ) | MINUS unaryExpressionAll -> ^( UNARY_MINUS[$MINUS, \"UNARY_MINUS\"] unaryExpressionAll ) | INC postfixedExpression -> ^( PRE_INC[$INC, \"PRE_INC\"] postfixedExpression ) | DEC postfixedExpression -> ^( PRE_DEC[$DEC, \"PRE_DEC\"] postfixedExpression ) | unaryExpressionRest );
public final JavaParser.unaryExpressionAll_return unaryExpressionAll() throws RecognitionException {
JavaParser.unaryExpressionAll_return retval = new JavaParser.unaryExpressionAll_return();
retval.start = input.LT(1);
int unaryExpressionAll_StartIndex = input.index();
CommonTree root_0 = null;
Token PLUS427 = null;
Token MINUS429 = null;
Token INC431 = null;
Token DEC433 = null;
JavaParser.unaryExpressionAll_return unaryExpressionAll428 = null;
JavaParser.unaryExpressionAll_return unaryExpressionAll430 = null;
JavaParser.postfixedExpression_return postfixedExpression432 = null;
JavaParser.postfixedExpression_return postfixedExpression434 = null;
JavaParser.unaryExpressionRest_return unaryExpressionRest435 = null;
CommonTree PLUS427_tree = null;
CommonTree MINUS429_tree = null;
CommonTree INC431_tree = null;
CommonTree DEC433_tree = null;
RewriteRuleTokenStream stream_DEC = new RewriteRuleTokenStream(adaptor, "token DEC");
RewriteRuleTokenStream stream_INC = new RewriteRuleTokenStream(adaptor, "token INC");
RewriteRuleTokenStream stream_PLUS = new RewriteRuleTokenStream(adaptor, "token PLUS");
RewriteRuleTokenStream stream_MINUS = new RewriteRuleTokenStream(adaptor, "token MINUS");
RewriteRuleSubtreeStream stream_postfixedExpression = new RewriteRuleSubtreeStream(adaptor, "rule postfixedExpression");
RewriteRuleSubtreeStream stream_unaryExpressionAll = new RewriteRuleSubtreeStream(adaptor, "rule unaryExpressionAll");
try {
if (state.backtracking > 0 && alreadyParsedRule(input, 102)) {
return retval;
}
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1030:5: ( PLUS unaryExpressionAll -> ^( UNARY_PLUS[$PLUS, \"UNARY_PLUS\"] unaryExpressionAll ) | MINUS unaryExpressionAll -> ^( UNARY_MINUS[$MINUS, \"UNARY_MINUS\"] unaryExpressionAll ) | INC postfixedExpression -> ^( PRE_INC[$INC, \"PRE_INC\"] postfixedExpression ) | DEC postfixedExpression -> ^( PRE_DEC[$DEC, \"PRE_DEC\"] postfixedExpression ) | unaryExpressionRest )
int alt127 = 5;
switch(input.LA(1)) {
case PLUS:
{
alt127 = 1;
}
break;
case MINUS:
{
alt127 = 2;
}
break;
case INC:
{
alt127 = 3;
}
break;
case DEC:
{
alt127 = 4;
}
break;
case LESS_THAN:
case LOGICAL_NOT:
case LPAREN:
case NOT:
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case IDENT:
case HEX_LITERAL:
case OCTAL_LITERAL:
case DECIMAL_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
{
alt127 = 5;
}
break;
default:
if (state.backtracking > 0) {
state.failed = true;
return retval;
}
NoViableAltException nvae = new NoViableAltException("", 127, 0, input);
throw nvae;
}
switch(alt127) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1030:9: PLUS unaryExpressionAll
{
PLUS427 = (Token) match(input, PLUS, FOLLOW_PLUS_in_unaryExpressionAll11271);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_PLUS.add(PLUS427);
}
pushFollow(FOLLOW_unaryExpressionAll_in_unaryExpressionAll11273);
unaryExpressionAll428 = unaryExpressionAll();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_unaryExpressionAll.add(unaryExpressionAll428.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1030:37: -> ^( UNARY_PLUS[$PLUS, \"UNARY_PLUS\"] unaryExpressionAll )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1030:41: ^( UNARY_PLUS[$PLUS, \"UNARY_PLUS\"] unaryExpressionAll )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot((CommonTree) adaptor.create(UNARY_PLUS, PLUS427, "UNARY_PLUS"), root_1);
adaptor.addChild(root_1, stream_unaryExpressionAll.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 2:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1031:9: MINUS unaryExpressionAll
{
MINUS429 = (Token) match(input, MINUS, FOLLOW_MINUS_in_unaryExpressionAll11297);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_MINUS.add(MINUS429);
}
pushFollow(FOLLOW_unaryExpressionAll_in_unaryExpressionAll11299);
unaryExpressionAll430 = unaryExpressionAll();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_unaryExpressionAll.add(unaryExpressionAll430.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1031:37: -> ^( UNARY_MINUS[$MINUS, \"UNARY_MINUS\"] unaryExpressionAll )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1031:41: ^( UNARY_MINUS[$MINUS, \"UNARY_MINUS\"] unaryExpressionAll )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot((CommonTree) adaptor.create(UNARY_MINUS, MINUS429, "UNARY_MINUS"), root_1);
adaptor.addChild(root_1, stream_unaryExpressionAll.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 3:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1032:9: INC postfixedExpression
{
INC431 = (Token) match(input, INC, FOLLOW_INC_in_unaryExpressionAll11322);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_INC.add(INC431);
}
pushFollow(FOLLOW_postfixedExpression_in_unaryExpressionAll11324);
postfixedExpression432 = postfixedExpression();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_postfixedExpression.add(postfixedExpression432.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1032:37: -> ^( PRE_INC[$INC, \"PRE_INC\"] postfixedExpression )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1032:41: ^( PRE_INC[$INC, \"PRE_INC\"] postfixedExpression )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot((CommonTree) adaptor.create(PRE_INC, INC431, "PRE_INC"), root_1);
adaptor.addChild(root_1, stream_postfixedExpression.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 4:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1033:9: DEC postfixedExpression
{
DEC433 = (Token) match(input, DEC, FOLLOW_DEC_in_unaryExpressionAll11348);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_DEC.add(DEC433);
}
pushFollow(FOLLOW_postfixedExpression_in_unaryExpressionAll11350);
postfixedExpression434 = postfixedExpression();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_postfixedExpression.add(postfixedExpression434.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1033:37: -> ^( PRE_DEC[$DEC, \"PRE_DEC\"] postfixedExpression )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1033:41: ^( PRE_DEC[$DEC, \"PRE_DEC\"] postfixedExpression )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot((CommonTree) adaptor.create(PRE_DEC, DEC433, "PRE_DEC"), root_1);
adaptor.addChild(root_1, stream_postfixedExpression.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 5:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1034:9: unaryExpressionRest
{
root_0 = (CommonTree) adaptor.nil();
pushFollow(FOLLOW_unaryExpressionRest_in_unaryExpressionAll11374);
unaryExpressionRest435 = unaryExpressionRest();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
adaptor.addChild(root_0, unaryExpressionRest435.getTree());
}
}
break;
}
retval.stop = input.LT(-1);
if (state.backtracking == 0) {
retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
} catch (RecognitionException re) {
reportError(re);
recover(input, re);
retval.tree = (CommonTree) adaptor.errorNode(input, retval.start, input.LT(-1), re);
} finally {
if (state.backtracking > 0) {
memoize(input, 102, unaryExpressionAll_StartIndex);
}
}
return retval;
}
use of org.antlr.runtime.NoViableAltException in project freud by LMAX-Exchange.
the class JavaParser method primaryExpression.
// $ANTLR start "primaryExpression"
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1073:1: primaryExpression : ( parenthesizedExpression | literal | newExpression | qualifiedIdentExpression | genericTypeArgumentListSimplified ( SUPER ( arguments -> ^( SUPER_CONSTRUCTOR_CALL[$SUPER, \"SUPER_CONSTRUCTOR_CALL\"] genericTypeArgumentListSimplified arguments ) | DOT IDENT arguments -> ^( METHOD_CALL ^( DOT SUPER IDENT ) genericTypeArgumentListSimplified arguments ) ) | IDENT arguments -> ^( METHOD_CALL IDENT genericTypeArgumentListSimplified arguments ) | THIS arguments -> ^( THIS_CONSTRUCTOR_CALL[$THIS, \"THIS_CONSTRUCTOR_CALL\"] genericTypeArgumentListSimplified arguments ) ) | ( THIS -> THIS ) ( arguments -> ^( THIS_CONSTRUCTOR_CALL[$THIS, \"THIS_CONSTRUCTOR_CALL\"] arguments ) )? | SUPER arguments -> ^( SUPER_CONSTRUCTOR_CALL[$SUPER, \"SUPER_CONSTRUCTOR_CALL\"] arguments ) | ( SUPER DOT IDENT ) ( arguments -> ^( METHOD_CALL ^( DOT SUPER IDENT ) arguments ) | -> ^( DOT SUPER IDENT ) ) | ( primitiveType -> primitiveType ) ( arrayDeclarator -> ^( arrayDeclarator $primaryExpression) )* DOT CLASS -> ^( DOT $primaryExpression CLASS ) | VOID DOT CLASS -> ^( DOT VOID CLASS ) );
public final JavaParser.primaryExpression_return primaryExpression() throws RecognitionException {
JavaParser.primaryExpression_return retval = new JavaParser.primaryExpression_return();
retval.start = input.LT(1);
int primaryExpression_StartIndex = input.index();
CommonTree root_0 = null;
Token SUPER469 = null;
Token DOT471 = null;
Token IDENT472 = null;
Token IDENT474 = null;
Token THIS476 = null;
Token THIS478 = null;
Token SUPER480 = null;
Token SUPER482 = null;
Token DOT483 = null;
Token IDENT484 = null;
Token DOT488 = null;
Token CLASS489 = null;
Token VOID490 = null;
Token DOT491 = null;
Token CLASS492 = null;
JavaParser.parenthesizedExpression_return parenthesizedExpression464 = null;
JavaParser.literal_return literal465 = null;
JavaParser.newExpression_return newExpression466 = null;
JavaParser.qualifiedIdentExpression_return qualifiedIdentExpression467 = null;
JavaParser.genericTypeArgumentListSimplified_return genericTypeArgumentListSimplified468 = null;
JavaParser.arguments_return arguments470 = null;
JavaParser.arguments_return arguments473 = null;
JavaParser.arguments_return arguments475 = null;
JavaParser.arguments_return arguments477 = null;
JavaParser.arguments_return arguments479 = null;
JavaParser.arguments_return arguments481 = null;
JavaParser.arguments_return arguments485 = null;
JavaParser.primitiveType_return primitiveType486 = null;
JavaParser.arrayDeclarator_return arrayDeclarator487 = null;
CommonTree SUPER469_tree = null;
CommonTree DOT471_tree = null;
CommonTree IDENT472_tree = null;
CommonTree IDENT474_tree = null;
CommonTree THIS476_tree = null;
CommonTree THIS478_tree = null;
CommonTree SUPER480_tree = null;
CommonTree SUPER482_tree = null;
CommonTree DOT483_tree = null;
CommonTree IDENT484_tree = null;
CommonTree DOT488_tree = null;
CommonTree CLASS489_tree = null;
CommonTree VOID490_tree = null;
CommonTree DOT491_tree = null;
CommonTree CLASS492_tree = null;
RewriteRuleTokenStream stream_IDENT = new RewriteRuleTokenStream(adaptor, "token IDENT");
RewriteRuleTokenStream stream_CLASS = new RewriteRuleTokenStream(adaptor, "token CLASS");
RewriteRuleTokenStream stream_VOID = new RewriteRuleTokenStream(adaptor, "token VOID");
RewriteRuleTokenStream stream_SUPER = new RewriteRuleTokenStream(adaptor, "token SUPER");
RewriteRuleTokenStream stream_DOT = new RewriteRuleTokenStream(adaptor, "token DOT");
RewriteRuleTokenStream stream_THIS = new RewriteRuleTokenStream(adaptor, "token THIS");
RewriteRuleSubtreeStream stream_arrayDeclarator = new RewriteRuleSubtreeStream(adaptor, "rule arrayDeclarator");
RewriteRuleSubtreeStream stream_arguments = new RewriteRuleSubtreeStream(adaptor, "rule arguments");
RewriteRuleSubtreeStream stream_primitiveType = new RewriteRuleSubtreeStream(adaptor, "rule primitiveType");
RewriteRuleSubtreeStream stream_genericTypeArgumentListSimplified = new RewriteRuleSubtreeStream(adaptor, "rule genericTypeArgumentListSimplified");
try {
if (state.backtracking > 0 && alreadyParsedRule(input, 105)) {
return retval;
}
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1074:5: ( parenthesizedExpression | literal | newExpression | qualifiedIdentExpression | genericTypeArgumentListSimplified ( SUPER ( arguments -> ^( SUPER_CONSTRUCTOR_CALL[$SUPER, \"SUPER_CONSTRUCTOR_CALL\"] genericTypeArgumentListSimplified arguments ) | DOT IDENT arguments -> ^( METHOD_CALL ^( DOT SUPER IDENT ) genericTypeArgumentListSimplified arguments ) ) | IDENT arguments -> ^( METHOD_CALL IDENT genericTypeArgumentListSimplified arguments ) | THIS arguments -> ^( THIS_CONSTRUCTOR_CALL[$THIS, \"THIS_CONSTRUCTOR_CALL\"] genericTypeArgumentListSimplified arguments ) ) | ( THIS -> THIS ) ( arguments -> ^( THIS_CONSTRUCTOR_CALL[$THIS, \"THIS_CONSTRUCTOR_CALL\"] arguments ) )? | SUPER arguments -> ^( SUPER_CONSTRUCTOR_CALL[$SUPER, \"SUPER_CONSTRUCTOR_CALL\"] arguments ) | ( SUPER DOT IDENT ) ( arguments -> ^( METHOD_CALL ^( DOT SUPER IDENT ) arguments ) | -> ^( DOT SUPER IDENT ) ) | ( primitiveType -> primitiveType ) ( arrayDeclarator -> ^( arrayDeclarator $primaryExpression) )* DOT CLASS -> ^( DOT $primaryExpression CLASS ) | VOID DOT CLASS -> ^( DOT VOID CLASS ) )
int alt140 = 10;
alt140 = dfa140.predict(input);
switch(alt140) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1074:9: parenthesizedExpression
{
root_0 = (CommonTree) adaptor.nil();
pushFollow(FOLLOW_parenthesizedExpression_in_primaryExpression12338);
parenthesizedExpression464 = parenthesizedExpression();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
adaptor.addChild(root_0, parenthesizedExpression464.getTree());
}
}
break;
case 2:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1075:9: literal
{
root_0 = (CommonTree) adaptor.nil();
pushFollow(FOLLOW_literal_in_primaryExpression12348);
literal465 = literal();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
adaptor.addChild(root_0, literal465.getTree());
}
}
break;
case 3:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1076:9: newExpression
{
root_0 = (CommonTree) adaptor.nil();
pushFollow(FOLLOW_newExpression_in_primaryExpression12358);
newExpression466 = newExpression();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
adaptor.addChild(root_0, newExpression466.getTree());
}
}
break;
case 4:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1077:9: qualifiedIdentExpression
{
root_0 = (CommonTree) adaptor.nil();
pushFollow(FOLLOW_qualifiedIdentExpression_in_primaryExpression12368);
qualifiedIdentExpression467 = qualifiedIdentExpression();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
adaptor.addChild(root_0, qualifiedIdentExpression467.getTree());
}
}
break;
case 5:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1078:9: genericTypeArgumentListSimplified ( SUPER ( arguments -> ^( SUPER_CONSTRUCTOR_CALL[$SUPER, \"SUPER_CONSTRUCTOR_CALL\"] genericTypeArgumentListSimplified arguments ) | DOT IDENT arguments -> ^( METHOD_CALL ^( DOT SUPER IDENT ) genericTypeArgumentListSimplified arguments ) ) | IDENT arguments -> ^( METHOD_CALL IDENT genericTypeArgumentListSimplified arguments ) | THIS arguments -> ^( THIS_CONSTRUCTOR_CALL[$THIS, \"THIS_CONSTRUCTOR_CALL\"] genericTypeArgumentListSimplified arguments ) )
{
pushFollow(FOLLOW_genericTypeArgumentListSimplified_in_primaryExpression12378);
genericTypeArgumentListSimplified468 = genericTypeArgumentListSimplified();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_genericTypeArgumentListSimplified.add(genericTypeArgumentListSimplified468.getTree());
}
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1079:9: ( SUPER ( arguments -> ^( SUPER_CONSTRUCTOR_CALL[$SUPER, \"SUPER_CONSTRUCTOR_CALL\"] genericTypeArgumentListSimplified arguments ) | DOT IDENT arguments -> ^( METHOD_CALL ^( DOT SUPER IDENT ) genericTypeArgumentListSimplified arguments ) ) | IDENT arguments -> ^( METHOD_CALL IDENT genericTypeArgumentListSimplified arguments ) | THIS arguments -> ^( THIS_CONSTRUCTOR_CALL[$THIS, \"THIS_CONSTRUCTOR_CALL\"] genericTypeArgumentListSimplified arguments ) )
int alt136 = 3;
switch(input.LA(1)) {
case SUPER:
{
alt136 = 1;
}
break;
case IDENT:
{
alt136 = 2;
}
break;
case THIS:
{
alt136 = 3;
}
break;
default:
if (state.backtracking > 0) {
state.failed = true;
return retval;
}
NoViableAltException nvae = new NoViableAltException("", 136, 0, input);
throw nvae;
}
switch(alt136) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1079:13: SUPER ( arguments -> ^( SUPER_CONSTRUCTOR_CALL[$SUPER, \"SUPER_CONSTRUCTOR_CALL\"] genericTypeArgumentListSimplified arguments ) | DOT IDENT arguments -> ^( METHOD_CALL ^( DOT SUPER IDENT ) genericTypeArgumentListSimplified arguments ) )
{
SUPER469 = (Token) match(input, SUPER, FOLLOW_SUPER_in_primaryExpression12392);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_SUPER.add(SUPER469);
}
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1080:13: ( arguments -> ^( SUPER_CONSTRUCTOR_CALL[$SUPER, \"SUPER_CONSTRUCTOR_CALL\"] genericTypeArgumentListSimplified arguments ) | DOT IDENT arguments -> ^( METHOD_CALL ^( DOT SUPER IDENT ) genericTypeArgumentListSimplified arguments ) )
int alt135 = 2;
int LA135_0 = input.LA(1);
if ((LA135_0 == LPAREN)) {
alt135 = 1;
} else if ((LA135_0 == DOT)) {
alt135 = 2;
} else {
if (state.backtracking > 0) {
state.failed = true;
return retval;
}
NoViableAltException nvae = new NoViableAltException("", 135, 0, input);
throw nvae;
}
switch(alt135) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1080:17: arguments
{
pushFollow(FOLLOW_arguments_in_primaryExpression12410);
arguments470 = arguments();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_arguments.add(arguments470.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1080:57: -> ^( SUPER_CONSTRUCTOR_CALL[$SUPER, \"SUPER_CONSTRUCTOR_CALL\"] genericTypeArgumentListSimplified arguments )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1080:61: ^( SUPER_CONSTRUCTOR_CALL[$SUPER, \"SUPER_CONSTRUCTOR_CALL\"] genericTypeArgumentListSimplified arguments )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot((CommonTree) adaptor.create(SUPER_CONSTRUCTOR_CALL, SUPER469, "SUPER_CONSTRUCTOR_CALL"), root_1);
adaptor.addChild(root_1, stream_genericTypeArgumentListSimplified.nextTree());
adaptor.addChild(root_1, stream_arguments.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 2:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1081:17: DOT IDENT arguments
{
DOT471 = (Token) match(input, DOT, FOLLOW_DOT_in_primaryExpression12470);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_DOT.add(DOT471);
}
IDENT472 = (Token) match(input, IDENT, FOLLOW_IDENT_in_primaryExpression12472);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_IDENT.add(IDENT472);
}
pushFollow(FOLLOW_arguments_in_primaryExpression12474);
arguments473 = arguments();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_arguments.add(arguments473.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1081:57: -> ^( METHOD_CALL ^( DOT SUPER IDENT ) genericTypeArgumentListSimplified arguments )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1081:61: ^( METHOD_CALL ^( DOT SUPER IDENT ) genericTypeArgumentListSimplified arguments )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot((CommonTree) adaptor.create(METHOD_CALL, "METHOD_CALL"), root_1);
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1081:75: ^( DOT SUPER IDENT )
{
CommonTree root_2 = (CommonTree) adaptor.nil();
root_2 = (CommonTree) adaptor.becomeRoot(stream_DOT.nextNode(), root_2);
adaptor.addChild(root_2, stream_SUPER.nextNode());
adaptor.addChild(root_2, stream_IDENT.nextNode());
adaptor.addChild(root_1, root_2);
}
adaptor.addChild(root_1, stream_genericTypeArgumentListSimplified.nextTree());
adaptor.addChild(root_1, stream_arguments.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
}
}
break;
case 2:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1083:13: IDENT arguments
{
IDENT474 = (Token) match(input, IDENT, FOLLOW_IDENT_in_primaryExpression12541);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_IDENT.add(IDENT474);
}
pushFollow(FOLLOW_arguments_in_primaryExpression12543);
arguments475 = arguments();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_arguments.add(arguments475.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1083:57: -> ^( METHOD_CALL IDENT genericTypeArgumentListSimplified arguments )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1083:61: ^( METHOD_CALL IDENT genericTypeArgumentListSimplified arguments )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot((CommonTree) adaptor.create(METHOD_CALL, "METHOD_CALL"), root_1);
adaptor.addChild(root_1, stream_IDENT.nextNode());
adaptor.addChild(root_1, stream_genericTypeArgumentListSimplified.nextTree());
adaptor.addChild(root_1, stream_arguments.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 3:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1084:13: THIS arguments
{
THIS476 = (Token) match(input, THIS, FOLLOW_THIS_in_primaryExpression12598);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_THIS.add(THIS476);
}
pushFollow(FOLLOW_arguments_in_primaryExpression12600);
arguments477 = arguments();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_arguments.add(arguments477.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1084:57: -> ^( THIS_CONSTRUCTOR_CALL[$THIS, \"THIS_CONSTRUCTOR_CALL\"] genericTypeArgumentListSimplified arguments )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1084:61: ^( THIS_CONSTRUCTOR_CALL[$THIS, \"THIS_CONSTRUCTOR_CALL\"] genericTypeArgumentListSimplified arguments )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot((CommonTree) adaptor.create(THIS_CONSTRUCTOR_CALL, THIS476, "THIS_CONSTRUCTOR_CALL"), root_1);
adaptor.addChild(root_1, stream_genericTypeArgumentListSimplified.nextTree());
adaptor.addChild(root_1, stream_arguments.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
}
}
break;
case 6:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1086:9: ( THIS -> THIS ) ( arguments -> ^( THIS_CONSTRUCTOR_CALL[$THIS, \"THIS_CONSTRUCTOR_CALL\"] arguments ) )?
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1086:9: ( THIS -> THIS )
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1086:13: THIS
{
THIS478 = (Token) match(input, THIS, FOLLOW_THIS_in_primaryExpression12665);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_THIS.add(THIS478);
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1086:57: -> THIS
{
adaptor.addChild(root_0, stream_THIS.nextNode());
}
retval.tree = root_0;
}
}
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1088:9: ( arguments -> ^( THIS_CONSTRUCTOR_CALL[$THIS, \"THIS_CONSTRUCTOR_CALL\"] arguments ) )?
int alt137 = 2;
int LA137_0 = input.LA(1);
if ((LA137_0 == LPAREN)) {
alt137 = 1;
}
switch(alt137) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1088:13: arguments
{
pushFollow(FOLLOW_arguments_in_primaryExpression12733);
arguments479 = arguments();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_arguments.add(arguments479.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1088:57: -> ^( THIS_CONSTRUCTOR_CALL[$THIS, \"THIS_CONSTRUCTOR_CALL\"] arguments )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1088:61: ^( THIS_CONSTRUCTOR_CALL[$THIS, \"THIS_CONSTRUCTOR_CALL\"] arguments )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot((CommonTree) adaptor.create(THIS_CONSTRUCTOR_CALL, THIS478, "THIS_CONSTRUCTOR_CALL"), root_1);
adaptor.addChild(root_1, stream_arguments.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
}
}
break;
case 7:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1090:9: SUPER arguments
{
SUPER480 = (Token) match(input, SUPER, FOLLOW_SUPER_in_primaryExpression12798);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_SUPER.add(SUPER480);
}
pushFollow(FOLLOW_arguments_in_primaryExpression12800);
arguments481 = arguments();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_arguments.add(arguments481.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1090:57: -> ^( SUPER_CONSTRUCTOR_CALL[$SUPER, \"SUPER_CONSTRUCTOR_CALL\"] arguments )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1090:61: ^( SUPER_CONSTRUCTOR_CALL[$SUPER, \"SUPER_CONSTRUCTOR_CALL\"] arguments )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot((CommonTree) adaptor.create(SUPER_CONSTRUCTOR_CALL, SUPER480, "SUPER_CONSTRUCTOR_CALL"), root_1);
adaptor.addChild(root_1, stream_arguments.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 8:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1091:9: ( SUPER DOT IDENT ) ( arguments -> ^( METHOD_CALL ^( DOT SUPER IDENT ) arguments ) | -> ^( DOT SUPER IDENT ) )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1091:9: ( SUPER DOT IDENT )
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1091:13: SUPER DOT IDENT
{
SUPER482 = (Token) match(input, SUPER, FOLLOW_SUPER_in_primaryExpression12856);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_SUPER.add(SUPER482);
}
DOT483 = (Token) match(input, DOT, FOLLOW_DOT_in_primaryExpression12858);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_DOT.add(DOT483);
}
IDENT484 = (Token) match(input, IDENT, FOLLOW_IDENT_in_primaryExpression12860);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_IDENT.add(IDENT484);
}
}
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1093:9: ( arguments -> ^( METHOD_CALL ^( DOT SUPER IDENT ) arguments ) | -> ^( DOT SUPER IDENT ) )
int alt138 = 2;
int LA138_0 = input.LA(1);
if ((LA138_0 == LPAREN)) {
alt138 = 1;
} else if ((LA138_0 == EOF || (LA138_0 >= AND && LA138_0 <= ASSIGN) || (LA138_0 >= BIT_SHIFT_RIGHT && LA138_0 <= DOT) || (LA138_0 >= EQUAL && LA138_0 <= LBRACK) || (LA138_0 >= LESS_OR_EQUAL && LA138_0 <= LOGICAL_AND) || LA138_0 == LOGICAL_OR || (LA138_0 >= MINUS && LA138_0 <= MOD_ASSIGN) || (LA138_0 >= NOT_EQUAL && LA138_0 <= XOR_ASSIGN) || LA138_0 == INSTANCEOF)) {
alt138 = 2;
} else {
if (state.backtracking > 0) {
state.failed = true;
return retval;
}
NoViableAltException nvae = new NoViableAltException("", 138, 0, input);
throw nvae;
}
switch(alt138) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1093:13: arguments
{
pushFollow(FOLLOW_arguments_in_primaryExpression12884);
arguments485 = arguments();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_arguments.add(arguments485.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1093:57: -> ^( METHOD_CALL ^( DOT SUPER IDENT ) arguments )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1093:61: ^( METHOD_CALL ^( DOT SUPER IDENT ) arguments )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot((CommonTree) adaptor.create(METHOD_CALL, "METHOD_CALL"), root_1);
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1093:75: ^( DOT SUPER IDENT )
{
CommonTree root_2 = (CommonTree) adaptor.nil();
root_2 = (CommonTree) adaptor.becomeRoot(stream_DOT.nextNode(), root_2);
adaptor.addChild(root_2, stream_SUPER.nextNode());
adaptor.addChild(root_2, stream_IDENT.nextNode());
adaptor.addChild(root_1, root_2);
}
adaptor.addChild(root_1, stream_arguments.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 2:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1094:57:
{
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1094:57: -> ^( DOT SUPER IDENT )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1094:61: ^( DOT SUPER IDENT )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot(stream_DOT.nextNode(), root_1);
adaptor.addChild(root_1, stream_SUPER.nextNode());
adaptor.addChild(root_1, stream_IDENT.nextNode());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
}
}
break;
case 9:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1096:9: ( primitiveType -> primitiveType ) ( arrayDeclarator -> ^( arrayDeclarator $primaryExpression) )* DOT CLASS
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1096:9: ( primitiveType -> primitiveType )
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1096:13: primitiveType
{
pushFollow(FOLLOW_primitiveType_in_primaryExpression13026);
primitiveType486 = primitiveType();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_primitiveType.add(primitiveType486.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1096:57: -> primitiveType
{
adaptor.addChild(root_0, stream_primitiveType.nextTree());
}
retval.tree = root_0;
}
}
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1098:9: ( arrayDeclarator -> ^( arrayDeclarator $primaryExpression) )*
loop139: do {
int alt139 = 2;
int LA139_0 = input.LA(1);
if ((LA139_0 == LBRACK)) {
alt139 = 1;
}
switch(alt139) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1098:13: arrayDeclarator
{
pushFollow(FOLLOW_arrayDeclarator_in_primaryExpression13085);
arrayDeclarator487 = arrayDeclarator();
state._fsp--;
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_arrayDeclarator.add(arrayDeclarator487.getTree());
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1098:57: -> ^( arrayDeclarator $primaryExpression)
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1098:61: ^( arrayDeclarator $primaryExpression)
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot(stream_arrayDeclarator.nextNode(), root_1);
adaptor.addChild(root_1, stream_retval.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
default:
break loop139;
}
} while (true);
DOT488 = (Token) match(input, DOT, FOLLOW_DOT_in_primaryExpression13144);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_DOT.add(DOT488);
}
CLASS489 = (Token) match(input, CLASS, FOLLOW_CLASS_in_primaryExpression13146);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_CLASS.add(CLASS489);
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1100:57: -> ^( DOT $primaryExpression CLASS )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1100:61: ^( DOT $primaryExpression CLASS )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot(stream_DOT.nextNode(), root_1);
adaptor.addChild(root_1, stream_retval.nextTree());
adaptor.addChild(root_1, stream_CLASS.nextNode());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 10:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1101:9: VOID DOT CLASS
{
VOID490 = (Token) match(input, VOID, FOLLOW_VOID_in_primaryExpression13206);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_VOID.add(VOID490);
}
DOT491 = (Token) match(input, DOT, FOLLOW_DOT_in_primaryExpression13208);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_DOT.add(DOT491);
}
CLASS492 = (Token) match(input, CLASS, FOLLOW_CLASS_in_primaryExpression13210);
if (state.failed) {
return retval;
}
if (state.backtracking == 0) {
stream_CLASS.add(CLASS492);
}
// wildcard labels:
if (state.backtracking == 0) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.tree : null);
root_0 = (CommonTree) adaptor.nil();
// 1101:57: -> ^( DOT VOID CLASS )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1101:61: ^( DOT VOID CLASS )
{
CommonTree root_1 = (CommonTree) adaptor.nil();
root_1 = (CommonTree) adaptor.becomeRoot(stream_DOT.nextNode(), root_1);
adaptor.addChild(root_1, stream_VOID.nextNode());
adaptor.addChild(root_1, stream_CLASS.nextNode());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
}
retval.stop = input.LT(-1);
if (state.backtracking == 0) {
retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
} catch (RecognitionException re) {
reportError(re);
recover(input, re);
retval.tree = (CommonTree) adaptor.errorNode(input, retval.start, input.LT(-1), re);
} finally {
if (state.backtracking > 0) {
memoize(input, 105, primaryExpression_StartIndex);
}
}
return retval;
}
use of org.antlr.runtime.NoViableAltException in project freud by LMAX-Exchange.
the class JavaParser method synpred115_Java_fragment.
// $ANTLR end synpred103_Java
// $ANTLR start synpred115_Java
public final void synpred115_Java_fragment() throws RecognitionException {
// /home/langera/dev/freud/trunk/src/grammar/Java.g:810:9: ( modifierList type ( IDENT LPAREN RPAREN ( annotationDefaultValue )? SEMI | classFieldDeclaratorList SEMI ) )
// /home/langera/dev/freud/trunk/src/grammar/Java.g:810:9: modifierList type ( IDENT LPAREN RPAREN ( annotationDefaultValue )? SEMI | classFieldDeclaratorList SEMI )
{
pushFollow(FOLLOW_modifierList_in_synpred115_Java8256);
modifierList();
state._fsp--;
if (state.failed) {
return;
}
pushFollow(FOLLOW_type_in_synpred115_Java8258);
type();
state._fsp--;
if (state.failed) {
return;
}
// /home/langera/dev/freud/trunk/src/grammar/Java.g:811:9: ( IDENT LPAREN RPAREN ( annotationDefaultValue )? SEMI | classFieldDeclaratorList SEMI )
int alt198 = 2;
int LA198_0 = input.LA(1);
if ((LA198_0 == IDENT)) {
int LA198_1 = input.LA(2);
if ((LA198_1 == LPAREN)) {
alt198 = 1;
} else if ((LA198_1 == ASSIGN || LA198_1 == COMMA || LA198_1 == LBRACK || LA198_1 == SEMI)) {
alt198 = 2;
} else {
if (state.backtracking > 0) {
state.failed = true;
return;
}
NoViableAltException nvae = new NoViableAltException("", 198, 1, input);
throw nvae;
}
} else {
if (state.backtracking > 0) {
state.failed = true;
return;
}
NoViableAltException nvae = new NoViableAltException("", 198, 0, input);
throw nvae;
}
switch(alt198) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:811:13: IDENT LPAREN RPAREN ( annotationDefaultValue )? SEMI
{
match(input, IDENT, FOLLOW_IDENT_in_synpred115_Java8272);
if (state.failed) {
return;
}
match(input, LPAREN, FOLLOW_LPAREN_in_synpred115_Java8274);
if (state.failed) {
return;
}
match(input, RPAREN, FOLLOW_RPAREN_in_synpred115_Java8276);
if (state.failed) {
return;
}
// /home/langera/dev/freud/trunk/src/grammar/Java.g:811:33: ( annotationDefaultValue )?
int alt197 = 2;
int LA197_0 = input.LA(1);
if ((LA197_0 == DEFAULT)) {
alt197 = 1;
}
switch(alt197) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:0:0: annotationDefaultValue
{
pushFollow(FOLLOW_annotationDefaultValue_in_synpred115_Java8278);
annotationDefaultValue();
state._fsp--;
if (state.failed) {
return;
}
}
break;
}
match(input, SEMI, FOLLOW_SEMI_in_synpred115_Java8281);
if (state.failed) {
return;
}
}
break;
case 2:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:813:13: classFieldDeclaratorList SEMI
{
pushFollow(FOLLOW_classFieldDeclaratorList_in_synpred115_Java8323);
classFieldDeclaratorList();
state._fsp--;
if (state.failed) {
return;
}
match(input, SEMI, FOLLOW_SEMI_in_synpred115_Java8325);
if (state.failed) {
return;
}
}
break;
}
}
}
Aggregations