Package org.relique.jdbc.csv
Class ExpressionParser
- java.lang.Object
-
- org.relique.jdbc.csv.ExpressionParser
-
- All Implemented Interfaces:
ExpressionParserConstants
public class ExpressionParser extends Object implements ExpressionParserConstants
-
-
Field Summary
Fields Modifier and Type Field Description Token
jj_nt
Next token.Token
token
Current token.ExpressionParserTokenManager
token_source
Generated Token Manager.-
Fields inherited from interface org.relique.jdbc.csv.ExpressionParserConstants
ABS, AND, ARRAY_AGG, AS, ASC, ASTERISK, AVG, BETWEEN, BY, CASE, CLOSEPARENTHESIS, COALESCE, COMMA, CONCAT, COUNT, CROSS, CURRENT_DATE, CURRENT_TIME, DAYOFMONTH, DEFAULT, DERIVEDTABLEOPENPARENTHESIS, DESC, DIGITS, DISTINCT, DIVIDE, DOT, ELSE, END, EOF, EQUALS, ESCAPE, EXISTS, EXPONENT, FROM, FULL, GREATERTHAN, GREATERTHANEQUALS, GROUP, HAVING, HOUROFDAY, IN, IN_C_COMMENT, IN_TABLE, INNER, IS, JOIN, LEFT, LENGTH, LESSTHAN, LESSTHANEQUALS, LIKE, LIMIT, LINE_NUMBER, LOWER, LTRIM, MAX, MIN, MINUS, MINUTE, MODULO, MONTH, NAME, NAMEASTERISK, NOT, NOTEQUALS, NULL, NULLIF, OFFSET, ON, OPENPARENTHESIS, OR, ORDER, OUTER, PLACEHOLDER, PLUS, QUOTEDTABLENAME, RANDOM, REPLACE, RIGHT, ROUND, RTRIM, SECOND, SELECT, SEMICOLON, SINGLELINECOMMENT, STRING, STRING_AGG, SUBSTRING, SUM, TABLENAME, THEN, TO_ARRAY, TO_NUMBER, tokenImage, TRIM, TYPESUFFIX, UNEXPECTED_CHAR, UNSIGNEDINT, UNSIGNEDNUMBER, UPPER, WHEN, WHERE, YEAR
-
-
Constructor Summary
Constructors Constructor Description ExpressionParser(InputStream stream)
Constructor with InputStream.ExpressionParser(InputStream stream, String encoding)
Constructor with InputStream and supplied encodingExpressionParser(Reader stream)
Constructor.ExpressionParser(ExpressionParserTokenManager tm)
Constructor with generated Token Manager.
-
Method Summary
-
-
-
Field Detail
-
token_source
public ExpressionParserTokenManager token_source
Generated Token Manager.
-
token
public Token token
Current token.
-
jj_nt
public Token jj_nt
Next token.
-
-
Constructor Detail
-
ExpressionParser
public ExpressionParser(InputStream stream)
Constructor with InputStream.
-
ExpressionParser
public ExpressionParser(InputStream stream, String encoding)
Constructor with InputStream and supplied encoding
-
ExpressionParser
public ExpressionParser(Reader stream)
Constructor.
-
ExpressionParser
public ExpressionParser(ExpressionParserTokenManager tm)
Constructor with generated Token Manager.
-
-
Method Detail
-
parseLogicalExpression
public void parseLogicalExpression() throws ParseException
- Throws:
ParseException
-
parseGroupByEntry
public void parseGroupByEntry() throws ParseException
- Throws:
ParseException
-
parseOrderByEntry
public void parseOrderByEntry() throws ParseException
- Throws:
ParseException
-
parseQueryEnvEntry
public void parseQueryEnvEntry() throws ParseException
- Throws:
ParseException
-
parseSingleStatement
public org.relique.jdbc.csv.ParsedStatement parseSingleStatement(PlaceholderFactory factory) throws ParseException
- Throws:
ParseException
-
parseMultipleStatements
public List<org.relique.jdbc.csv.ParsedStatement> parseMultipleStatements(PlaceholderFactory factory) throws ParseException
- Throws:
ParseException
-
eval
public Object eval(Map<String,Object> env) throws SQLException
- Throws:
SQLException
-
getCurrentDate
public Date getCurrentDate()
-
getCurrentTime
public Time getCurrentTime()
-
logicalExpression
public final org.relique.jdbc.csv.ParsedExpression logicalExpression() throws ParseException
- Throws:
ParseException
-
firstTableEntry
public final org.relique.jdbc.csv.ParsedTable firstTableEntry() throws ParseException
- Throws:
ParseException
-
onEntry
public final org.relique.jdbc.csv.LogicalExpression onEntry() throws ParseException
- Throws:
ParseException
-
tableEntry
public final org.relique.jdbc.csv.ParsedTable tableEntry() throws ParseException
- Throws:
ParseException
-
joinedTableEntry
public final org.relique.jdbc.csv.ParsedTable joinedTableEntry() throws ParseException
- Throws:
ParseException
-
groupByEntry
public final org.relique.jdbc.csv.ParsedExpression groupByEntry() throws ParseException
- Throws:
ParseException
-
orderByEntry
public final org.relique.jdbc.csv.ParsedExpression orderByEntry() throws ParseException
- Throws:
ParseException
-
multipleStatements
public final List<org.relique.jdbc.csv.ParsedStatement> multipleStatements() throws ParseException
- Throws:
ParseException
-
singleStatement
public final org.relique.jdbc.csv.ParsedStatement singleStatement() throws ParseException
- Throws:
ParseException
-
selectStatement
public final org.relique.jdbc.csv.ParsedStatement selectStatement() throws ParseException
- Throws:
ParseException
-
queryEnvEntry
public final org.relique.jdbc.csv.ParsedExpression queryEnvEntry() throws ParseException
- Throws:
ParseException
-
logicalOrExpression
public final Expression logicalOrExpression() throws ParseException
- Throws:
ParseException
-
logicalAndExpression
public final Expression logicalAndExpression() throws ParseException
- Throws:
ParseException
-
logicalUnaryExpression
public final Expression logicalUnaryExpression() throws ParseException
- Throws:
ParseException
-
inListExpression
public final org.relique.jdbc.csv.LogicalExpression inListExpression(Expression arg) throws ParseException
- Throws:
ParseException
-
relationalExpression
public final Expression relationalExpression() throws ParseException
- Throws:
ParseException
-
relOp
public final String relOp() throws ParseException
- Throws:
ParseException
-
binAddOp
public final String binAddOp() throws ParseException
- Throws:
ParseException
-
binMultiplyOp
public final String binMultiplyOp() throws ParseException
- Throws:
ParseException
-
countOperation
public final Expression countOperation() throws ParseException
- Throws:
ParseException
-
binaryOperation
public final Expression binaryOperation() throws ParseException
- Throws:
ParseException
-
multiplyOperation
public final Expression multiplyOperation() throws ParseException
- Throws:
ParseException
-
simpleExpression
public final Expression simpleExpression() throws ParseException
- Throws:
ParseException
-
searchedCaseExpression
public final Expression searchedCaseExpression() throws ParseException
- Throws:
ParseException
-
simpleCaseExpression
public final Expression simpleCaseExpression() throws ParseException
- Throws:
ParseException
-
columnName
public final Expression columnName() throws ParseException
- Throws:
ParseException
-
numericConstant
public final Expression numericConstant() throws ParseException
- Throws:
ParseException
-
stringConstant
public final Expression stringConstant() throws ParseException
- Throws:
ParseException
-
stringConstantAtom
public final String stringConstantAtom() throws ParseException
- Throws:
ParseException
-
columnAlias
public final Expression columnAlias() throws ParseException
- Throws:
ParseException
-
ReInit
public void ReInit(InputStream stream)
Reinitialise.
-
ReInit
public void ReInit(InputStream stream, String encoding)
Reinitialise.
-
ReInit
public void ReInit(Reader stream)
Reinitialise.
-
ReInit
public void ReInit(ExpressionParserTokenManager tm)
Reinitialise.
-
getNextToken
public final Token getNextToken()
Get the next Token.
-
getToken
public final Token getToken(int index)
Get the specific Token.
-
generateParseException
public ParseException generateParseException()
Generate ParseException.
-
trace_enabled
public final boolean trace_enabled()
Trace enabled.
-
enable_tracing
public final void enable_tracing()
Enable tracing.
-
disable_tracing
public final void disable_tracing()
Disable tracing.
-
-