ExpressionParser (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.exp.parser, class: ExpressionParser

# 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 ExpressionParserConstants

  `ABS, AGGREGATE, 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, EXISTS, EXPONENT, FALSE, FLOAT_LITERAL, FLT_SUFF, FUNCTION, HOUR, IDENTIFIER, INT_LITERAL, LENGTH, LETTER, LOCATE, LOWER, MAX, MIN, MINUTE, MOD, MONTH, NOT_EXISTS, NULL, OPERATOR, PROPERTY_PATH, SECOND, SINGLE_QUOTED_STRING, SQRT, STRING_ESC, SUBSTRING, SUM, tokenImage, TRIM, TRUE, UPPER, WEEK, WithinDoubleQuoteLiteral, WithinSingleQuoteLiteral, YEAR`
  Modifier and Type
  Field
  Description
  `static final int`
  `ABS`
  RegularExpression Id.
  `static final int`
  `AGGREGATE`
  RegularExpression Id.
  `static final int`
  `ASTERISK`
  RegularExpression Id.
  `static final int`
  `AVG`
  RegularExpression Id.
  `static final int`
  `CONCAT`
  RegularExpression Id.
  `static final int`
  `COUNT`
  RegularExpression Id.
  `static final int`
  `CURRENT_DATE`
  RegularExpression Id.
  `static final int`
  `CURRENT_TIME`
  RegularExpression Id.
  `static final int`
  `CURRENT_TIMESTAMP`
  RegularExpression Id.
  `static final int`
  `DAY`
  RegularExpression Id.
  `static final int`
  `DAY_OF_MONTH`
  RegularExpression Id.
  `static final int`
  `DAY_OF_WEEK`
  RegularExpression Id.
  `static final int`
  `DAY_OF_YEAR`
  RegularExpression Id.
  `static final int`
  `DEC_DIGITS`
  RegularExpression Id.
  `static final int`
  `DEC_FLT`
  RegularExpression Id.
  `static final int`
  `DEFAULT`
  Lexical state.
  `static final int`
  `DIGIT`
  RegularExpression Id.
  `static final int`
  `DISTINCT`
  RegularExpression Id.
  `static final int`
  `DOLLAR_SIGN`
  RegularExpression Id.
  `static final int`
  `DOUBLE_QUOTED_STRING`
  RegularExpression Id.
  `static final int`
  `EOF`
  End of File.
  `static final int`
  `ESC`
  RegularExpression Id.
  `static final int`
  `EXISTS`
  RegularExpression Id.
  `static final int`
  `EXPONENT`
  RegularExpression Id.
  `static final int`
  `FALSE`
  RegularExpression Id.
  `static final int`
  `FLOAT_LITERAL`
  RegularExpression Id.
  `static final int`
  `FLT_SUFF`
  RegularExpression Id.
  `static final int`
  `FUNCTION`
  RegularExpression Id.
  `static final int`
  `HOUR`
  RegularExpression Id.
  `static final int`
  `IDENTIFIER`
  RegularExpression Id.
  `static final int`
  `INT_LITERAL`
  RegularExpression Id.
  `static final int`
  `LENGTH`
  RegularExpression Id.
  `static final int`
  `LETTER`
  RegularExpression Id.
  `static final int`
  `LOCATE`
  RegularExpression Id.
  `static final int`
  `LOWER`
  RegularExpression Id.
  `static final int`
  `MAX`
  RegularExpression Id.
  `static final int`
  `MIN`
  RegularExpression Id.
  `static final int`
  `MINUTE`
  RegularExpression Id.
  `static final int`
  `MOD`
  RegularExpression Id.
  `static final int`
  `MONTH`
  RegularExpression Id.
  `static final int`
  `NOT_EXISTS`
  RegularExpression Id.
  `static final int`
  `NULL`
  RegularExpression Id.
  `static final int`
  `OPERATOR`
  RegularExpression Id.
  `static final int`
  `PROPERTY_PATH`
  RegularExpression Id.
  `static final int`
  `SECOND`
  RegularExpression Id.
  `static final int`
  `SINGLE_QUOTED_STRING`
  RegularExpression Id.
  `static final int`
  `SQRT`
  RegularExpression Id.
  `static final int`
  `STRING_ESC`
  RegularExpression Id.
  `static final int`
  `SUBSTRING`
  RegularExpression Id.
  `static final int`
  `SUM`
  RegularExpression Id.
  `static final String[]`
  `tokenImage`
  Literal token values.
  `static final int`
  `TRIM`
  RegularExpression Id.
  `static final int`
  `TRUE`
  RegularExpression Id.
  `static final int`
  `UPPER`
  RegularExpression Id.
  `static final int`
  `WEEK`
  RegularExpression Id.
  `static final int`
  `WithinDoubleQuoteLiteral`
  Lexical state.
  `static final int`
  `WithinSingleQuoteLiteral`
  Lexical state.
  `static final int`
  `YEAR`
  RegularExpression Id.

  ### Fields inherited from interface ExpressionParserTreeConstants

  `JJTABS, JJTADD, JJTAND, JJTASTERISK, JJTAVG, JJTBETWEEN, JJTBITWISEAND, JJTBITWISELEFTSHIFT, JJTBITWISENOT, JJTBITWISEOR, JJTBITWISERIGHTSHIFT, JJTBITWISEXOR, JJTCONCAT, JJTCOUNT, JJTCURRENTDATE, JJTCURRENTTIME, JJTCURRENTTIMESTAMP, JJTCUSTOMAGGREGATE, JJTCUSTOMFUNCTION, JJTCUSTOMOPERATOR, JJTDBIDPATH, JJTDBPATH, JJTDISTINCT, JJTDIVIDE, JJTENUM, JJTEQUAL, JJTEXISTS, JJTEXTRACT, JJTFALSE, JJTGREATER, JJTGREATEROREQUAL, JJTIN, JJTLENGTH, JJTLESS, JJTLESSOREQUAL, JJTLIKE, JJTLIKEIGNORECASE, JJTLIST, JJTLOCATE, JJTLOWER, JJTMAX, JJTMIN, JJTMOD, JJTMULTIPLY, JJTNAMEDPARAMETER, JJTNEGATE, jjtNodeName, JJTNOT, JJTNOTBETWEEN, JJTNOTEQUAL, JJTNOTEXISTS, JJTNOTIN, JJTNOTLIKE, JJTNOTLIKEIGNORECASE, JJTOBJPATH, JJTOR, JJTSCALAR, JJTSQRT, JJTSUBSTRING, JJTSUBTRACT, JJTSUM, JJTTRIM, JJTTRUE, JJTUPPER, JJTVOID`
  Modifier and Type
  Field
  Description
  `static final int`
  `JJTABS`
  `static final int`
  `JJTADD`
  `static final int`
  `JJTAND`
  `static final int`
  `JJTASTERISK`
  `static final int`
  `JJTAVG`
  `static final int`
  `JJTBETWEEN`
  `static final int`
  `JJTBITWISEAND`
  `static final int`
  `JJTBITWISELEFTSHIFT`
  `static final int`
  `JJTBITWISENOT`
  `static final int`
  `JJTBITWISEOR`
  `static final int`
  `JJTBITWISERIGHTSHIFT`
  `static final int`
  `JJTBITWISEXOR`
  `static final int`
  `JJTCONCAT`
  `static final int`
  `JJTCOUNT`
  `static final int`
  `JJTCURRENTDATE`
  `static final int`
  `JJTCURRENTTIME`
  `static final int`
  `JJTCURRENTTIMESTAMP`
  `static final int`
  `JJTCUSTOMAGGREGATE`
  `static final int`
  `JJTCUSTOMFUNCTION`
  `static final int`
  `JJTCUSTOMOPERATOR`
  `static final int`
  `JJTDBIDPATH`
  `static final int`
  `JJTDBPATH`
  `static final int`
  `JJTDISTINCT`
  `static final int`
  `JJTDIVIDE`
  `static final int`
  `JJTENUM`
  `static final int`
  `JJTEQUAL`
  `static final int`
  `JJTEXISTS`
  `static final int`
  `JJTEXTRACT`
  `static final int`
  `JJTFALSE`
  `static final int`
  `JJTGREATER`
  `static final int`
  `JJTGREATEROREQUAL`
  `static final int`
  `JJTIN`
  `static final int`
  `JJTLENGTH`
  `static final int`
  `JJTLESS`
  `static final int`
  `JJTLESSOREQUAL`
  `static final int`
  `JJTLIKE`
  `static final int`
  `JJTLIKEIGNORECASE`
  `static final int`
  `JJTLIST`
  `static final int`
  `JJTLOCATE`
  `static final int`
  `JJTLOWER`
  `static final int`
  `JJTMAX`
  `static final int`
  `JJTMIN`
  `static final int`
  `JJTMOD`
  `static final int`
  `JJTMULTIPLY`
  `static final int`
  `JJTNAMEDPARAMETER`
  `static final int`
  `JJTNEGATE`
  `static final String[]`
  `jjtNodeName`
  `static final int`
  `JJTNOT`
  `static final int`
  `JJTNOTBETWEEN`
  `static final int`
  `JJTNOTEQUAL`
  `static final int`
  `JJTNOTEXISTS`
  `static final int`
  `JJTNOTIN`
  `static final int`
  `JJTNOTLIKE`
  `static final int`
  `JJTNOTLIKEIGNORECASE`
  `static final int`
  `JJTOBJPATH`
  `static final int`
  `JJTOR`
  `static final int`
  `JJTSCALAR`
  `static final int`
  `JJTSQRT`
  `static final int`
  `JJTSUBSTRING`
  `static final int`
  `JJTSUBTRACT`
  `static final int`
  `JJTSUM`
  `static final int`
  `JJTTRIM`
  `static final int`
  `JJTTRUE`
  `static final int`
  `JJTUPPER`
  `static final int`
  `JJTVOID`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ExpressionParser(InputStream stream)`
  Constructor with InputStream.
  `ExpressionParser(InputStream stream, String encoding)`
  Constructor with InputStream and supplied encoding
  `ExpressionParser(Reader stream)`
  Constructor.
  `ExpressionParser(ExpressionParserTokenManager tm)`
  Constructor with generated Token Manager.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final void`
  `abs()`
  `final void`
  `aggregateExpression()`
  `final void`
  `andCondition()`
  `final void`
  `arithmeticExp()`
  `final void`
  `asterisk()`
  `final void`
  `avg()`
  `final void`
  `bitwiseAnd()`
  `final void`
  `bitwiseOr()`
  `final void`
  `bitwiseShift()`
  `final void`
  `bitwiseXor()`
  `final void`
  `concat()`
  `final void`
  `conditionExpression()`
  `final void`
  `count()`
  `final void`
  `currentDate()`
  `final void`
  `currentTime()`
  `final void`
  `currentTimestamp()`
  `final void`
  `customAggregate()`
  `final void`
  `customFunction()`
  `final void`
  `customOperator()`
  `final void`
  `dateTimeExtractingFunction()`
  `final void`
  `dateTimeFunction()`
  `final void`
  `disable_tracing()`
  Disable tracing.
  `final void`
  `distinct()`
  `final void`
  `enable_tracing()`
  Enable tracing.
  `final Expression`
  `expression()`
  `final void`
  `functionsReturningNumerics()`
  `final void`
  `functionsReturningStrings()`
  `ParseException`
  `generateParseException()`
  Generate ParseException.
  `final Token`
  `getNextToken()`
  Get the next Token.
  `final Token`
  `getToken(int index)`
  Get the specific Token.
  `final void`
  `length()`
  `final void`
  `locate()`
  `final void`
  `lower()`
  `final void`
  `max()`
  `final void`
  `min()`
  `final void`
  `mod()`
  `final void`
  `multiplySubtractExp()`
  `final void`
  `namedParameter()`
  `final void`
  `notCondition()`
  `final void`
  `numericExpression()`
  `final void`
  `numericPrimary()`
  `final void`
  `numericTerm()`
  `final void`
  `numericTermExt()`
  `final void`
  `orCondition()`
  `final void`
  `pathExpression()`
  `final Token`
  `pathToken()`
  `void`
  `ReInit(InputStream stream)`
  Reinitialise.
  `void`
  `ReInit(InputStream stream, String encoding)`
  Reinitialise.
  `void`
  `ReInit(Reader stream)`
  Reinitialise.
  `void`
  `ReInit(ExpressionParserTokenManager tm)`
  Reinitialise.
  `final void`
  `scalarCommaList()`
  `final void`
  `scalarConstExpression()`
  `final void`
  `scalarExpression()`
  `final void`
  `simpleCondition()`
  `final void`
  `simpleNotCondition()`
  `final void`
  `sqrt()`
  `final void`
  `stringExpression()`
  `final void`
  `stringLiteral()`
  `final void`
  `stringParameter()`
  `final void`
  `substring()`
  `final void`
  `sum()`
  `final boolean`
  `trace_enabled()`
  Trace enabled.
  `final void`
  `trim()`
  `final void`
  `upper()`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### 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 Details

  - ### 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 Details

  - ### 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`

  - ### customAggregate

    public final void customAggregate() 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.