Package org.relique.jdbc.csv
Class ExpressionParser
- java.lang.Object
-
- org.relique.jdbc.csv.ExpressionParser
-
- All Implemented Interfaces:
ExpressionParserConstants
public class ExpressionParser extends java.lang.Object implements ExpressionParserConstants
-
-
Field Summary
Fields Modifier and Type Field Description Tokenjj_ntNext token.TokentokenCurrent token.ExpressionParserTokenManagertoken_sourceGenerated Token Manager.-
Fields inherited from interface org.relique.jdbc.csv.ExpressionParserConstants
ABS, AND, 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, LOWER, LTRIM, MAX, MIN, MINUS, MINUTE, MODULO, MONTH, NAME, NAMEASTERISK, NOT, NOTEQUALS, NULL, NULLIF, OFFSET, ON, OPENPARENTHESIS, OR, ORDER, OUTER, PLACEHOLDER, PLUS, QUOTEDTABLENAME, RIGHT, ROUND, RTRIM, SECOND, SELECT, SEMICOLON, SINGLELINECOMMENT, STRING, STRING_AGG, SUBSTRING, SUM, TABLENAME, THEN, tokenImage, TRIM, TYPESUFFIX, UNEXPECTED_CHAR, UNSIGNEDINT, UNSIGNEDNUMBER, UPPER, WHEN, WHERE, YEAR
-
-
Constructor Summary
Constructors Constructor Description ExpressionParser(java.io.InputStream stream)Constructor with InputStream.ExpressionParser(java.io.InputStream stream, java.lang.String encoding)Constructor with InputStream and supplied encodingExpressionParser(java.io.Reader stream)Constructor.ExpressionParser(ExpressionParserTokenManager tm)Constructor with generated Token Manager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringbinAddOp()ExpressionbinaryOperation()java.lang.StringbinMultiplyOp()ExpressioncolumnAlias()ExpressioncolumnName()ExpressioncountOperation()voiddisable_tracing()Disable tracing.voidenable_tracing()Enable tracing.java.lang.Objecteval(java.util.Map<java.lang.String,java.lang.Object> env)org.relique.jdbc.csv.ParsedTablefirstTableEntry()ParseExceptiongenerateParseException()Generate ParseException.java.sql.DategetCurrentDate()java.sql.TimegetCurrentTime()TokengetNextToken()Get the next Token.TokengetToken(int index)Get the specific Token.org.relique.jdbc.csv.ParsedExpressiongroupByEntry()org.relique.jdbc.csv.LogicalExpressioninListExpression(Expression arg)org.relique.jdbc.csv.ParsedTablejoinedTableEntry()ExpressionlogicalAndExpression()org.relique.jdbc.csv.ParsedExpressionlogicalExpression()ExpressionlogicalOrExpression()ExpressionlogicalUnaryExpression()java.util.List<org.relique.jdbc.csv.ParsedStatement>multipleStatements()ExpressionmultiplyOperation()ExpressionnumericConstant()org.relique.jdbc.csv.LogicalExpressiononEntry()org.relique.jdbc.csv.ParsedExpressionorderByEntry()voidparseGroupByEntry()voidparseLogicalExpression()java.util.List<org.relique.jdbc.csv.ParsedStatement>parseMultipleStatements()voidparseOrderByEntry()voidparseQueryEnvEntry()org.relique.jdbc.csv.ParsedStatementparseSingleStatement()org.relique.jdbc.csv.ParsedExpressionqueryEnvEntry()voidReInit(java.io.InputStream stream)Reinitialise.voidReInit(java.io.InputStream stream, java.lang.String encoding)Reinitialise.voidReInit(java.io.Reader stream)Reinitialise.voidReInit(ExpressionParserTokenManager tm)Reinitialise.ExpressionrelationalExpression()java.lang.StringrelOp()ExpressionsearchedCaseExpression()org.relique.jdbc.csv.ParsedStatementselectStatement()ExpressionsimpleCaseExpression()ExpressionsimpleExpression()org.relique.jdbc.csv.ParsedStatementsingleStatement()ExpressionstringConstant()java.lang.StringstringConstantAtom()org.relique.jdbc.csv.ParsedTabletableEntry()java.lang.StringtoString()
-
-
-
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(java.io.InputStream stream)
Constructor with InputStream.
-
ExpressionParser
public ExpressionParser(java.io.InputStream stream, java.lang.String encoding)Constructor with InputStream and supplied encoding
-
ExpressionParser
public ExpressionParser(java.io.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() throws ParseException- Throws:
ParseException
-
parseMultipleStatements
public java.util.List<org.relique.jdbc.csv.ParsedStatement> parseMultipleStatements() throws ParseException- Throws:
ParseException
-
eval
public java.lang.Object eval(java.util.Map<java.lang.String,java.lang.Object> env) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getCurrentDate
public java.sql.Date getCurrentDate()
-
getCurrentTime
public java.sql.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 java.util.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 java.lang.String relOp() throws ParseException- Throws:
ParseException
-
binAddOp
public final java.lang.String binAddOp() throws ParseException- Throws:
ParseException
-
binMultiplyOp
public final java.lang.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 java.lang.String stringConstantAtom() throws ParseException- Throws:
ParseException
-
columnAlias
public final Expression columnAlias() throws ParseException
- Throws:
ParseException
-
ReInit
public void ReInit(java.io.InputStream stream)
Reinitialise.
-
ReInit
public void ReInit(java.io.InputStream stream, java.lang.String encoding)Reinitialise.
-
ReInit
public void ReInit(java.io.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.
-
enable_tracing
public final void enable_tracing()
Enable tracing.
-
disable_tracing
public final void disable_tracing()
Disable tracing.
-
-