/** * Defines a production which can never be accepted by the parser. * In effect, it tells the parser, "If you got here, you've gone too far." * It is used as the default production for parser extension points; * derived parsers replace it with a real production when they want to * implement a particular extension point. */ final public void UnusedExtension() throws ParseException { if (false) { } else { jj_consume_token(-1); throw new ParseException(); } jj_consume_token(ZONE); }
SqlIntervalLiteral parseIntervalLiteral(SqlParserPos pos, int sign, String s, SqlIntervalQualifier intervalQualifier) throws ParseException, ParseException { String intervalStr = SqlParserUtil.parseString(s); if ("".equals(intervalStr)) { throw new ParseException( RESOURCE.illegalIntervalLiteral(s + " " + intervalQualifier.toString(), pos.toString()).str()); } return SqlLiteral.createInterval(sign, intervalStr, intervalQualifier, pos); }
final public String Scope() throws ParseException { if (jj_2_254(2)) { jj_consume_token(SYSTEM); } else if (jj_2_255(2)) { jj_consume_token(SESSION); } else { jj_consume_token(-1); throw new ParseException(); } {if (true) return token.image.toUpperCase();} throw new Error("Missing return statement in function"); }
/** * Defines a production which can never be accepted by the parser. * In effect, it tells the parser, "If you got here, you've gone too far." * It is used as the default production for parser extension points; * derived parsers replace it with a real production when they want to * implement a particular extension point. */ final public void UnusedExtension() throws ParseException { if (false) { } else { jj_consume_token(-1); throw new ParseException(); } jj_consume_token(ZONE); }
/** * Parses the name of a function (either a compound identifier or * a reserved word which can be used as a function name). */ final public SqlIdentifier FunctionName() throws ParseException { SqlIdentifier qualifiedName; if (jj_2_511(2)) { qualifiedName = CompoundIdentifier(); } else if (jj_2_512(2)) { qualifiedName = ReservedFunctionName(); } else { jj_consume_token(-1); throw new ParseException(); } {if (true) return qualifiedName;} throw new Error("Missing return statement in function"); }
/** * Parses either a row expression, a leaf query expression, or * a parenthesized expression of any kind. */ final public SqlNode LeafQueryOrExpr(ExprContext exprContext) throws ParseException { SqlNode e; if (jj_2_195(2)) { e = Expression(exprContext); {if (true) return e;} } else if (jj_2_196(2)) { e = LeafQuery(exprContext); {if (true) return e;} } else { jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
SqlIntervalLiteral parseIntervalLiteral(SqlParserPos pos, int sign, String s, SqlIntervalQualifier intervalQualifier) throws ParseException, ParseException { String intervalStr = SqlParserUtil.parseString(s); if ("".equals(intervalStr)) { throw new ParseException( RESOURCE.illegalIntervalLiteral(s + " " + intervalQualifier.toString(), pos.toString()).str()); } return SqlLiteral.createInterval(sign, intervalStr, intervalQualifier, pos); }
/** * Parses one unaliased expression in a select list. */ final public SqlNode SelectExpression() throws ParseException { SqlNode e; if (jj_2_106(2)) { jj_consume_token(STAR); {if (true) return SqlIdentifier.star(getPos());} } else if (jj_2_107(2)) { e = Expression(ExprContext.ACCEPT_SUB_QUERY); {if (true) return e;} } else { jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
final public String Scope() throws ParseException { if (jj_2_254(2)) { jj_consume_token(SYSTEM); } else if (jj_2_255(2)) { jj_consume_token(SESSION); } else { jj_consume_token(-1); throw new ParseException(); } {if (true) return token.image.toUpperCase();} throw new Error("Missing return statement in function"); }
/** * Parses a leaf in a query expression (SELECT, VALUES or TABLE). */ final public SqlNode LeafQuery(ExprContext exprContext) throws ParseException { SqlNode e; if (jj_2_14(2)) { // ensure a query is legal in this context checkQueryExpression(exprContext); e = SqlSelect(); {if (true) return e;} } else if (jj_2_15(2)) { e = TableConstructor(); {if (true) return e;} } else if (jj_2_16(2)) { e = ExplicitTable(getPos()); {if (true) return e;} } else { jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
/** * Parses the name of a function (either a compound identifier or * a reserved word which can be used as a function name). */ final public SqlIdentifier FunctionName() throws ParseException { SqlIdentifier qualifiedName; if (jj_2_511(2)) { qualifiedName = CompoundIdentifier(); } else if (jj_2_512(2)) { qualifiedName = ReservedFunctionName(); } else { jj_consume_token(-1); throw new ParseException(); } {if (true) return qualifiedName;} throw new Error("Missing return statement in function"); }
/** * Parses either a row expression, a leaf query expression, or * a parenthesized expression of any kind. */ final public SqlNode LeafQueryOrExpr(ExprContext exprContext) throws ParseException { SqlNode e; if (jj_2_195(2)) { e = Expression(exprContext); {if (true) return e;} } else if (jj_2_196(2)) { e = LeafQuery(exprContext); {if (true) return e;} } else { jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
final public SqlCall SequenceExpression() throws ParseException { final SqlParserPos pos; final SqlOperator f; final SqlNode sequenceRef; if (jj_2_245(2)) { jj_consume_token(NEXT); f = SqlStdOperatorTable.NEXT_VALUE; pos = getPos(); } else if (jj_2_246(2)) { jj_consume_token(CURRENT); f = SqlStdOperatorTable.CURRENT_VALUE; pos = getPos(); } else { jj_consume_token(-1); throw new ParseException(); } jj_consume_token(VALUE); jj_consume_token(FOR); sequenceRef = CompoundIdentifier(); {if (true) return f.createCall(pos, sequenceRef);} throw new Error("Missing return statement in function"); }
/** Parses a unsigned numeric literal */ final public SqlNumericLiteral UnsignedNumericLiteral() throws ParseException { if (jj_2_261(2)) { jj_consume_token(UNSIGNED_INTEGER_LITERAL); {if (true) return SqlLiteral.createExactNumeric(token.image, getPos());} } else if (jj_2_262(2)) { jj_consume_token(DECIMAL_NUMERIC_LITERAL); {if (true) return SqlLiteral.createExactNumeric(token.image, getPos());} } else if (jj_2_263(2)) { jj_consume_token(APPROX_NUMERIC_LITERAL); {if (true) return SqlLiteral.createApproxNumeric(token.image, getPos());} } else { jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
/** * Parses one unaliased expression in a select list. */ final public SqlNode SelectExpression() throws ParseException { SqlNode e; if (jj_2_106(2)) { jj_consume_token(STAR); {if (true) return SqlIdentifier.star(getPos());} } else if (jj_2_107(2)) { e = Expression(ExprContext.ACCEPT_SUB_QUERY); {if (true) return e;} } else { jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
/** Parse a special literal keyword */ final public SqlLiteral SpecialLiteral() throws ParseException { if (jj_2_267(2)) { jj_consume_token(TRUE); {if (true) return SqlLiteral.createBoolean(true, getPos());} } else if (jj_2_268(2)) { jj_consume_token(FALSE); {if (true) return SqlLiteral.createBoolean(false, getPos());} } else if (jj_2_269(2)) { jj_consume_token(UNKNOWN); {if (true) return SqlLiteral.createUnknown(getPos());} } else if (jj_2_270(2)) { jj_consume_token(NULL); {if (true) return SqlLiteral.createNull(getPos());} } else { jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
final public SqlCall SequenceExpression() throws ParseException { final SqlParserPos pos; final SqlOperator f; final SqlNode sequenceRef; if (jj_2_245(2)) { jj_consume_token(NEXT); f = SqlStdOperatorTable.NEXT_VALUE; pos = getPos(); } else if (jj_2_246(2)) { jj_consume_token(CURRENT); f = SqlStdOperatorTable.CURRENT_VALUE; pos = getPos(); } else { jj_consume_token(-1); throw new ParseException(); } jj_consume_token(VALUE); jj_consume_token(FOR); sequenceRef = CompoundIdentifier(); {if (true) return f.createCall(pos, sequenceRef);} throw new Error("Missing return statement in function"); }
/** Parses a query (SELECT or VALUES) * or DML statement (INSERT, UPDATE, DELETE, MERGE). */ final public SqlNode SqlQueryOrDml() throws ParseException { SqlNode stmt; if (jj_2_58(2)) { stmt = OrderedQueryOrExpr(ExprContext.ACCEPT_QUERY); } else if (jj_2_59(2)) { stmt = SqlInsert(); } else if (jj_2_60(2)) { stmt = SqlDelete(); } else if (jj_2_61(2)) { stmt = SqlUpdate(); } else if (jj_2_62(2)) { stmt = SqlMerge(); } else { jj_consume_token(-1); throw new ParseException(); } {if (true) return stmt;} throw new Error("Missing return statement in function"); }
/** Parses a unsigned numeric literal */ final public SqlNumericLiteral UnsignedNumericLiteral() throws ParseException { if (jj_2_261(2)) { jj_consume_token(UNSIGNED_INTEGER_LITERAL); {if (true) return SqlLiteral.createExactNumeric(token.image, getPos());} } else if (jj_2_262(2)) { jj_consume_token(DECIMAL_NUMERIC_LITERAL); {if (true) return SqlLiteral.createExactNumeric(token.image, getPos());} } else if (jj_2_263(2)) { jj_consume_token(APPROX_NUMERIC_LITERAL); {if (true) return SqlLiteral.createApproxNumeric(token.image, getPos());} } else { jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
/** Parse a special literal keyword */ final public SqlLiteral SpecialLiteral() throws ParseException { if (jj_2_267(2)) { jj_consume_token(TRUE); {if (true) return SqlLiteral.createBoolean(true, getPos());} } else if (jj_2_268(2)) { jj_consume_token(FALSE); {if (true) return SqlLiteral.createBoolean(false, getPos());} } else if (jj_2_269(2)) { jj_consume_token(UNKNOWN); {if (true) return SqlLiteral.createUnknown(getPos());} } else if (jj_2_270(2)) { jj_consume_token(NULL); {if (true) return SqlLiteral.createNull(getPos());} } else { jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }