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 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, 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.String
binAddOp()
Expression
binaryOperation()
java.lang.String
binMultiplyOp()
Expression
columnAlias()
Expression
columnName()
Expression
countOperation()
void
disable_tracing()
Disable tracing.void
enable_tracing()
Enable tracing.java.lang.Object
eval(java.util.Map<java.lang.String,java.lang.Object> env)
org.relique.jdbc.csv.ParsedTable
firstTableEntry()
ParseException
generateParseException()
Generate ParseException.java.sql.Date
getCurrentDate()
java.sql.Time
getCurrentTime()
Token
getNextToken()
Get the next Token.Token
getToken(int index)
Get the specific Token.org.relique.jdbc.csv.ParsedExpression
groupByEntry()
org.relique.jdbc.csv.LogicalExpression
inListExpression(Expression arg)
org.relique.jdbc.csv.ParsedTable
joinedTableEntry()
Expression
logicalAndExpression()
org.relique.jdbc.csv.ParsedExpression
logicalExpression()
Expression
logicalOrExpression()
Expression
logicalUnaryExpression()
java.util.List<org.relique.jdbc.csv.ParsedStatement>
multipleStatements()
Expression
multiplyOperation()
Expression
numericConstant()
org.relique.jdbc.csv.LogicalExpression
onEntry()
org.relique.jdbc.csv.ParsedExpression
orderByEntry()
void
parseGroupByEntry()
void
parseLogicalExpression()
java.util.List<org.relique.jdbc.csv.ParsedStatement>
parseMultipleStatements()
void
parseOrderByEntry()
void
parseQueryEnvEntry()
org.relique.jdbc.csv.ParsedStatement
parseSingleStatement()
org.relique.jdbc.csv.ParsedExpression
queryEnvEntry()
void
ReInit(java.io.InputStream stream)
Reinitialise.void
ReInit(java.io.InputStream stream, java.lang.String encoding)
Reinitialise.void
ReInit(java.io.Reader stream)
Reinitialise.void
ReInit(ExpressionParserTokenManager tm)
Reinitialise.Expression
relationalExpression()
java.lang.String
relOp()
Expression
searchedCaseExpression()
org.relique.jdbc.csv.ParsedStatement
selectStatement()
Expression
simpleCaseExpression()
Expression
simpleExpression()
org.relique.jdbc.csv.ParsedStatement
singleStatement()
Expression
stringConstant()
java.lang.String
stringConstantAtom()
org.relique.jdbc.csv.ParsedTable
tableEntry()
java.lang.String
toString()
-
-
-
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:
toString
in 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.
-
-