int LA49_0 = input.LA(1); if ( (LA49_0=='\\') ) { alt49=1; new NoViableAltException("", 49, 0, input); throw nvae; if ( (input.LA(1) >= '\u0000' && input.LA(1) <= '\b')||(input.LA(1) >= '\u000B' && input.LA(1) <= '\f')||(input.LA(1) >= '\u000E' && input.LA(1) <= '\u001F')||(input.LA(1) >= '!' && 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) <= '[')||(input.LA(1) >= ']' && input.LA(1) <= 'z')||input.LA(1)=='|'||(input.LA(1) >= '~' && input.LA(1) <= '\uFFFF') ) { input.consume(); MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse;
int LA48_0 = input.LA(1); if ( (LA48_0=='i') ) { int LA48_1 = input.LA(2); if ( (LA48_1=='n') ) { int LA48_2 = input.LA(3); if ( (LA48_2=='v') ) { int LA48_3 = input.LA(4); if ( (LA48_3=='o') ) { int LA48_4 = input.LA(5); if ( (LA48_4=='k') ) { int LA48_5 = input.LA(6); if ( (LA48_5=='e') ) { int LA48_6 = input.LA(7); if ( (LA48_6=='s') ) { int LA48_7 = input.LA(8); if ( (LA48_7=='t') ) { alt48=1; int nvaeMark = input.mark(); try { for (int nvaeConsume = 0; nvaeConsume < 8 - 1; nvaeConsume++) { input.consume(); new NoViableAltException("", 48, 7, input); throw nvae; } finally { input.rewind(nvaeMark); int nvaeMark = input.mark();
public final void mFRAGMENT_PRIMITIVE_TYPE() throws RecognitionException { try { // com/googlecode/d2j/jasmin/Jasmin.g:847:24: ( 'B' | 'Z' | 'S' | 'C' | 'I' | 'F' | 'J' | 'D' ) // com/googlecode/d2j/jasmin/Jasmin.g: { if ( (input.LA(1) >= 'B' && input.LA(1) <= 'D')||input.LA(1)=='F'||(input.LA(1) >= 'I' && input.LA(1) <= 'J')||input.LA(1)=='S'||input.LA(1)=='Z' ) { input.consume(); } else { MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse; } } } finally { // do for sure before leaving } } // $ANTLR end "FRAGMENT_PRIMITIVE_TYPE"
public final boolean synpred5_DefineStatementLexer() { state.backtracking++; int start = input.mark(); try { synpred5_DefineStatementLexer_fragment(); // can never throw exception } catch (RecognitionException re) { System.err.println("impossible: "+re); } boolean success = !state.failed; input.rewind(start); state.backtracking--; state.failed=false; return success; }
int LA11_0 = input.LA(1); if ( (LA11_0=='=') ) { int LA11_1 = input.LA(2); if ( (LA11_1=='=') ) { alt11=2; new NoViableAltException("", 11, 0, input); throw nvae;
public Token nextToken() { while (true) { if ( input.LA(1)==CharStream.EOF ) { Token eof = new CommonToken((CharStream)input,Token.EOF, Token.DEFAULT_CHANNEL, input.index(),input.index()); eof.setLine(getLine()); eof.setCharPositionInLine(getCharPositionInLine()); state.tokenStartCharIndex = input.index(); state.tokenStartCharPositionInLine = input.getCharPositionInLine(); state.tokenStartLine = input.getLine(); state.text = null; try { int m = input.mark(); state.backtracking=1; state.failed=false; state.backtracking=0; if ( state.failed ) { input.rewind(m); input.consume();
int LA7_0 = input.LA(1); else if ( (LA7_0==':') && (((input.LA(2) != ':')||(input.LA(2) == ':')))) { alt7=1; new NoViableAltException("", 7, 0, input); do { int alt6=31; int LA6_0 = input.LA(1); int LA6_3 = input.LA(2); else if ( (LA6_3=='?') && ((input.LA(2) == '?'))) { alt6=30; alt6=9; else if ( (LA6_0==':') && (((input.LA(2) != ':')||(input.LA(2) == ':')))) { int LA6_12 = input.LA(2); if ( (LA6_12==':') && ((input.LA(2) == ':'))) { alt6=10; else if ( (LA6_12=='=') && ((input.LA(2) != ':'))) { alt6=29;
do { int alt5=2; int LA5_0 = input.LA(1); if ( cnt5 >= 1 ) break loop5; EarlyExitException eee = new EarlyExitException(5, input); throw eee;
public final void mQUESTION() throws RecognitionException { try { // org/jdbi/v3/core/internal/lexer/ColonStatementLexer.g:20:18: ({...}? => '?' ) // org/jdbi/v3/core/internal/lexer/ColonStatementLexer.g:20:20: {...}? => '?' { if ( !((input.LA(2) != '?')) ) { throw new FailedPredicateException(input, "QUESTION", "input.LA(2) != '?'"); } match('?'); } } finally { // do for sure before leaving } } // $ANTLR end "QUESTION"
AntlrPosition(final int tokenType, CharStream stream) { this.index = stream.index(); this.linePosition = stream.getLine(); this.charPosition = stream.getCharPositionInLine(); this.tokenType = tokenType; }
public void reportScanError(RecognitionException re) { CharStream cs = (CharStream)input; // print as good of a message as we can, given that we do not have // a Lexer object and, hence, cannot call the routine to get a // decent error message. System.err.println("problem matching token at "+ cs.getLine()+":"+cs.getCharPositionInLine()+" "+re); }
public boolean isValidBashComment() { try { return input.substring(input.index() - input.getCharPositionInLine(), input.index() - 2).trim().length() == 0; } catch (Exception ex) { return false; } }
public final void mHEX_DIGIT() throws RecognitionException { try { // com/googlecode/d2j/jasmin/Jasmin.g:834:11: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) ) // com/googlecode/d2j/jasmin/Jasmin.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 { MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse; } } } finally { // do for sure before leaving } } // $ANTLR end "HEX_DIGIT"
int LA34_0 = input.LA(1); if ( (LA34_0=='v') ) { alt34=1; new NoViableAltException("", 34, 0, input); throw nvae;
switch ( input.LA(1) ) { case '\t': case '\n': default: NoViableAltException nvae = new NoViableAltException("", 7, 0, input); do { int alt6=29; switch ( input.LA(1) ) { case '.': case '0': case '?': int LA6_3 = input.LA(2); else if ( (LA6_3=='?') && ((input.LA(2) == '?'))) { alt6=28; if ( cnt6 >= 1 ) break loop6; EarlyExitException eee = new EarlyExitException(6, input); throw eee;
while (true) { int alt54=2; int LA54_0 = input.LA(1); if ( (LA54_0=='[') ) { alt54=1; EarlyExitException eee = new EarlyExitException(54, input); throw eee; while (true) { int alt55=2; int LA55_0 = input.LA(1); if ( (LA55_0=='[') ) { alt55=1; EarlyExitException eee = new EarlyExitException(55, input); throw eee;
public final void mDOUBLE_QUESTION() throws RecognitionException { try { // org/jdbi/v3/core/internal/lexer/ColonStatementLexer.g:21:25: ({...}? => '??' ) // org/jdbi/v3/core/internal/lexer/ColonStatementLexer.g:21:27: {...}? => '??' { if ( !((input.LA(2) == '?')) ) { throw new FailedPredicateException(input, "DOUBLE_QUESTION", "input.LA(2) == '?'"); } match("??"); } } finally { // do for sure before leaving } } // $ANTLR end "DOUBLE_QUESTION"
public Token newTokenFromPreviousChar(int ttype) { STToken t = new STToken(input, ttype, input.index()-1, input.index()-1); t.setLine(input.getLine()); t.setCharPositionInLine(input.getCharPositionInLine()-1); return t; }
public final boolean synpred1_DefineStatementLexer() { state.backtracking++; int start = input.mark(); try { synpred1_DefineStatementLexer_fragment(); // can never throw exception } catch (RecognitionException re) { System.err.println("impossible: "+re); } boolean success = !state.failed; input.rewind(start); state.backtracking--; state.failed=false; return success; } public final boolean synpred5_DefineStatementLexer() {
public void reportScanError(RecognitionException re) { CharStream cs = (CharStream)input; // print as good of a message as we can, given that we do not have // a Lexer object and, hence, cannot call the routine to get a // decent error message. System.err.println("problem matching token at "+ cs.getLine()+":"+cs.getCharPositionInLine()+" "+re); }