BNF for ExpressionParser.jj
NON-TERMINALS
expression
::=
orCondition
<EOF>
orCondition
::=
andCondition
( "or"
andCondition
)*
andCondition
::=
notCondition
( "and"
notCondition
)*
notCondition
::=
( "not" | "!" )
simpleCondition
|
simpleCondition
simpleCondition
::=
scalarExpression
(
simpleNotCondition
| ( "=" | "==" )
scalarExpression
| ( "!=" | "<>" )
scalarExpression
| "<="
scalarExpression
| "<"
scalarExpression
| ">"
scalarExpression
| ">="
scalarExpression
| "like"
scalarExpression
| "likeIgnoreCase"
scalarExpression
| "in" (
namedParameter
| "("
scalarCommaList
")" ) | "between"
scalarExpression
"and"
scalarExpression
)?
simpleNotCondition
::=
( "not" | "!" ) ( "like"
scalarExpression
| "likeIgnoreCase"
scalarExpression
| "in" (
namedParameter
| "("
scalarCommaList
")" ) | "between"
scalarExpression
"and"
scalarExpression
)
scalarCommaList
::=
(
scalarConstExpression
( ","
scalarConstExpression
)* )
scalarExpression
::=
scalarNumericExpression
|
<SINGLE_QUOTED_STRING>
|
<DOUBLE_QUOTED_STRING>
|
<NULL>
scalarConstExpression
::=
<SINGLE_QUOTED_STRING>
|
<DOUBLE_QUOTED_STRING>
|
namedParameter
|
<INT_LITERAL>
|
<FLOAT_LITERAL>
scalarNumericExpression
::=
multiplySubtractExp
( "+"
multiplySubtractExp
| "-"
multiplySubtractExp
)*
multiplySubtractExp
::=
numericTerm
( "*"
numericTerm
| "/"
numericTerm
)*
numericTerm
::=
( "+" )?
numericPrimary
|
"-"
numericPrimary
numericPrimary
::=
"("
orCondition
")"
|
pathExpression
|
namedParameter
|
<INT_LITERAL>
|
<FLOAT_LITERAL>
namedParameter
::=
"$" <PROPERTY_PATH>
pathExpression
::=
( <PROPERTY_PATH> | "obj:" <PROPERTY_PATH> | "db:" <PROPERTY_PATH> )