@Test public void testFloat() { runLexer(".23"); assertNoError(); assertToken(0, TraciLexer.FLOAT, ".23", Token.DEFAULT_CHANNEL, 1, 0); runLexer("2.23.23"); assertNoError(); assertToken(0, TraciLexer.FLOAT, "2.23", Token.DEFAULT_CHANNEL, 1, 0); runLexer("2.23e-10-5"); assertNoError(); assertToken(0, TraciLexer.FLOAT, "2.23e-10", Token.DEFAULT_CHANNEL, 1, 0); runLexer(".23E+13.2"); assertNoError(); assertToken(0, TraciLexer.FLOAT, ".23E+13", Token.DEFAULT_CHANNEL, 1, 0); runLexer("23E13"); assertNoError(); assertToken(0, TraciLexer.FLOAT, "23E13", Token.DEFAULT_CHANNEL, 1, 0); runLexer("1.2e+"); assertError(EarlyExitException.class); }
/** * Format an error message as expected by ANTLR. It is basically the * same error message that ANTL BaseRecognizer generates with some * additional data. * Also used to log debugging information. * @param log the logger to use at debug time * @param recognizer the lexer or parser who generated the error * @param e the exception that occured * @param superMessage the error message that the super class generated * @param tokenNames list of token names * @return a formatted error message */ public static String getErrorMessage( final Log log, final BaseRecognizer recognizer, final RecognitionException e, final String superMessage, final String[] tokenNames) { if (log.isDebugEnabled()) { List < ? > stack = BaseRecognizer.getRuleInvocationStack( e, recognizer.getClass().getSuperclass().getName()); String debugMsg = recognizer.getErrorHeader(e) + " " + e.getClass().getSimpleName() + ": " + superMessage + ":"; if (e instanceof NoViableAltException) { NoViableAltException nvae = (NoViableAltException) e; debugMsg += " (decision=" + nvae.decisionNumber + " state=" + nvae.stateNumber + ")" + " decision=<<" + nvae.grammarDecisionDescription + ">>"; } else if (e instanceof UnwantedTokenException) { UnwantedTokenException ute = (UnwantedTokenException) e; debugMsg += " (unexpected token=" + toString(ute.getUnexpectedToken(), tokenNames) + ")"; } else if (e instanceof EarlyExitException) { EarlyExitException eea = (EarlyExitException) e; debugMsg += " (decision=" + eea.decisionNumber + ")"; } debugMsg += " ruleStack=" + stack.toString(); log.debug(debugMsg); } return makeUserMsg(e, superMessage); }
/** * Simplify error message text for end users. * @param e exception that occurred * @param msg as formatted by ANTLR * @return a more readable error message */ public static String makeUserMsg(final RecognitionException e, final String msg) { if (e instanceof NoViableAltException) { return msg.replace("no viable alternative at", "unrecognized"); } else if (e instanceof UnwantedTokenException) { return msg.replace("extraneous input", "unexpected token"); } else if (e instanceof MismatchedTokenException) { if (msg.contains("mismatched input '<EOF>'")) { return msg.replace("mismatched input '<EOF>' expecting", "reached end of file looking for"); } else { return msg.replace("mismatched input", "unexpected token"); } } else if (e instanceof EarlyExitException) { return msg.replace("required (...)+ loop did not match anything", "required tokens not found"); } else if (e instanceof FailedPredicateException) { if (msg.contains("picture_string failed predicate: {Unbalanced parentheses}")) { return "Unbalanced parentheses in picture string"; } if (msg.contains("PICTURE_PART failed predicate: {Contains invalid picture symbols}")) { return "Picture string contains invalid symbols"; } if (msg.contains("PICTURE_PART failed predicate: {Syntax error in last picture clause}")) { return "Syntax error in last picture clause"; } if (msg.contains("DATA_NAME failed predicate: {Syntax error in last clause}")) { return "Syntax error in last COBOL clause"; } } return msg; }
/** * Format an error message as expected by ANTLR. It is basically the * same error message that ANTL BaseRecognizer generates with some * additional data. * Also used to log debugging information. * @param log the logger to use at debug time * @param recognizer the lexer or parser who generated the error * @param e the exception that occured * @param superMessage the error message that the super class generated * @param tokenNames list of token names * @return a formatted error message */ public static String getErrorMessage( final Logger log, final BaseRecognizer recognizer, final RecognitionException e, final String superMessage, final String[] tokenNames) { if (log.isDebugEnabled()) { List < ? > stack = BaseRecognizer.getRuleInvocationStack( e, recognizer.getClass().getSuperclass().getName()); String debugMsg = recognizer.getErrorHeader(e) + " " + e.getClass().getSimpleName() + ": " + superMessage + ":"; if (e instanceof NoViableAltException) { NoViableAltException nvae = (NoViableAltException) e; debugMsg += " (decision=" + nvae.decisionNumber + " state=" + nvae.stateNumber + ")" + " decision=<<" + nvae.grammarDecisionDescription + ">>"; } else if (e instanceof UnwantedTokenException) { UnwantedTokenException ute = (UnwantedTokenException) e; debugMsg += " (unexpected token=" + toString(ute.getUnexpectedToken(), tokenNames) + ")"; } else if (e instanceof EarlyExitException) { EarlyExitException eea = (EarlyExitException) e; debugMsg += " (decision=" + eea.decisionNumber + ")"; } debugMsg += " ruleStack=" + stack.toString(); log.debug(debugMsg); } return makeUserMsg(e, superMessage); }
public final void mFIELD_NAME() throws RecognitionException { try { int _type = FIELD_NAME; int _channel = DEFAULT_TOKEN_CHANNEL; // src/Query.g:142:3: ( ( 'a' .. 'z' | '_' )+ ) // src/Query.g:142:5: ( 'a' .. 'z' | '_' )+ { // src/Query.g:142:5: ( 'a' .. 'z' | '_' )+ int cnt1=0; loop1: while (true) { int alt1=2; int LA1_0 = input.LA(1); if ( (LA1_0=='_'||(LA1_0 >= 'a' && LA1_0 <= 'z')) ) { alt1=1; } switch (alt1) { case 1 : // src/Query.g: { if ( input.LA(1)=='_'||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) { input.consume(); } else { MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse; } } break; default : if ( cnt1 >= 1 ) break loop1; EarlyExitException eee = new EarlyExitException(1, input); throw eee; } cnt1++; } } state.type = _type; state.channel = _channel; } finally { // do for sure before leaving } }
public final void mWHITESPACE() throws RecognitionException { try { int _type = WHITESPACE; int _channel = DEFAULT_TOKEN_CHANNEL; // com/opengamma/financial/expression/deprecated/Expr.g:40:12: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ ) // com/opengamma/financial/expression/deprecated/Expr.g:40:14: ( ' ' | '\\t' | '\\r' | '\\n' )+ { // com/opengamma/financial/expression/deprecated/Expr.g:40:14: ( ' ' | '\\t' | '\\r' | '\\n' )+ int cnt6=0; loop6: do { int alt6=2; int LA6_0 = input.LA(1); if ( ((LA6_0>='\t' && LA6_0<='\n')||LA6_0=='\r'||LA6_0==' ') ) { alt6=1; } switch (alt6) { case 1 : // com/opengamma/financial/expression/deprecated/Expr.g: { if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) { input.consume(); } else { MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse;} } break; default : if ( cnt6 >= 1 ) break loop6; EarlyExitException eee = new EarlyExitException(6, input); throw eee; } cnt6++; } while (true); skip (); } state.type = _type; state.channel = _channel; } finally { } }
public final void mINTEGER() throws RecognitionException { try { int _type = INTEGER; int _channel = DEFAULT_TOKEN_CHANNEL; // com/opengamma/financial/expression/deprecated/Expr.g:41:9: ( ( '+' | '-' )? ( '0' .. '9' )+ ) // com/opengamma/financial/expression/deprecated/Expr.g:41:11: ( '+' | '-' )? ( '0' .. '9' )+ { // com/opengamma/financial/expression/deprecated/Expr.g:41:11: ( '+' | '-' )? int alt7=2; int LA7_0 = input.LA(1); if ( (LA7_0=='+'||LA7_0=='-') ) { alt7=1; } switch (alt7) { case 1 : // com/opengamma/financial/expression/deprecated/Expr.g: { if ( input.LA(1)=='+'||input.LA(1)=='-' ) { input.consume(); } else { MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse;} } break; } // com/opengamma/financial/expression/deprecated/Expr.g:41:22: ( '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 : // com/opengamma/financial/expression/deprecated/Expr.g:41:22: '0' .. '9' { matchRange('0','9'); } break; default : if ( cnt8 >= 1 ) break loop8; EarlyExitException eee = new EarlyExitException(8, input); throw eee; } cnt8++; } while (true); } state.type = _type; state.channel = _channel; } finally { } }
public final void mHEX_NUMBER() throws RecognitionException { try { final int _type = HEX_NUMBER; 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\\gotomem\\MemoryExpression.g:26:12: // ( '0x' ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )+ ) // C:\\Dokumente und // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g:26:14: // '0x' ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )+ { match("0x"); // C:\\Dokumente und // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g:26:19: // ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )+ int cnt2 = 0; loop2: do { int alt2 = 2; final int LA2_0 = input.LA(1); if (((LA2_0 >= '0' && LA2_0 <= '9') || (LA2_0 >= 'A' && LA2_0 <= 'F') || (LA2_0 >= 'a' && LA2_0 <= 'f'))) { alt2 = 1; } switch (alt2) { case 1: // C:\\Dokumente und // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g: { if ((input.LA(1) >= '0' && input.LA(1) <= '9') || (input.LA(1) >= 'A' && input.LA(1) <= 'F') || (input.LA(1) >= 'a' && input.LA(1) <= 'f')) { input.consume(); } else { final MismatchedSetException mse = new MismatchedSetException(null, input); recover(mse); throw mse; } } break; default: if (cnt2 >= 1) { break loop2; } final EarlyExitException eee = new EarlyExitException(2, input); throw eee; } cnt2++; } while (true); } state.type = _type; state.channel = _channel; } finally { } }
public final void mNUMBER() throws RecognitionException { try { final int _type = NUMBER; 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\\gotomem\\MemoryExpression.g:25:9: // ( ( DIGIT )+ ) // C:\\Dokumente und // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g:25:11: // ( DIGIT )+ { // C:\\Dokumente und // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g:25:11: // ( DIGIT )+ int cnt1 = 0; loop1: do { int alt1 = 2; final int LA1_0 = input.LA(1); if (((LA1_0 >= '0' && LA1_0 <= '9'))) { alt1 = 1; } switch (alt1) { case 1: // C:\\Dokumente und // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g:25:11: // DIGIT { mDIGIT(); } break; default: if (cnt1 >= 1) { break loop1; } final EarlyExitException eee = new EarlyExitException(1, input); throw eee; } cnt1++; } while (true); } state.type = _type; state.channel = _channel; } finally { } }
public final void mREGISTER() throws RecognitionException { try { final int _type = REGISTER; 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\\gotomem\\MemoryExpression.g:27:10: // ( CHARACTER ( CHARACTER | DIGIT )+ ) // C:\\Dokumente und // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g:27:12: // CHARACTER ( CHARACTER | DIGIT )+ { mCHARACTER(); // C:\\Dokumente und // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\gotomem\\MemoryExpression.g:27:22: // ( 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\\gotomem\\MemoryExpression.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 { } }
public final void mHEX_NUMBER() throws RecognitionException { try { final int _type = HEX_NUMBER; 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:33:12: // ( '0x' ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )+ ) // C:\\Dokumente und // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:33:14: // '0x' ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )+ { match("0x"); // C:\\Dokumente und // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:33:19: // ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )+ int cnt2 = 0; loop2: do { int alt2 = 2; final int LA2_0 = input.LA(1); if (((LA2_0 >= '0' && LA2_0 <= '9') || (LA2_0 >= 'A' && LA2_0 <= 'F') || (LA2_0 >= 'a' && LA2_0 <= 'f'))) { alt2 = 1; } switch (alt2) { 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) <= 'F') || (input.LA(1) >= 'a' && input.LA(1) <= 'f')) { input.consume(); } else { final MismatchedSetException mse = new MismatchedSetException(null, input); recover(mse); throw mse; } } break; default: if (cnt2 >= 1) { break loop2; } final EarlyExitException eee = new EarlyExitException(2, input); throw eee; } cnt2++; } while (true); } state.type = _type; state.channel = _channel; } finally { } }
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 { } }
public final void mNUMBER() throws RecognitionException { try { final int _type = NUMBER; 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:32:9: // ( ( DIGIT )+ ) // C:\\Dokumente und // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:32:11: // ( DIGIT )+ { // C:\\Dokumente und // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:32:11: // ( DIGIT )+ int cnt1 = 0; loop1: do { int alt1 = 2; final int LA1_0 = input.LA(1); if (((LA1_0 >= '0' && LA1_0 <= '9'))) { alt1 = 1; } switch (alt1) { case 1: // C:\\Dokumente und // Einstellungen\\sp\\workspace\\com.google.security.zynamics.binnavi-Trunk\\src\\com.google.security.zynamics.binnavi\\parsers\\BreakpointCondition\\Condition.g:32:11: // DIGIT { mDIGIT(); } break; default: if (cnt1 >= 1) { break loop1; } final EarlyExitException eee = new EarlyExitException(1, input); throw eee; } cnt1++; } while (true); } state.type = _type; state.channel = _channel; } finally { } }
public final void mNUMANDSUFFIX() throws RecognitionException { try { int _type = NUMANDSUFFIX; int _channel = DEFAULT_TOKEN_CHANNEL; // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g:414:2: ( ( '0' .. '9' )+ ( 'A' .. 'Z' ) ) // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g:414:4: ( '0' .. '9' )+ ( 'A' .. 'Z' ) { // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g:414:4: ( '0' .. '9' )+ int cnt4=0; loop4: do { int alt4=2; int LA4_0 = input.LA(1); if ( ((LA4_0>='0' && LA4_0<='9')) ) { alt4=1; } switch (alt4) { case 1 : // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g:414:5: '0' .. '9' { matchRange('0','9'); } break; default : if ( cnt4 >= 1 ) break loop4; EarlyExitException eee = new EarlyExitException(4, input); throw eee; } cnt4++; } while (true); // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g:414:16: ( 'A' .. 'Z' ) // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g:414:17: 'A' .. 'Z' { matchRange('A','Z'); } } state.type = _type; state.channel = _channel; } finally { } }
public final void mNUMBER() throws RecognitionException { try { int _type = NUMBER; int _channel = DEFAULT_TOKEN_CHANNEL; // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g:417:2: ( ( '#' )? ( '0' .. '9' )+ ) // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g:417:4: ( '#' )? ( '0' .. '9' )+ { // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g:417:4: ( '#' )? int alt5=2; int LA5_0 = input.LA(1); if ( (LA5_0=='#') ) { alt5=1; } switch (alt5) { case 1 : // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g:417:4: '#' { match('#'); } break; } // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g:417:8: ( '0' .. '9' )+ int cnt6=0; loop6: do { int alt6=2; int LA6_0 = input.LA(1); if ( ((LA6_0>='0' && LA6_0<='9')) ) { alt6=1; } switch (alt6) { case 1 : // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g:417:9: '0' .. '9' { matchRange('0','9'); } break; default : if ( cnt6 >= 1 ) break loop6; EarlyExitException eee = new EarlyExitException(6, input); throw eee; } cnt6++; } while (true); } state.type = _type; state.channel = _channel; } finally { } }
public final void mNAME() throws RecognitionException { try { int _type = NAME; int _channel = DEFAULT_TOKEN_CHANNEL; // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g:419:6: ( ( 'A' .. 'Z' | '0' .. '9' | '\\'' | '-' | '.' | '/' )+ ) // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g:419:8: ( 'A' .. 'Z' | '0' .. '9' | '\\'' | '-' | '.' | '/' )+ { // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g:419:8: ( 'A' .. 'Z' | '0' .. '9' | '\\'' | '-' | '.' | '/' )+ int cnt7=0; loop7: do { int alt7=2; int LA7_0 = input.LA(1); if ( (LA7_0=='\''||(LA7_0>='-' && LA7_0<='9')||(LA7_0>='A' && LA7_0<='Z')) ) { alt7=1; } switch (alt7) { case 1 : // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g: { if ( input.LA(1)=='\''||(input.LA(1)>='-' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z') ) { input.consume(); } else { MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse;} } break; default : if ( cnt7 >= 1 ) break loop7; EarlyExitException eee = new EarlyExitException(7, input); throw eee; } cnt7++; } while (true); } state.type = _type; state.channel = _channel; } finally { } }
public final void mWS() throws RecognitionException { try { int _type = WS; int _channel = DEFAULT_TOKEN_CHANNEL; // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g:422:4: ( ( ' ' | '\\t' )+ ) // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g:422:6: ( ' ' | '\\t' )+ { // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g:422:6: ( ' ' | '\\t' )+ int cnt8=0; loop8: do { int alt8=2; int LA8_0 = input.LA(1); if ( (LA8_0=='\t'||LA8_0==' ') ) { alt8=1; } switch (alt8) { case 1 : // /Users/jeffrey/Documents/workspace/matchmaker/src/ca/sqlpower/matchmaker/address/parse/Address.g: { if ( input.LA(1)=='\t'||input.LA(1)==' ' ) { input.consume(); } else { MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse;} } break; default : if ( cnt8 >= 1 ) break loop8; EarlyExitException eee = new EarlyExitException(8, input); throw eee; } cnt8++; } while (true); skip(); } state.type = _type; state.channel = _channel; } finally { } }
public final void mRULE_INT() throws RecognitionException { try { int _type = RULE_INT; int _channel = DEFAULT_TOKEN_CHANNEL; // ../com.jaspersoft.studio.data.sql.ui/src-gen/com/jaspersoft/studio/data/ui/contentassist/antlr/lexer/InternalSqlLexer.g:181:10: ( ( '-' )? ( '0' .. '9' )+ ) // ../com.jaspersoft.studio.data.sql.ui/src-gen/com/jaspersoft/studio/data/ui/contentassist/antlr/lexer/InternalSqlLexer.g:181:12: ( '-' )? ( '0' .. '9' )+ { // ../com.jaspersoft.studio.data.sql.ui/src-gen/com/jaspersoft/studio/data/ui/contentassist/antlr/lexer/InternalSqlLexer.g:181:12: ( '-' )? int alt3=2; int LA3_0 = input.LA(1); if ( (LA3_0=='-') ) { alt3=1; } switch (alt3) { case 1 : // ../com.jaspersoft.studio.data.sql.ui/src-gen/com/jaspersoft/studio/data/ui/contentassist/antlr/lexer/InternalSqlLexer.g:181:12: '-' { match('-'); } break; } // ../com.jaspersoft.studio.data.sql.ui/src-gen/com/jaspersoft/studio/data/ui/contentassist/antlr/lexer/InternalSqlLexer.g:181:17: ( '0' .. '9' )+ int cnt4=0; loop4: do { int alt4=2; int LA4_0 = input.LA(1); if ( ((LA4_0>='0' && LA4_0<='9')) ) { alt4=1; } switch (alt4) { case 1 : // ../com.jaspersoft.studio.data.sql.ui/src-gen/com/jaspersoft/studio/data/ui/contentassist/antlr/lexer/InternalSqlLexer.g:181:18: '0' .. '9' { matchRange('0','9'); } break; default : if ( cnt4 >= 1 ) break loop4; EarlyExitException eee = new EarlyExitException(4, input); throw eee; } cnt4++; } while (true); } state.type = _type; state.channel = _channel; } finally { } }
public final void mRULE_WS() throws RecognitionException { try { int _type = RULE_WS; int _channel = DEFAULT_TOKEN_CHANNEL; // ../com.jaspersoft.studio.data.sql.ui/src-gen/com/jaspersoft/studio/data/ui/contentassist/antlr/lexer/InternalSqlLexer.g:203:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ ) // ../com.jaspersoft.studio.data.sql.ui/src-gen/com/jaspersoft/studio/data/ui/contentassist/antlr/lexer/InternalSqlLexer.g:203:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ { // ../com.jaspersoft.studio.data.sql.ui/src-gen/com/jaspersoft/studio/data/ui/contentassist/antlr/lexer/InternalSqlLexer.g:203:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ int cnt20=0; loop20: do { int alt20=2; int LA20_0 = input.LA(1); if ( ((LA20_0>='\t' && LA20_0<='\n')||LA20_0=='\r'||LA20_0==' ') ) { alt20=1; } switch (alt20) { case 1 : // ../com.jaspersoft.studio.data.sql.ui/src-gen/com/jaspersoft/studio/data/ui/contentassist/antlr/lexer/InternalSqlLexer.g: { if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) { input.consume(); } else { MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse;} } break; default : if ( cnt20 >= 1 ) break loop20; EarlyExitException eee = new EarlyExitException(20, input); throw eee; } cnt20++; } while (true); } state.type = _type; state.channel = _channel; } finally { } }
public final void mRULE_EXPOBJIDENTIFIER() throws RecognitionException { try { // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:3130:32: ( (~ ( ( '\\r' | '\\n' | '}' ) ) )+ ) // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:3130:34: (~ ( ( '\\r' | '\\n' | '}' ) ) )+ { // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:3130:34: (~ ( ( '\\r' | '\\n' | '}' ) ) )+ int cnt24=0; loop24: do { int alt24=2; int LA24_0 = input.LA(1); if ( ((LA24_0>='\u0000' && LA24_0<='\t')||(LA24_0>='\u000B' && LA24_0<='\f')||(LA24_0>='\u000E' && LA24_0<='|')||(LA24_0>='~' && LA24_0<='\uFFFF')) ) { alt24=1; } switch (alt24) { case 1 : // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:3130:34: ~ ( ( '\\r' | '\\n' | '}' ) ) { if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='|')||(input.LA(1)>='~' && input.LA(1)<='\uFFFF') ) { input.consume(); } else { MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse;} } break; default : if ( cnt24 >= 1 ) break loop24; EarlyExitException eee = new EarlyExitException(24, input); throw eee; } cnt24++; } while (true); } } finally { } }
public final void mRULE_WS() throws RecognitionException { try { int _type = RULE_WS; int _channel = DEFAULT_TOKEN_CHANNEL; // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:3138:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ ) // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:3138:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ { // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:3138:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ int cnt31=0; loop31: do { int alt31=2; int LA31_0 = input.LA(1); if ( ((LA31_0>='\t' && LA31_0<='\n')||LA31_0=='\r'||LA31_0==' ') ) { alt31=1; } switch (alt31) { case 1 : // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g: { if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) { input.consume(); } else { MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse;} } break; default : if ( cnt31 >= 1 ) break loop31; EarlyExitException eee = new EarlyExitException(31, input); throw eee; } cnt31++; } while (true); } state.type = _type; state.channel = _channel; } finally { } }
public final void mRULE_EXPOBJIDENTIFIER() throws RecognitionException { try { // ../com.jaspersoft.studio.editor.jrexpressions.ui/src-gen/com/jaspersoft/studio/editor/jrexpressions/ui/contentassist/antlr/internal/InternalJavaJRExpression.g:8609:32: ( (~ ( ( '\\r' | '\\n' | '}' ) ) )+ ) // ../com.jaspersoft.studio.editor.jrexpressions.ui/src-gen/com/jaspersoft/studio/editor/jrexpressions/ui/contentassist/antlr/internal/InternalJavaJRExpression.g:8609:34: (~ ( ( '\\r' | '\\n' | '}' ) ) )+ { // ../com.jaspersoft.studio.editor.jrexpressions.ui/src-gen/com/jaspersoft/studio/editor/jrexpressions/ui/contentassist/antlr/internal/InternalJavaJRExpression.g:8609:34: (~ ( ( '\\r' | '\\n' | '}' ) ) )+ int cnt24=0; loop24: do { int alt24=2; int LA24_0 = input.LA(1); if ( ((LA24_0>='\u0000' && LA24_0<='\t')||(LA24_0>='\u000B' && LA24_0<='\f')||(LA24_0>='\u000E' && LA24_0<='|')||(LA24_0>='~' && LA24_0<='\uFFFF')) ) { alt24=1; } switch (alt24) { case 1 : // ../com.jaspersoft.studio.editor.jrexpressions.ui/src-gen/com/jaspersoft/studio/editor/jrexpressions/ui/contentassist/antlr/internal/InternalJavaJRExpression.g:8609:34: ~ ( ( '\\r' | '\\n' | '}' ) ) { if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='|')||(input.LA(1)>='~' && input.LA(1)<='\uFFFF') ) { input.consume(); } else { MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse;} } break; default : if ( cnt24 >= 1 ) break loop24; EarlyExitException eee = new EarlyExitException(24, input); throw eee; } cnt24++; } while (true); } } finally { } }
public final void mRULE_WS() throws RecognitionException { try { int _type = RULE_WS; int _channel = DEFAULT_TOKEN_CHANNEL; // ../com.jaspersoft.studio.editor.jrexpressions.ui/src-gen/com/jaspersoft/studio/editor/jrexpressions/ui/contentassist/antlr/internal/InternalJavaJRExpression.g:8617:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ ) // ../com.jaspersoft.studio.editor.jrexpressions.ui/src-gen/com/jaspersoft/studio/editor/jrexpressions/ui/contentassist/antlr/internal/InternalJavaJRExpression.g:8617:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ { // ../com.jaspersoft.studio.editor.jrexpressions.ui/src-gen/com/jaspersoft/studio/editor/jrexpressions/ui/contentassist/antlr/internal/InternalJavaJRExpression.g:8617:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ int cnt31=0; loop31: do { int alt31=2; int LA31_0 = input.LA(1); if ( ((LA31_0>='\t' && LA31_0<='\n')||LA31_0=='\r'||LA31_0==' ') ) { alt31=1; } switch (alt31) { case 1 : // ../com.jaspersoft.studio.editor.jrexpressions.ui/src-gen/com/jaspersoft/studio/editor/jrexpressions/ui/contentassist/antlr/internal/InternalJavaJRExpression.g: { if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) { input.consume(); } else { MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse;} } break; default : if ( cnt31 >= 1 ) break loop31; EarlyExitException eee = new EarlyExitException(31, input); throw eee; } cnt31++; } while (true); } state.type = _type; state.channel = _channel; } finally { } }
public final Map<String,CFExpression> paramStatementAttributes() throws RecognitionException { Map<String,CFExpression> attr = null; CFIdentifier i = null; CFExpression e = null; attr = new HashMap<String,CFExpression>(); try { // E:\\BlueDragon\\OpenBD_ANTLR\\src\\com\\naryx\\tagfusion\\cfm\\parser\\CFMLTree.g:302:3: ( ( ^( EQUALSOP i= identifier e= expression ) )+ ) // E:\\BlueDragon\\OpenBD_ANTLR\\src\\com\\naryx\\tagfusion\\cfm\\parser\\CFMLTree.g:302:5: ( ^( EQUALSOP i= identifier e= expression ) )+ { // E:\\BlueDragon\\OpenBD_ANTLR\\src\\com\\naryx\\tagfusion\\cfm\\parser\\CFMLTree.g:302:5: ( ^( EQUALSOP i= identifier e= expression ) )+ int cnt45=0; loop45: do { int alt45=2; int LA45_0 = input.LA(1); if ( (LA45_0==EQUALSOP) ) { alt45=1; } switch (alt45) { case 1 : // E:\\BlueDragon\\OpenBD_ANTLR\\src\\com\\naryx\\tagfusion\\cfm\\parser\\CFMLTree.g:302:7: ^( EQUALSOP i= identifier e= expression ) { match(input,EQUALSOP,FOLLOW_EQUALSOP_in_paramStatementAttributes1796); if (state.failed) return attr; match(input, Token.DOWN, null); if (state.failed) return attr; pushFollow(FOLLOW_identifier_in_paramStatementAttributes1800); i=identifier(); state._fsp--; if (state.failed) return attr; pushFollow(FOLLOW_expression_in_paramStatementAttributes1804); e=expression(); state._fsp--; if (state.failed) return attr; if ( state.backtracking==0 ) { attr.put( i.getToken().getText().toUpperCase(), e ); } match(input, Token.UP, null); if (state.failed) return attr; } break; default : if ( cnt45 >= 1 ) break loop45; if (state.backtracking>0) {state.failed=true; return attr;} EarlyExitException eee = new EarlyExitException(45, input); throw eee; } cnt45++; } while (true); } } catch (RecognitionException re) { throw re; } finally { } return attr; }
public final CFMLParser.paramStatementAttributes_return paramStatementAttributes() throws RecognitionException { CFMLParser.paramStatementAttributes_return retval = new CFMLParser.paramStatementAttributes_return(); retval.start = input.LT(1); int paramStatementAttributes_StartIndex = input.index(); CommonTree root_0 = null; CFMLParser.param_return param175 = null; try { if ( state.backtracking>0 && alreadyParsedRule(input, 40) ) { return retval; } // E:\\BlueDragon\\OpenBD_ANTLR\\src\\com\\naryx\\tagfusion\\cfm\\parser\\CFML.g:567:3: ( ( param )+ ) // E:\\BlueDragon\\OpenBD_ANTLR\\src\\com\\naryx\\tagfusion\\cfm\\parser\\CFML.g:567:5: ( param )+ { root_0 = (CommonTree)adaptor.nil(); // E:\\BlueDragon\\OpenBD_ANTLR\\src\\com\\naryx\\tagfusion\\cfm\\parser\\CFML.g:567:5: ( param )+ int cnt45=0; loop45: do { int alt45=2; alt45 = dfa45.predict(input); switch (alt45) { case 1 : // E:\\BlueDragon\\OpenBD_ANTLR\\src\\com\\naryx\\tagfusion\\cfm\\parser\\CFML.g:567:7: param { pushFollow(FOLLOW_param_in_paramStatementAttributes3021); param175=param(); state._fsp--; if (state.failed) return retval; if ( state.backtracking==0 ) adaptor.addChild(root_0, param175.getTree()); } break; default : if ( cnt45 >= 1 ) break loop45; if (state.backtracking>0) {state.failed=true; return retval;} EarlyExitException eee = new EarlyExitException(45, input); throw eee; } cnt45++; } while (true); } 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 e) { throw e; } finally { if ( state.backtracking>0 ) { memoize(input, 40, paramStatementAttributes_StartIndex); } } return retval; }
public final void mWS() throws RecognitionException { try { int _type = WS; int _channel = DEFAULT_TOKEN_CHANNEL; // E:\\BlueDragon\\OpenBD_ANTLR\\src\\com\\naryx\\tagfusion\\cfm\\parser\\CFML.g:153:4: ( ( ' ' | '\\t' | '\\n' | '\\r' | '\\f' )+ ) // E:\\BlueDragon\\OpenBD_ANTLR\\src\\com\\naryx\\tagfusion\\cfm\\parser\\CFML.g:153:6: ( ' ' | '\\t' | '\\n' | '\\r' | '\\f' )+ { // E:\\BlueDragon\\OpenBD_ANTLR\\src\\com\\naryx\\tagfusion\\cfm\\parser\\CFML.g:153:6: ( ' ' | '\\t' | '\\n' | '\\r' | '\\f' )+ int cnt1=0; loop1: do { int alt1=2; int LA1_0 = input.LA(1); if ( ((LA1_0>='\t' && LA1_0<='\n')||(LA1_0>='\f' && LA1_0<='\r')||LA1_0==' ') ) { alt1=1; } switch (alt1) { case 1 : // E:\\BlueDragon\\OpenBD_ANTLR\\src\\com\\naryx\\tagfusion\\cfm\\parser\\CFML.g: { if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||(input.LA(1)>='\f' && input.LA(1)<='\r')||input.LA(1)==' ' ) { input.consume(); } else { MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse;} } break; default : if ( cnt1 >= 1 ) break loop1; EarlyExitException eee = new EarlyExitException(1, input); throw eee; } cnt1++; } while (true); _channel=HIDDEN; } state.type = _type; state.channel = _channel; } finally { } }
public final void mINTEGER_LITERAL() throws RecognitionException { try { int _type = INTEGER_LITERAL; int _channel = DEFAULT_TOKEN_CHANNEL; // E:\\BlueDragon\\OpenBD_ANTLR\\src\\com\\naryx\\tagfusion\\cfm\\parser\\CFML.g:331:3: ( ( DecimalDigit )+ ) // E:\\BlueDragon\\OpenBD_ANTLR\\src\\com\\naryx\\tagfusion\\cfm\\parser\\CFML.g:331:5: ( DecimalDigit )+ { // E:\\BlueDragon\\OpenBD_ANTLR\\src\\com\\naryx\\tagfusion\\cfm\\parser\\CFML.g:331:5: ( DecimalDigit )+ int cnt13=0; loop13: do { int alt13=2; int LA13_0 = input.LA(1); if ( ((LA13_0>='0' && LA13_0<='9')) ) { alt13=1; } switch (alt13) { case 1 : // E:\\BlueDragon\\OpenBD_ANTLR\\src\\com\\naryx\\tagfusion\\cfm\\parser\\CFML.g:331:5: DecimalDigit { mDecimalDigit(); } break; default : if ( cnt13 >= 1 ) break loop13; EarlyExitException eee = new EarlyExitException(13, input); throw eee; } cnt13++; } while (true); } state.type = _type; state.channel = _channel; } finally { } }
public final void mNUMBER() throws RecognitionException { try { int _type = NUMBER; int _channel = DEFAULT_TOKEN_CHANNEL; // /Users/hekanibru/Documents/DPhil/Prototype/Grammar/ConjunctiveQueries.g:326:9: ( ( '0' .. '9' )+ ) // /Users/hekanibru/Documents/DPhil/Prototype/Grammar/ConjunctiveQueries.g:326:11: ( '0' .. '9' )+ { // /Users/hekanibru/Documents/DPhil/Prototype/Grammar/ConjunctiveQueries.g:326:11: ( '0' .. '9' )+ int cnt1=0; loop1: do { int alt1=2; int LA1_0 = input.LA(1); if ( ((LA1_0>='0' && LA1_0<='9')) ) { alt1=1; } switch (alt1) { case 1 : // /Users/hekanibru/Documents/DPhil/Prototype/Grammar/ConjunctiveQueries.g:326:11: '0' .. '9' { matchRange('0','9'); } break; default : if ( cnt1 >= 1 ) break loop1; EarlyExitException eee = new EarlyExitException(1, input); throw eee; } cnt1++; } while (true); } state.type = _type; state.channel = _channel; } finally { } }
public final void mALPHA() throws RecognitionException { try { // /Users/hekanibru/Documents/DPhil/Prototype/Grammar/ConjunctiveQueries.g:336:9: ( ( 'a' .. 'z' | 'A' .. 'Z' )+ ) // /Users/hekanibru/Documents/DPhil/Prototype/Grammar/ConjunctiveQueries.g:336:13: ( 'a' .. 'z' | 'A' .. 'Z' )+ { // /Users/hekanibru/Documents/DPhil/Prototype/Grammar/ConjunctiveQueries.g:336:13: ( 'a' .. 'z' | 'A' .. 'Z' )+ int cnt4=0; loop4: do { int alt4=2; int LA4_0 = input.LA(1); if ( ((LA4_0>='A' && LA4_0<='Z')||(LA4_0>='a' && LA4_0<='z')) ) { alt4=1; } switch (alt4) { case 1 : // /Users/hekanibru/Documents/DPhil/Prototype/Grammar/ConjunctiveQueries.g: { if ( (input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) { input.consume(); } else { MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse;} } break; default : if ( cnt4 >= 1 ) break loop4; EarlyExitException eee = new EarlyExitException(4, input); throw eee; } cnt4++; } while (true); } } finally { } }
public final void mINT() throws RecognitionException { try { // /Users/hekanibru/Documents/DPhil/Prototype/Grammar/ConjunctiveQueries.g:339:7: ( ( '0' .. '9' )+ ) // /Users/hekanibru/Documents/DPhil/Prototype/Grammar/ConjunctiveQueries.g:339:11: ( '0' .. '9' )+ { // /Users/hekanibru/Documents/DPhil/Prototype/Grammar/ConjunctiveQueries.g:339:11: ( '0' .. '9' )+ int cnt5=0; loop5: do { int alt5=2; int LA5_0 = input.LA(1); if ( ((LA5_0>='0' && LA5_0<='9')) ) { alt5=1; } switch (alt5) { case 1 : // /Users/hekanibru/Documents/DPhil/Prototype/Grammar/ConjunctiveQueries.g:339:11: '0' .. '9' { matchRange('0','9'); } break; default : if ( cnt5 >= 1 ) break loop5; EarlyExitException eee = new EarlyExitException(5, input); throw eee; } cnt5++; } while (true); } } finally { } }
public final void mWhiteChar() throws RecognitionException { try { int _type = WhiteChar; int _channel = DEFAULT_TOKEN_CHANNEL; // com/finance/pms/events/calculation/parametrizedindicators/antlr/ParameterizedIndicators.g:282:7: ( ( ( ' ' )+ ) ) // com/finance/pms/events/calculation/parametrizedindicators/antlr/ParameterizedIndicators.g:282:9: ( ( ' ' )+ ) { // com/finance/pms/events/calculation/parametrizedindicators/antlr/ParameterizedIndicators.g:282:9: ( ( ' ' )+ ) // com/finance/pms/events/calculation/parametrizedindicators/antlr/ParameterizedIndicators.g:282:10: ( ' ' )+ { // com/finance/pms/events/calculation/parametrizedindicators/antlr/ParameterizedIndicators.g:282:10: ( ' ' )+ int cnt8=0; loop8: while (true) { int alt8=2; int LA8_0 = input.LA(1); if ( (LA8_0==' ') ) { alt8=1; } switch (alt8) { case 1 : // com/finance/pms/events/calculation/parametrizedindicators/antlr/ParameterizedIndicators.g:282:10: ' ' { match(' '); } break; default : if ( cnt8 >= 1 ) break loop8; EarlyExitException eee = new EarlyExitException(8, input); throw eee; } cnt8++; } } } state.type = _type; state.channel = _channel; } finally { // do for sure before leaving } }
public final void mTcheat() throws RecognitionException { try { int _type = Tcheat; int _channel = DEFAULT_TOKEN_CHANNEL; // com/finance/pms/events/calculation/parametrizedindicators/antlr/ParameterizedIndicators.g:286:6: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )+ ) // com/finance/pms/events/calculation/parametrizedindicators/antlr/ParameterizedIndicators.g:286:8: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )+ { // com/finance/pms/events/calculation/parametrizedindicators/antlr/ParameterizedIndicators.g:286:8: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )+ int cnt9=0; loop9: while (true) { int alt9=2; int LA9_0 = input.LA(1); if ( ((LA9_0 >= '0' && LA9_0 <= '9')||(LA9_0 >= 'A' && LA9_0 <= 'Z')||(LA9_0 >= 'a' && LA9_0 <= 'z')) ) { alt9=1; } switch (alt9) { case 1 : // com/finance/pms/events/calculation/parametrizedindicators/antlr/ParameterizedIndicators.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 { MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse; } } break; default : if ( cnt9 >= 1 ) break loop9; EarlyExitException eee = new EarlyExitException(9, input); throw eee; } cnt9++; } } state.type = _type; state.channel = _channel; } finally { // do for sure before leaving } }
public final void mStringToken() throws RecognitionException { try { int _type = StringToken; int _channel = DEFAULT_TOKEN_CHANNEL; // com/finance/pms/events/operations/parameterized/antlr/ParameterizedOperations.g:146:6: ( '\"' ( 'a' .. 'z' | 'A' .. 'Z' | '.' | '_' )+ '\"' ) // com/finance/pms/events/operations/parameterized/antlr/ParameterizedOperations.g:146:8: '\"' ( 'a' .. 'z' | 'A' .. 'Z' | '.' | '_' )+ '\"' { match('\"'); // com/finance/pms/events/operations/parameterized/antlr/ParameterizedOperations.g:146:12: ( 'a' .. 'z' | 'A' .. 'Z' | '.' | '_' )+ int cnt9=0; loop9: while (true) { int alt9=2; int LA9_0 = input.LA(1); if ( (LA9_0=='.'||(LA9_0 >= 'A' && LA9_0 <= 'Z')||LA9_0=='_'||(LA9_0 >= 'a' && LA9_0 <= 'z')) ) { alt9=1; } switch (alt9) { case 1 : // com/finance/pms/events/operations/parameterized/antlr/ParameterizedOperations.g: { if ( input.LA(1)=='.'||(input.LA(1) >= 'A' && input.LA(1) <= 'Z')||input.LA(1)=='_'||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) { input.consume(); } else { MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse; } } break; default : if ( cnt9 >= 1 ) break loop9; EarlyExitException eee = new EarlyExitException(9, input); throw eee; } cnt9++; } match('\"'); } state.type = _type; state.channel = _channel; } finally { // do for sure before leaving } }
public final void mOutputSelector() throws RecognitionException { try { int _type = OutputSelector; int _channel = DEFAULT_TOKEN_CHANNEL; // com/finance/pms/events/operations/parameterized/antlr/ParameterizedOperations.g:149:6: ( ':' ( 'a' .. 'z' | 'A' .. 'Z' )+ ) // com/finance/pms/events/operations/parameterized/antlr/ParameterizedOperations.g:149:8: ':' ( 'a' .. 'z' | 'A' .. 'Z' )+ { match(':'); // com/finance/pms/events/operations/parameterized/antlr/ParameterizedOperations.g:149:12: ( 'a' .. 'z' | 'A' .. 'Z' )+ int cnt10=0; loop10: while (true) { int alt10=2; int LA10_0 = input.LA(1); if ( ((LA10_0 >= 'A' && LA10_0 <= 'Z')||(LA10_0 >= 'a' && LA10_0 <= 'z')) ) { alt10=1; } switch (alt10) { case 1 : // com/finance/pms/events/operations/parameterized/antlr/ParameterizedOperations.g: { if ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z')||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) { input.consume(); } else { MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse; } } break; default : if ( cnt10 >= 1 ) break loop10; EarlyExitException eee = new EarlyExitException(10, input); throw eee; } cnt10++; } } state.type = _type; state.channel = _channel; } finally { // do for sure before leaving } }
public final TranslateCIMParser.flavorList_return flavorList() throws RecognitionException { TranslateCIMParser.flavorList_return retval = new TranslateCIMParser.flavorList_return(); retval.start = input.LT(1); try { // com\\kyben\\translatecim\\TranslateCIM.g:933:5: ( COLON ( flavor )+ ) // com\\kyben\\translatecim\\TranslateCIM.g:933:7: COLON ( flavor )+ { match(input, COLON, FOLLOW_COLON_in_flavorList3045); // com\\kyben\\translatecim\\TranslateCIM.g:933:13: ( flavor )+ int cnt28 = 0; loop28: do { int alt28 = 2; int LA28_0 = input.LA(1); if (((LA28_0 >= ENABLEOVERRIDE && LA28_0 <= TRANSLATABLE))) { alt28 = 1; } switch (alt28) { case 1: // com\\kyben\\translatecim\\TranslateCIM.g:933:13: flavor { pushFollow(FOLLOW_flavor_in_flavorList3047); flavor(); state._fsp--; } break; default: if (cnt28 >= 1) break loop28; EarlyExitException eee = new EarlyExitException(28, input); throw eee; } cnt28++; } while (true); } retval.stop = input.LT(-1); } catch (RecognitionException re) { reportError(re); recover(input, re); } finally { } return retval; }
public final TranslateCIMParser.stringConstant_return stringConstant() throws RecognitionException { TranslateCIMParser.stringConstant_return retval = new TranslateCIMParser.stringConstant_return(); retval.start = input.LT(1); Token strs = null; List list_strs = null; try { // com\\kyben\\translatecim\\TranslateCIM.g:1021:5: ( (strs+= DoubleQuotedString )+ ) // com\\kyben\\translatecim\\TranslateCIM.g:1021:7: (strs+= DoubleQuotedString )+ { // com\\kyben\\translatecim\\TranslateCIM.g:1021:11: (strs+= DoubleQuotedString )+ int cnt36 = 0; loop36: do { int alt36 = 2; int LA36_0 = input.LA(1); if ((LA36_0 == DoubleQuotedString)) { alt36 = 1; } switch (alt36) { case 1: // com\\kyben\\translatecim\\TranslateCIM.g:1021:11: strs+= DoubleQuotedString { strs = (Token) match(input, DoubleQuotedString, FOLLOW_DoubleQuotedString_in_stringConstant3660); if (list_strs == null) list_strs = new ArrayList(); list_strs.add(strs); } break; default: if (cnt36 >= 1) break loop36; EarlyExitException eee = new EarlyExitException(36, input); throw eee; } cnt36++; } while (true); StringBuilder retstr = new StringBuilder(list_strs.size() * 60); // for speed, estimate the initial size ListIterator lstrs = list_strs.listIterator(); while (lstrs.hasNext()) { String dqString = ((Token) lstrs.next()).getText(); String bareString = dqString.substring(1, dqString.length() - 1); // strip off the leading and trailing double quotes bareString = bareString.replaceAll("\\\\'", "'"); bareString = bareString.replaceAll("\\\\\"", "\""); bareString = bareString.replaceAll("\\\\n", "\n"); retstr.append(bareString); } retval.string = retstr.toString(); } retval.stop = input.LT(-1); } catch (RecognitionException re) { reportError(re); recover(input, re); } finally { } return retval; }
public final void mINT() throws RecognitionException { try { int _type = INT; int _channel = DEFAULT_TOKEN_CHANNEL; // org/usergrid/persistence/query/QueryFilter.g:48:5: ( ( '-' )? ( '0' .. '9' )+ ) // org/usergrid/persistence/query/QueryFilter.g:48:7: ( '-' )? ( '0' .. '9' )+ { // org/usergrid/persistence/query/QueryFilter.g:48:7: ( '-' )? int alt2 = 2; int LA2_0 = input.LA( 1 ); if ( ( LA2_0 == '-' ) ) { alt2 = 1; } switch ( alt2 ) { case 1: // org/usergrid/persistence/query/QueryFilter.g:48:8: '-' { match( '-' ); } break; } // org/usergrid/persistence/query/QueryFilter.g:48:14: ( '0' .. '9' )+ int cnt3 = 0; loop3: do { int alt3 = 2; int LA3_0 = input.LA( 1 ); if ( ( ( LA3_0 >= '0' && LA3_0 <= '9' ) ) ) { alt3 = 1; } switch ( alt3 ) { case 1: // org/usergrid/persistence/query/QueryFilter.g:48:14: '0' .. '9' { matchRange( '0', '9' ); } break; default: if ( cnt3 >= 1 ) { break loop3; } EarlyExitException eee = new EarlyExitException( 3, input ); throw eee; } cnt3++; } while ( true ); } state.type = _type; state.channel = _channel; } finally { } }
public final void mWS() throws RecognitionException { try { int _type = WS; int _channel = DEFAULT_TOKEN_CHANNEL; // org/usergrid/persistence/query/QueryFilter.g:99:4: ( ( ' ' | '\\t' | '\\n' | '\\r' | '\\f' )+ ) // org/usergrid/persistence/query/QueryFilter.g:99:6: ( ' ' | '\\t' | '\\n' | '\\r' | '\\f' )+ { // org/usergrid/persistence/query/QueryFilter.g:99:6: ( ' ' | '\\t' | '\\n' | '\\r' | '\\f' )+ int cnt18 = 0; loop18: do { int alt18 = 2; int LA18_0 = input.LA( 1 ); if ( ( ( LA18_0 >= '\t' && LA18_0 <= '\n' ) || ( LA18_0 >= '\f' && LA18_0 <= '\r' ) || LA18_0 == ' ' ) ) { alt18 = 1; } switch ( alt18 ) { case 1: // org/usergrid/persistence/query/QueryFilter.g: { if ( ( input.LA( 1 ) >= '\t' && input.LA( 1 ) <= '\n' ) || ( input.LA( 1 ) >= '\f' && input.LA( 1 ) <= '\r' ) || input.LA( 1 ) == ' ' ) { input.consume(); } else { MismatchedSetException mse = new MismatchedSetException( null, input ); recover( mse ); throw mse; } } break; default: if ( cnt18 >= 1 ) { break loop18; } EarlyExitException eee = new EarlyExitException( 18, input ); throw eee; } cnt18++; } while ( true ); _channel = HIDDEN; } state.type = _type; state.channel = _channel; } finally { } }