Package org.apache.cayenne.exp.parser
Class ExpressionParser
- java.lang.Object
-
- org.apache.cayenne.exp.parser.ExpressionParser
-
- All Implemented Interfaces:
ExpressionParserConstants
,ExpressionParserTreeConstants
public class ExpressionParser extends Object implements ExpressionParserTreeConstants, ExpressionParserConstants
Parser of Cayenne Expressions.- Since:
- 1.1
-
-
Field Summary
Fields Modifier and Type Field Description Token
jj_nt
Next token.protected JJTExpressionParserState
jjtree
Token
token
Current token.ExpressionParserTokenManager
token_source
Generated Token Manager.-
Fields inherited from interface org.apache.cayenne.exp.parser.ExpressionParserConstants
ABS, ASTERISK, AVG, CONCAT, COUNT, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, DAY, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_YEAR, DEC_DIGITS, DEC_FLT, DEFAULT, DIGIT, DISTINCT, DOLLAR_SIGN, DOUBLE_QUOTED_STRING, EOF, ESC, EXPONENT, FALSE, FLOAT_LITERAL, FLT_SUFF, FUNCTION, HOUR, IDENTIFIER, INT_LITERAL, LENGTH, LETTER, LOCATE, LOWER, MAX, MIN, MINUTE, MOD, MONTH, NULL, OPERATOR, PROPERTY_PATH, SECOND, SINGLE_QUOTED_STRING, SQRT, STRING_ESC, SUBSTRING, SUM, tokenImage, TRIM, TRUE, UPPER, WEEK, WithinDoubleQuoteLiteral, WithinSingleQuoteLiteral, YEAR
-
Fields inherited from interface org.apache.cayenne.exp.parser.ExpressionParserTreeConstants
JJTABS, JJTADD, JJTAND, JJTASTERISK, JJTAVG, JJTBETWEEN, JJTBITWISEAND, JJTBITWISELEFTSHIFT, JJTBITWISENOT, JJTBITWISEOR, JJTBITWISERIGHTSHIFT, JJTBITWISEXOR, JJTCONCAT, JJTCOUNT, JJTCURRENTDATE, JJTCURRENTTIME, JJTCURRENTTIMESTAMP, JJTCUSTOMFUNCTION, JJTCUSTOMOPERATOR, JJTDBIDPATH, JJTDBPATH, JJTDISTINCT, JJTDIVIDE, JJTENUM, JJTEQUAL, JJTEXTRACT, JJTFALSE, JJTGREATER, JJTGREATEROREQUAL, JJTIN, JJTLENGTH, JJTLESS, JJTLESSOREQUAL, JJTLIKE, JJTLIKEIGNORECASE, JJTLIST, JJTLOCATE, JJTLOWER, JJTMAX, JJTMIN, JJTMOD, JJTMULTIPLY, JJTNAMEDPARAMETER, JJTNEGATE, jjtNodeName, JJTNOT, JJTNOTBETWEEN, JJTNOTEQUAL, JJTNOTIN, JJTNOTLIKE, JJTNOTLIKEIGNORECASE, JJTOBJPATH, JJTOR, JJTSCALAR, JJTSQRT, JJTSUBSTRING, JJTSUBTRACT, JJTSUM, JJTTRIM, JJTTRUE, JJTUPPER, JJTVOID
-
-
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
-
jjtree
protected JJTExpressionParserState jjtree
-
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
-
expression
public final Expression expression() throws ParseException
- Throws:
ParseException
-
orCondition
public final void orCondition() throws ParseException
- Throws:
ParseException
-
andCondition
public final void andCondition() throws ParseException
- Throws:
ParseException
-
notCondition
public final void notCondition() throws ParseException
- Throws:
ParseException
-
simpleCondition
public final void simpleCondition() throws ParseException
- Throws:
ParseException
-
simpleNotCondition
public final void simpleNotCondition() throws ParseException
- Throws:
ParseException
-
scalarCommaList
public final void scalarCommaList() throws ParseException
- Throws:
ParseException
-
conditionExpression
public final void conditionExpression() throws ParseException
- Throws:
ParseException
-
stringParameter
public final void stringParameter() throws ParseException
- Throws:
ParseException
-
stringLiteral
public final void stringLiteral() throws ParseException
- Throws:
ParseException
-
stringExpression
public final void stringExpression() throws ParseException
- Throws:
ParseException
-
scalarExpression
public final void scalarExpression() throws ParseException
- Throws:
ParseException
-
scalarConstExpression
public final void scalarConstExpression() throws ParseException
- Throws:
ParseException
-
numericExpression
public final void numericExpression() throws ParseException
- Throws:
ParseException
-
bitwiseOr
public final void bitwiseOr() throws ParseException
- Throws:
ParseException
-
bitwiseXor
public final void bitwiseXor() throws ParseException
- Throws:
ParseException
-
bitwiseAnd
public final void bitwiseAnd() throws ParseException
- Throws:
ParseException
-
bitwiseShift
public final void bitwiseShift() throws ParseException
- Throws:
ParseException
-
arithmeticExp
public final void arithmeticExp() throws ParseException
- Throws:
ParseException
-
multiplySubtractExp
public final void multiplySubtractExp() throws ParseException
- Throws:
ParseException
-
numericTermExt
public final void numericTermExt() throws ParseException
- Throws:
ParseException
-
numericTerm
public final void numericTerm() throws ParseException
- Throws:
ParseException
-
numericPrimary
public final void numericPrimary() throws ParseException
- Throws:
ParseException
-
functionsReturningStrings
public final void functionsReturningStrings() throws ParseException
- Throws:
ParseException
-
customFunction
public final void customFunction() throws ParseException
- Throws:
ParseException
-
customOperator
public final void customOperator() throws ParseException
- Throws:
ParseException
-
concat
public final void concat() throws ParseException
- Throws:
ParseException
-
substring
public final void substring() throws ParseException
- Throws:
ParseException
-
trim
public final void trim() throws ParseException
- Throws:
ParseException
-
lower
public final void lower() throws ParseException
- Throws:
ParseException
-
upper
public final void upper() throws ParseException
- Throws:
ParseException
-
functionsReturningNumerics
public final void functionsReturningNumerics() throws ParseException
- Throws:
ParseException
-
length
public final void length() throws ParseException
- Throws:
ParseException
-
locate
public final void locate() throws ParseException
- Throws:
ParseException
-
abs
public final void abs() throws ParseException
- Throws:
ParseException
-
sqrt
public final void sqrt() throws ParseException
- Throws:
ParseException
-
mod
public final void mod() throws ParseException
- Throws:
ParseException
-
aggregateExpression
public final void aggregateExpression() throws ParseException
- Throws:
ParseException
-
asterisk
public final void asterisk() throws ParseException
- Throws:
ParseException
-
count
public final void count() throws ParseException
- Throws:
ParseException
-
avg
public final void avg() throws ParseException
- Throws:
ParseException
-
max
public final void max() throws ParseException
- Throws:
ParseException
-
min
public final void min() throws ParseException
- Throws:
ParseException
-
sum
public final void sum() throws ParseException
- Throws:
ParseException
-
dateTimeFunction
public final void dateTimeFunction() throws ParseException
- Throws:
ParseException
-
currentDate
public final void currentDate() throws ParseException
- Throws:
ParseException
-
currentTime
public final void currentTime() throws ParseException
- Throws:
ParseException
-
currentTimestamp
public final void currentTimestamp() throws ParseException
- Throws:
ParseException
-
dateTimeExtractingFunction
public final void dateTimeExtractingFunction() throws ParseException
- Throws:
ParseException
-
distinct
public final void distinct() throws ParseException
- Throws:
ParseException
-
namedParameter
public final void namedParameter() throws ParseException
- Throws:
ParseException
-
pathExpression
public final void pathExpression() throws ParseException
- Throws:
ParseException
-
pathToken
public final Token pathToken() 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.
-
-