use of org.antlr.runtime.EarlyExitException in project freud by LMAX-Exchange.
the class JavaLexer method mFLOATING_POINT_LITERAL.
// $ANTLR end "INTEGER_TYPE_SUFFIX"
// $ANTLR start "FLOATING_POINT_LITERAL"
public final void mFLOATING_POINT_LITERAL() throws RecognitionException {
try {
int _type = FLOATING_POINT_LITERAL;
int _channel = DEFAULT_TOKEN_CHANNEL;
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1183:5: ( ( '0' .. '9' )+ ( DOT ( '0' .. '9' )* ( EXPONENT )? ( FLOAT_TYPE_SUFFIX )? | EXPONENT ( FLOAT_TYPE_SUFFIX )? | FLOAT_TYPE_SUFFIX ) | DOT ( '0' .. '9' )+ ( EXPONENT )? ( FLOAT_TYPE_SUFFIX )? )
int alt17 = 2;
int LA17_0 = input.LA(1);
if (((LA17_0 >= '0' && LA17_0 <= '9'))) {
alt17 = 1;
} else if ((LA17_0 == '.')) {
alt17 = 2;
} else {
NoViableAltException nvae = new NoViableAltException("", 17, 0, input);
throw nvae;
}
switch(alt17) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1183:9: ( '0' .. '9' )+ ( DOT ( '0' .. '9' )* ( EXPONENT )? ( FLOAT_TYPE_SUFFIX )? | EXPONENT ( FLOAT_TYPE_SUFFIX )? | FLOAT_TYPE_SUFFIX )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1183:9: ( '0' .. '9' )+
int cnt8 = 0;
loop8: do {
int alt8 = 2;
int LA8_0 = input.LA(1);
if (((LA8_0 >= '0' && LA8_0 <= '9'))) {
alt8 = 1;
}
switch(alt8) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1183:10: '0' .. '9'
{
matchRange('0', '9');
}
break;
default:
if (cnt8 >= 1) {
break loop8;
}
EarlyExitException eee = new EarlyExitException(8, input);
throw eee;
}
cnt8++;
} while (true);
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1184:9: ( DOT ( '0' .. '9' )* ( EXPONENT )? ( FLOAT_TYPE_SUFFIX )? | EXPONENT ( FLOAT_TYPE_SUFFIX )? | FLOAT_TYPE_SUFFIX )
int alt13 = 3;
switch(input.LA(1)) {
case '.':
{
alt13 = 1;
}
break;
case 'E':
case 'e':
{
alt13 = 2;
}
break;
case 'D':
case 'F':
case 'd':
case 'f':
{
alt13 = 3;
}
break;
default:
NoViableAltException nvae = new NoViableAltException("", 13, 0, input);
throw nvae;
}
switch(alt13) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1185:13: DOT ( '0' .. '9' )* ( EXPONENT )? ( FLOAT_TYPE_SUFFIX )?
{
mDOT();
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1185:17: ( '0' .. '9' )*
loop9: do {
int alt9 = 2;
int LA9_0 = input.LA(1);
if (((LA9_0 >= '0' && LA9_0 <= '9'))) {
alt9 = 1;
}
switch(alt9) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1185:18: '0' .. '9'
{
matchRange('0', '9');
}
break;
default:
break loop9;
}
} while (true);
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1185:29: ( EXPONENT )?
int alt10 = 2;
int LA10_0 = input.LA(1);
if ((LA10_0 == 'E' || LA10_0 == 'e')) {
alt10 = 1;
}
switch(alt10) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1185:29: EXPONENT
{
mEXPONENT();
}
break;
}
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1185:39: ( FLOAT_TYPE_SUFFIX )?
int alt11 = 2;
int LA11_0 = input.LA(1);
if ((LA11_0 == 'D' || LA11_0 == 'F' || LA11_0 == 'd' || LA11_0 == 'f')) {
alt11 = 1;
}
switch(alt11) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1185:39: FLOAT_TYPE_SUFFIX
{
mFLOAT_TYPE_SUFFIX();
}
break;
}
}
break;
case 2:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1186:13: EXPONENT ( FLOAT_TYPE_SUFFIX )?
{
mEXPONENT();
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1186:22: ( FLOAT_TYPE_SUFFIX )?
int alt12 = 2;
int LA12_0 = input.LA(1);
if ((LA12_0 == 'D' || LA12_0 == 'F' || LA12_0 == 'd' || LA12_0 == 'f')) {
alt12 = 1;
}
switch(alt12) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1186:22: FLOAT_TYPE_SUFFIX
{
mFLOAT_TYPE_SUFFIX();
}
break;
}
}
break;
case 3:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1187:13: FLOAT_TYPE_SUFFIX
{
mFLOAT_TYPE_SUFFIX();
}
break;
}
}
break;
case 2:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1189:9: DOT ( '0' .. '9' )+ ( EXPONENT )? ( FLOAT_TYPE_SUFFIX )?
{
mDOT();
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1189:13: ( '0' .. '9' )+
int cnt14 = 0;
loop14: do {
int alt14 = 2;
int LA14_0 = input.LA(1);
if (((LA14_0 >= '0' && LA14_0 <= '9'))) {
alt14 = 1;
}
switch(alt14) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1189:14: '0' .. '9'
{
matchRange('0', '9');
}
break;
default:
if (cnt14 >= 1) {
break loop14;
}
EarlyExitException eee = new EarlyExitException(14, input);
throw eee;
}
cnt14++;
} while (true);
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1189:25: ( EXPONENT )?
int alt15 = 2;
int LA15_0 = input.LA(1);
if ((LA15_0 == 'E' || LA15_0 == 'e')) {
alt15 = 1;
}
switch(alt15) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1189:25: EXPONENT
{
mEXPONENT();
}
break;
}
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1189:35: ( FLOAT_TYPE_SUFFIX )?
int alt16 = 2;
int LA16_0 = input.LA(1);
if ((LA16_0 == 'D' || LA16_0 == 'F' || LA16_0 == 'd' || LA16_0 == 'f')) {
alt16 = 1;
}
switch(alt16) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1189:35: FLOAT_TYPE_SUFFIX
{
mFLOAT_TYPE_SUFFIX();
}
break;
}
}
break;
}
state.type = _type;
state.channel = _channel;
} finally {
}
}
use of org.antlr.runtime.EarlyExitException in project freud by LMAX-Exchange.
the class JavaLexer method mOCTAL_LITERAL.
// $ANTLR end "DECIMAL_LITERAL"
// $ANTLR start "OCTAL_LITERAL"
public final void mOCTAL_LITERAL() throws RecognitionException {
try {
int _type = OCTAL_LITERAL;
int _channel = DEFAULT_TOKEN_CHANNEL;
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1174:15: ( '0' ( '0' .. '7' )+ ( INTEGER_TYPE_SUFFIX )? )
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1174:17: '0' ( '0' .. '7' )+ ( INTEGER_TYPE_SUFFIX )?
{
match('0');
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1174:21: ( '0' .. '7' )+
int cnt6 = 0;
loop6: do {
int alt6 = 2;
int LA6_0 = input.LA(1);
if (((LA6_0 >= '0' && LA6_0 <= '7'))) {
alt6 = 1;
}
switch(alt6) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1174:22: '0' .. '7'
{
matchRange('0', '7');
}
break;
default:
if (cnt6 >= 1) {
break loop6;
}
EarlyExitException eee = new EarlyExitException(6, input);
throw eee;
}
cnt6++;
} while (true);
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1174:33: ( INTEGER_TYPE_SUFFIX )?
int alt7 = 2;
int LA7_0 = input.LA(1);
if ((LA7_0 == 'L' || LA7_0 == 'l')) {
alt7 = 1;
}
switch(alt7) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1174:33: INTEGER_TYPE_SUFFIX
{
mINTEGER_TYPE_SUFFIX();
}
break;
}
}
state.type = _type;
state.channel = _channel;
} finally {
}
}
use of org.antlr.runtime.EarlyExitException in project freud by LMAX-Exchange.
the class JavaParser method synpred220_Java_fragment.
// $ANTLR end synpred192_Java
// $ANTLR start synpred220_Java
public final void synpred220_Java_fragment() throws RecognitionException {
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1109:13: ( ( arrayDeclarator )+ ( DOT CLASS ) )
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1109:13: ( arrayDeclarator )+ ( DOT CLASS )
{
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1109:13: ( arrayDeclarator )+
int cnt221 = 0;
loop221: do {
int alt221 = 2;
int LA221_0 = input.LA(1);
if ((LA221_0 == LBRACK)) {
alt221 = 1;
}
switch(alt221) {
case 1:
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1109:17: arrayDeclarator
{
pushFollow(FOLLOW_arrayDeclarator_in_synpred220_Java13356);
arrayDeclarator();
state._fsp--;
if (state.failed) {
return;
}
}
break;
default:
if (cnt221 >= 1) {
break loop221;
}
if (state.backtracking > 0) {
state.failed = true;
return;
}
EarlyExitException eee = new EarlyExitException(221, input);
throw eee;
}
cnt221++;
} while (true);
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1111:13: ( DOT CLASS )
// /home/langera/dev/freud/trunk/src/grammar/Java.g:1111:17: DOT CLASS
{
match(input, DOT, FOLLOW_DOT_in_synpred220_Java13423);
if (state.failed) {
return;
}
match(input, CLASS, FOLLOW_CLASS_in_synpred220_Java13425);
if (state.failed) {
return;
}
}
}
}
use of org.antlr.runtime.EarlyExitException in project pentaho-kettle by pentaho.
the class FastSimpleGenericEdifactDirectXMLLexer method mTEXT_DATA.
// $ANTLR end "COMPLEX_ELEMENT_ITEM_SEPARATOR"
// $ANTLR start "TEXT_DATA"
public final void mTEXT_DATA() throws RecognitionException {
int _type = TEXT_DATA;
int _channel = DEFAULT_TOKEN_CHANNEL;
// C:\\workspace-sts\\Kettle trunk -
// restruct\\engine\\src\\org\\pentaho\\di\\trans\\steps\\edi2xml\\grammar\\
// FastSimpleGenericEdifactDirectXML.g:129:14:
// ( (~ ( RELEASE_CHARACTER | SEGMENT_TERMINATOR | COMPLEX_ELEMENT_ITEM_SEPARATOR | ELEMENT_SEPARATOR ) | (
// RELEASE_CHARACTER ELEMENT_SEPARATOR ) | ( RELEASE_CHARACTER RELEASE_CHARACTER ) | ( RELEASE_CHARACTER
// COMPLEX_ELEMENT_ITEM_SEPARATOR ) | ( RELEASE_CHARACTER SEGMENT_TERMINATOR ) )+ )
// C:\\workspace-sts\\Kettle trunk -
// restruct\\engine\\src\\org\\pentaho\\di\\trans\\steps\\edi2xml\\grammar\\
// FastSimpleGenericEdifactDirectXML.g:129:16:
// (~ ( RELEASE_CHARACTER | SEGMENT_TERMINATOR | COMPLEX_ELEMENT_ITEM_SEPARATOR | ELEMENT_SEPARATOR ) | (
// RELEASE_CHARACTER ELEMENT_SEPARATOR ) | ( RELEASE_CHARACTER RELEASE_CHARACTER ) | ( RELEASE_CHARACTER
// COMPLEX_ELEMENT_ITEM_SEPARATOR ) | ( RELEASE_CHARACTER SEGMENT_TERMINATOR ) )+
// C:\\workspace-sts\\Kettle trunk -
// restruct\\engine\\src\\org\\pentaho\\di\\trans\\steps\\edi2xml\\grammar\\
// FastSimpleGenericEdifactDirectXML.g:129:16:
// (~ ( RELEASE_CHARACTER | SEGMENT_TERMINATOR | COMPLEX_ELEMENT_ITEM_SEPARATOR | ELEMENT_SEPARATOR ) | (
// RELEASE_CHARACTER ELEMENT_SEPARATOR ) | ( RELEASE_CHARACTER RELEASE_CHARACTER ) | ( RELEASE_CHARACTER
// COMPLEX_ELEMENT_ITEM_SEPARATOR ) | ( RELEASE_CHARACTER SEGMENT_TERMINATOR ) )+
int cnt1 = 0;
loop1: do {
int alt1 = 6;
int LA1_0 = input.LA(1);
if (((LA1_0 >= '\u0000' && LA1_0 <= '&') || (LA1_0 >= '(' && LA1_0 <= '*') || (LA1_0 >= ',' && LA1_0 <= '9') || (LA1_0 >= ';' && LA1_0 <= '>') || (LA1_0 >= '@' && LA1_0 <= '\uFFFF'))) {
alt1 = 1;
} else if ((LA1_0 == '?')) {
switch(input.LA(2)) {
case '+':
alt1 = 2;
break;
case '?':
alt1 = 3;
break;
case ':':
alt1 = 4;
break;
case '\'':
alt1 = 5;
break;
}
}
switch(alt1) {
case 1:
if ((input.LA(1) >= '\u0000' && input.LA(1) <= '&') || (input.LA(1) >= '(' && input.LA(1) <= '*') || (input.LA(1) >= ',' && input.LA(1) <= '9') || (input.LA(1) >= ';' && input.LA(1) <= '>') || (input.LA(1) >= '@' && input.LA(1) <= '\uFFFF')) {
input.consume();
} else {
MismatchedSetException mse = new MismatchedSetException(null, input);
recover(mse);
throw mse;
}
break;
case 2:
// C:\\workspace-sts\\Kettle trunk -
// restruct\\engine\\src\\org\\pentaho\\di\\trans\\steps\\edi2xml\\grammar\\
// FastSimpleGenericEdifactDirectXML.g:129:106:
// ( RELEASE_CHARACTER ELEMENT_SEPARATOR )
// C:\\workspace-sts\\Kettle trunk -
// restruct\\engine\\src\\org\\pentaho\\di\\trans\\steps\\edi2xml\\grammar\\
// FastSimpleGenericEdifactDirectXML.g:129:106:
// ( RELEASE_CHARACTER ELEMENT_SEPARATOR )
// C:\\workspace-sts\\Kettle trunk -
// restruct\\engine\\src\\org\\pentaho\\di\\trans\\steps\\edi2xml\\grammar\\
// FastSimpleGenericEdifactDirectXML.g:129:107:
// RELEASE_CHARACTER ELEMENT_SEPARATOR
mRELEASE_CHARACTER();
mELEMENT_SEPARATOR();
break;
case 3:
// C:\\workspace-sts\\Kettle trunk -
// restruct\\engine\\src\\org\\pentaho\\di\\trans\\steps\\edi2xml\\grammar\\
// FastSimpleGenericEdifactDirectXML.g:129:144:
// ( RELEASE_CHARACTER RELEASE_CHARACTER )
// C:\\workspace-sts\\Kettle trunk -
// restruct\\engine\\src\\org\\pentaho\\di\\trans\\steps\\edi2xml\\grammar\\
// FastSimpleGenericEdifactDirectXML.g:129:144:
// ( RELEASE_CHARACTER RELEASE_CHARACTER )
// C:\\workspace-sts\\Kettle trunk -
// restruct\\engine\\src\\org\\pentaho\\di\\trans\\steps\\edi2xml\\grammar\\
// FastSimpleGenericEdifactDirectXML.g:129:145:
// RELEASE_CHARACTER RELEASE_CHARACTER
mRELEASE_CHARACTER();
mRELEASE_CHARACTER();
break;
case 4:
// C:\\workspace-sts\\Kettle trunk -
// restruct\\engine\\src\\org\\pentaho\\di\\trans\\steps\\edi2xml\\grammar\\
// FastSimpleGenericEdifactDirectXML.g:129:182:
// ( RELEASE_CHARACTER COMPLEX_ELEMENT_ITEM_SEPARATOR )
// C:\\workspace-sts\\Kettle trunk -
// restruct\\engine\\src\\org\\pentaho\\di\\trans\\steps\\edi2xml\\grammar\\
// FastSimpleGenericEdifactDirectXML.g:129:182:
// ( RELEASE_CHARACTER COMPLEX_ELEMENT_ITEM_SEPARATOR )
// C:\\workspace-sts\\Kettle trunk -
// restruct\\engine\\src\\org\\pentaho\\di\\trans\\steps\\edi2xml\\grammar\\
// FastSimpleGenericEdifactDirectXML.g:129:183:
// RELEASE_CHARACTER COMPLEX_ELEMENT_ITEM_SEPARATOR
mRELEASE_CHARACTER();
mCOMPLEX_ELEMENT_ITEM_SEPARATOR();
break;
case 5:
// C:\\workspace-sts\\Kettle trunk -
// restruct\\engine\\src\\org\\pentaho\\di\\trans\\steps\\edi2xml\\grammar\\
// FastSimpleGenericEdifactDirectXML.g:129:233:
// ( RELEASE_CHARACTER SEGMENT_TERMINATOR )
mRELEASE_CHARACTER();
mSEGMENT_TERMINATOR();
break;
default:
if (cnt1 >= 1) {
break loop1;
}
EarlyExitException eee = new EarlyExitException(1, input);
throw eee;
}
cnt1++;
} while (true);
state.type = _type;
state.channel = _channel;
}
use of org.antlr.runtime.EarlyExitException in project drools by kiegroup.
the class DSLMapParser method variable_reference_expr.
// $ANTLR start "variable_reference_expr"
// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:247:1: variable_reference_expr : ( LITERAL | EQUALS )+ ;
public final DSLMapParser.variable_reference_expr_return variable_reference_expr() throws RecognitionException {
DSLMapParser.variable_reference_expr_return retval = new DSLMapParser.variable_reference_expr_return();
retval.start = input.LT(1);
Object root_0 = null;
Token set36 = null;
Object set36_tree = null;
try {
// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:248:5: ( ( LITERAL | EQUALS )+ )
// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:248:8: ( LITERAL | EQUALS )+
{
root_0 = (Object) adaptor.nil();
// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:248:8: ( LITERAL | EQUALS )+
int cnt17 = 0;
loop17: while (true) {
int alt17 = 2;
int LA17_0 = input.LA(1);
if ((LA17_0 == EQUALS || LA17_0 == LITERAL)) {
alt17 = 1;
}
switch(alt17) {
case 1:
// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:
{
set36 = input.LT(1);
if (input.LA(1) == EQUALS || input.LA(1) == LITERAL) {
input.consume();
if (state.backtracking == 0)
adaptor.addChild(root_0, (Object) adaptor.create(set36));
state.errorRecovery = false;
state.failed = false;
} else {
if (state.backtracking > 0) {
state.failed = true;
return retval;
}
MismatchedSetException mse = new MismatchedSetException(null, input);
throw mse;
}
}
break;
default:
if (cnt17 >= 1)
break loop17;
if (state.backtracking > 0) {
state.failed = true;
return retval;
}
EarlyExitException eee = new EarlyExitException(17, input);
throw eee;
}
cnt17++;
}
}
retval.stop = input.LT(-1);
if (state.backtracking == 0) {
retval.tree = (Object) adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
} catch (RecognitionException re) {
reportError(re);
recover(input, re);
retval.tree = (Object) adaptor.errorNode(input, retval.start, input.LT(-1), re);
} finally {
// do for sure before leaving
}
return retval;
}
Aggregations