org.relique.jdbc.csv
Class ExpressionParser

java.lang.Object
  extended by org.relique.jdbc.csv.ExpressionParser
All Implemented Interfaces:
ExpressionParserConstants

public class ExpressionParser
extends Object
implements ExpressionParserConstants


Field Summary
 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
ExpressionParser(ExpressionParserTokenManager tm)
          Constructor with generated Token Manager.
ExpressionParser(InputStream stream)
          Constructor with InputStream.
ExpressionParser(InputStream stream, String encoding)
          Constructor with InputStream and supplied encoding
ExpressionParser(Reader stream)
          Constructor.
 
Method Summary
 String binAddOp()
           
 Expression binaryOperation()
           
 String binMultiplyOp()
           
 Expression columnAlias()
           
 Expression columnName()
           
 Expression countOperation()
           
 void disable_tracing()
          Disable tracing.
 void enable_tracing()
          Enable tracing.
 Object eval(Map<String,Object> env)
           
 org.relique.jdbc.csv.ParsedTable firstTableEntry()
           
 ParseException generateParseException()
          Generate ParseException.
 Date getCurrentDate()
           
 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()
           
 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()
           
 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(ExpressionParserTokenManager tm)
          Reinitialise.
 void ReInit(InputStream stream)
          Reinitialise.
 void ReInit(InputStream stream, String encoding)
          Reinitialise.
 void ReInit(Reader stream)
          Reinitialise.
 Expression relationalExpression()
           
 String relOp()
           
 Expression searchedCaseExpression()
           
 org.relique.jdbc.csv.ParsedStatement selectStatement()
           
 Expression simpleCaseExpression()
           
 Expression simpleExpression()
           
 org.relique.jdbc.csv.ParsedStatement singleStatement()
           
 Expression stringConstant()
           
 String stringConstantAtom()
           
 org.relique.jdbc.csv.ParsedTable tableEntry()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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()
                                                          throws ParseException
Throws:
ParseException

parseMultipleStatements

public List<org.relique.jdbc.csv.ParsedStatement> parseMultipleStatements()
                                                                   throws ParseException
Throws:
ParseException

eval

public Object eval(Map<String,Object> env)
            throws SQLException
Throws:
SQLException

toString

public String toString()
Overrides:
toString in class Object

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.


enable_tracing

public final void enable_tracing()
Enable tracing.


disable_tracing

public final void disable_tracing()
Disable tracing.



Copyright © 2016. All rights reserved.