use of org.antlr.runtime.MismatchedSetException in project binnavi by google.
the class ConditionLexer method mCHARACTER.
// $ANTLR end "B_OR"
// $ANTLR start "B_AND"
public final void mCHARACTER() throws RecognitionException {
try {
final int _type = CHARACTER;
final int _channel = DEFAULT_TOKEN_CHANNEL;
// C:\\Dokumente und
// Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:31:11:
// ( ( 'a' .. 'z' | 'A' .. 'Z' ) )
// C:\\Dokumente und
// Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:31:14:
// ( 'a' .. 'z' | 'A' .. 'Z' )
{
if ((input.LA(1) >= 'A' && input.LA(1) <= 'Z') || (input.LA(1) >= 'a' && input.LA(1) <= 'z')) {
input.consume();
} else {
final MismatchedSetException mse = new MismatchedSetException(null, input);
recover(mse);
throw mse;
}
}
state.type = _type;
state.channel = _channel;
} finally {
}
}
use of org.antlr.runtime.MismatchedSetException in project binnavi by google.
the class ConditionLexer method mIDENTIFIER.
// $ANTLR end "MOD"
// $ANTLR start "ADD"
public final void mIDENTIFIER() throws RecognitionException {
try {
final int _type = IDENTIFIER;
final int _channel = DEFAULT_TOKEN_CHANNEL;
// C:\\Dokumente und
// Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:34:12:
// ( CHARACTER ( CHARACTER | DIGIT )+ )
// C:\\Dokumente und
// Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:34:14:
// CHARACTER ( CHARACTER | DIGIT )+
{
mCHARACTER();
// C:\\Dokumente und
// Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:34:24:
// ( CHARACTER | DIGIT )+
int cnt3 = 0;
loop3: do {
int alt3 = 2;
final int LA3_0 = input.LA(1);
if (((LA3_0 >= '0' && LA3_0 <= '9') || (LA3_0 >= 'A' && LA3_0 <= 'Z') || (LA3_0 >= 'a' && LA3_0 <= 'z'))) {
alt3 = 1;
}
switch(alt3) {
case 1:
// C:\\Dokumente und
// Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:
{
if ((input.LA(1) >= '0' && input.LA(1) <= '9') || (input.LA(1) >= 'A' && input.LA(1) <= 'Z') || (input.LA(1) >= 'a' && input.LA(1) <= 'z')) {
input.consume();
} else {
final MismatchedSetException mse = new MismatchedSetException(null, input);
recover(mse);
throw mse;
}
}
break;
default:
if (cnt3 >= 1) {
break loop3;
}
final EarlyExitException eee = new EarlyExitException(3, input);
throw eee;
}
cnt3++;
} while (true);
}
state.type = _type;
state.channel = _channel;
} finally {
}
}
use of org.antlr.runtime.MismatchedSetException in project binnavi by google.
the class ConditionParser method multExpression.
// $ANTLR start "multExpression"
// C:\\Dokumente und
// Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:88:1:
// multExpression : primaryExpression ( ( MULT | DIV | MOD ) primaryExpression )* ;
public final ConditionParser.multExpression_return multExpression() throws RecognitionException {
final ConditionParser.multExpression_return retval = new ConditionParser.multExpression_return();
retval.start = input.LT(1);
Object root_0 = null;
Token set28 = null;
ConditionParser.primaryExpression_return primaryExpression27 = null;
ConditionParser.primaryExpression_return primaryExpression29 = null;
final Object set28_tree = null;
try {
// C:\\Dokumente und
// Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:89:3:
// ( primaryExpression ( ( MULT | DIV | MOD ) primaryExpression )* )
// C:\\Dokumente und
// Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:89:5:
// primaryExpression ( ( MULT | DIV | MOD ) primaryExpression )*
{
root_0 = (Object) adaptor.nil();
pushFollow(FOLLOW_primaryExpression_in_multExpression531);
primaryExpression27 = primaryExpression();
state._fsp--;
adaptor.addChild(root_0, primaryExpression27.getTree());
// ( ( MULT | DIV | MOD ) primaryExpression )*
loop8: do {
int alt8 = 2;
final int LA8_0 = input.LA(1);
if (((LA8_0 >= MULT && LA8_0 <= MOD))) {
alt8 = 1;
}
switch(alt8) {
case 1:
// C:\\Dokumente und
// Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:89:24:
// ( MULT | DIV | MOD ) primaryExpression
{
set28 = (Token) input.LT(1);
set28 = (Token) input.LT(1);
if ((input.LA(1) >= MULT && input.LA(1) <= MOD)) {
input.consume();
root_0 = (Object) adaptor.becomeRoot((Object) adaptor.create(set28), root_0);
state.errorRecovery = false;
} else {
final MismatchedSetException mse = new MismatchedSetException(null, input);
throw mse;
}
pushFollow(FOLLOW_primaryExpression_in_multExpression543);
primaryExpression29 = primaryExpression();
state._fsp--;
adaptor.addChild(root_0, primaryExpression29.getTree());
}
break;
default:
break loop8;
}
} while (true);
}
retval.stop = input.LT(-1);
retval.tree = (Object) adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
} catch (final RecognitionException re) {
reportError(re);
recover(input, re);
retval.tree = (Object) adaptor.errorNode(input, retval.start, input.LT(-1), re);
} finally {
}
return retval;
}
use of org.antlr.runtime.MismatchedSetException in project binnavi by google.
the class ConditionParser method addExpression.
// $ANTLR start "addExpression"
// C:\\Dokumente und
// Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:84:1:
// addExpression : multExpression ( ( ADD | SUB ) multExpression )* ;
public final ConditionParser.addExpression_return addExpression() throws RecognitionException {
final ConditionParser.addExpression_return retval = new ConditionParser.addExpression_return();
retval.start = input.LT(1);
Object root_0 = null;
Token set25 = null;
ConditionParser.multExpression_return multExpression24 = null;
ConditionParser.multExpression_return multExpression26 = null;
final Object set25_tree = null;
try {
// C:\\Dokumente und
// Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:85:3:
// ( multExpression ( ( ADD | SUB ) multExpression )* )
// C:\\Dokumente und
// Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:85:5:
// multExpression ( ( ADD | SUB ) multExpression )*
{
root_0 = (Object) adaptor.nil();
pushFollow(FOLLOW_multExpression_in_addExpression504);
multExpression24 = multExpression();
state._fsp--;
adaptor.addChild(root_0, multExpression24.getTree());
// ( ( ADD | SUB ) multExpression )*
loop7: do {
int alt7 = 2;
final int LA7_0 = input.LA(1);
if (((LA7_0 >= ADD && LA7_0 <= SUB))) {
alt7 = 1;
}
switch(alt7) {
case 1:
// C:\\Dokumente und
// Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:85:21:
// ( ADD | SUB ) multExpression
{
set25 = (Token) input.LT(1);
set25 = (Token) input.LT(1);
if ((input.LA(1) >= ADD && input.LA(1) <= SUB)) {
input.consume();
root_0 = (Object) adaptor.becomeRoot((Object) adaptor.create(set25), root_0);
state.errorRecovery = false;
} else {
final MismatchedSetException mse = new MismatchedSetException(null, input);
throw mse;
}
pushFollow(FOLLOW_multExpression_in_addExpression514);
multExpression26 = multExpression();
state._fsp--;
adaptor.addChild(root_0, multExpression26.getTree());
}
break;
default:
break loop7;
}
} while (true);
}
retval.stop = input.LT(-1);
retval.tree = (Object) adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
} catch (final RecognitionException re) {
reportError(re);
recover(input, re);
retval.tree = (Object) adaptor.errorNode(input, retval.start, input.LT(-1), re);
} finally {
}
return retval;
}
use of org.antlr.runtime.MismatchedSetException in project freud by LMAX-Exchange.
the class JavaParser method literal.
// $ANTLR start "literal"
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1156:1: literal : ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | FLOATING_POINT_LITERAL | CHARACTER_LITERAL | STRING_LITERAL | TRUE | FALSE | NULL );
public final JavaParser.literal_return literal() throws RecognitionException {
JavaParser.literal_return retval = new JavaParser.literal_return();
retval.start = input.LT(1);
int literal_StartIndex = input.index();
CommonTree root_0 = null;
Token set534 = null;
CommonTree set534_tree = null;
try {
if (state.backtracking > 0 && alreadyParsedRule(input, 111)) {
return retval;
}
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1157:5: ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | FLOATING_POINT_LITERAL | CHARACTER_LITERAL | STRING_LITERAL | TRUE | FALSE | NULL )
// /home/langera/dev/freud/trunk/src/grammar/Java.g:
{
root_0 = (CommonTree) adaptor.nil();
set534 = (Token) input.LT(1);
if (input.LA(1) == FALSE || input.LA(1) == NULL || input.LA(1) == TRUE || (input.LA(1) >= HEX_LITERAL && input.LA(1) <= STRING_LITERAL)) {
input.consume();
if (state.backtracking == 0) {
adaptor.addChild(root_0, (CommonTree) adaptor.create(set534));
}
state.errorRecovery = false;
state.failed = false;
} else {
if (state.backtracking > 0) {
state.failed = true;
return retval;
}
MismatchedSetException mse = new MismatchedSetException(null, input);
throw mse;
}
}
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, 111, literal_StartIndex);
}
}
return retval;
}
Aggregations