exptokseq[i] = jj_expentries.get(i); return new ParseException(token, exptokseq, tokenImage);
retval += add_escapes(tok.image); retval += " \""; tok = tok.next;
/** * This constructor is used by the method "generateParseException" * in the generated parser. Calling this constructor generates * a new object of this type with the fields "currentToken", * "expectedTokenSequences", and "tokenImage" set. */ public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal, String lexicalStateName ) { super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal, lexicalStateName)); currentToken = currentTokenVal; expectedTokenSequences = expectedTokenSequencesVal; tokenImage = tokenImageVal; }
void error_skipto(int kind) throws ParseException {ParseException e = generateParseException(); System.out.println(e.toString()); Token t; do { t = getNextToken(); } while (t.kind != kind && t.kind != EOF); }
public static ParseException convertParseException(net.sf.jsqlparser.parser.ParseException incomingException) { try { return new ParseException(new Token(incomingException.currentToken.kind, incomingException.currentToken.image), incomingException.expectedTokenSequences, incomingException.tokenImage); } catch (NullPointerException e1) { if (incomingException.getMessage().startsWith("Encountered \" \"(\" \"( \"\"")) { return new ParseException("Only one simple table name is supported."); } if (incomingException.getMessage().startsWith("Encountered unexpected token: \"=\" \"=\"")) { return new ParseException("unable to parse complete sql string. one reason for this is the use of double equals (==)."); } if (incomingException.getMessage().contains("Was expecting:" + LINE_SEPARATOR + " \"SELECT\"")) { return new ParseException("Only select statements are supported."); } if (incomingException.getMessage()!=null) { return new ParseException(incomingException.getMessage()); } return new ParseException("Count not parseNaturalLanguageDate query."); } }
void error_skipto(int kind) throws ParseException {ParseException e = generateParseException(); System.out.println(e.toString()); Token t; do { t = getNextToken(); } while (t.kind != kind && t.kind != EOF); }
exptokseq[i] = jj_expentries.get(i); return new ParseException(token, exptokseq, tokenImage, token_source == null ? null : CCJSqlParserTokenManager.lexStateNames[token_source.curLexState]);
/** * This constructor is used by the method "generateParseException" * in the generated parser. Calling this constructor generates * a new object of this type with the fields "currentToken", * "expectedTokenSequences", and "tokenImage" set. */ public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal ) { super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal)); currentToken = currentTokenVal; expectedTokenSequences = expectedTokenSequencesVal; tokenImage = tokenImageVal; }
for (int i = 0; i < maxSize; i++) { String tokenText = tok.image; String escapedTokenText = add_escapes(tokenText); if (i != 0) { sb.append(" ");
final public String Identifier() throws ParseException {Token tk = null; switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { case S_IDENTIFIER:{ tk = jj_consume_token(S_IDENTIFIER); break; } case S_QUOTED_IDENTIFIER:{ tk = jj_consume_token(S_QUOTED_IDENTIFIER); break; } default: jj_la1[127] = jj_gen; jj_consume_token(-1); throw new ParseException(); } return tk.image; }
/** * This constructor is used by the method "generateParseException" * in the generated parser. Calling this constructor generates * a new object of this type with the fields "currentToken", * "expectedTokenSequences", and "tokenImage" set. */ public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal ) { super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal)); currentToken = currentTokenVal; expectedTokenSequences = expectedTokenSequencesVal; tokenImage = tokenImageVal; }
retval += add_escapes(tok.image); retval += " \""; tok = tok.next;
final public String RelObjectName() throws ParseException { Token tk = null; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case S_IDENTIFIER: tk = jj_consume_token(S_IDENTIFIER); break; case S_QUOTED_IDENTIFIER: tk = jj_consume_token(S_QUOTED_IDENTIFIER); break; default: jj_la1[19] = jj_gen; jj_consume_token(-1); throw new ParseException(); } {if (true) return tk.image;} throw new Error("Missing return statement in function"); }
/** * This constructor is used by the method "generateParseException" * in the generated parser. Calling this constructor generates * a new object of this type with the fields "currentToken", * "expectedTokenSequences", and "tokenImage" set. */ public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal ) { super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal)); currentToken = currentTokenVal; expectedTokenSequences = expectedTokenSequencesVal; tokenImage = tokenImageVal; }
retval += add_escapes(tok.image); retval += " \""; tok = tok.next;
final public SelectBody SelectBody() throws ParseException { SelectBody selectBody = null; if (jj_2_5(2147483647)) { selectBody = Union(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case K_SELECT: selectBody = PlainSelect(); break; default: jj_la1[23] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } {if (true) return selectBody;} throw new Error("Missing return statement in function"); }
/** * This constructor is used by the method "generateParseException" * in the generated parser. Calling this constructor generates * a new object of this type with the fields "currentToken", * "expectedTokenSequences", and "tokenImage" set. */ public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal, String lexicalStateName ) { super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal, lexicalStateName)); currentToken = currentTokenVal; expectedTokenSequences = expectedTokenSequencesVal; tokenImage = tokenImageVal; }
for (int i = 0; i < maxSize; i++) { String tokenText = tok.image; String escapedTokenText = add_escapes(tokenText); if (i != 0) { sb.append(" ");
jj_la1[230] = jj_gen; jj_consume_token(-1); throw new ParseException(); jj_la1[231] = jj_gen; jj_consume_token(-1); throw new ParseException();
jj_la1[232] = jj_gen; jj_consume_token(-1); throw new ParseException(); jj_la1[233] = jj_gen; jj_consume_token(-1); throw new ParseException();