public class ExpressionParser extends java.util.Stack<IExpression> implements IExpressionConstants, IExpressionParser
| Modifier and Type | Field and Description |
|---|---|
protected int |
currentToken |
protected java.lang.String |
expression |
protected IExpressionFactory |
factory |
protected static java.util.Map<java.lang.String,java.lang.Integer> |
keywords |
protected int |
lastTokenPos |
protected java.lang.String |
rootVariable |
protected static int |
TOKEN_AND |
protected static int |
TOKEN_COMMA |
protected static int |
TOKEN_DOLLAR |
protected static int |
TOKEN_DOT |
protected static int |
TOKEN_ELSE |
protected static int |
TOKEN_END |
protected static int |
TOKEN_EQUAL |
protected static int |
TOKEN_ERROR |
protected static int |
TOKEN_FALSE |
protected static int |
TOKEN_GREATER |
protected static int |
TOKEN_GREATER_EQUAL |
protected static int |
TOKEN_IDENTIFIER |
protected static int |
TOKEN_IF |
protected static int |
TOKEN_LB |
protected static int |
TOKEN_LC |
protected static int |
TOKEN_LESS |
protected static int |
TOKEN_LESS_EQUAL |
protected static int |
TOKEN_LITERAL |
protected static int |
TOKEN_LP |
protected static int |
TOKEN_MATCHES |
protected static int |
TOKEN_NOT |
protected static int |
TOKEN_NOT_EQUAL |
protected static int |
TOKEN_NULL |
protected static int |
TOKEN_OR |
protected static int |
TOKEN_PIPE |
protected static int |
TOKEN_RB |
protected static int |
TOKEN_RC |
protected static int |
TOKEN_RP |
protected static int |
TOKEN_TRUE |
protected int |
tokenPos |
protected java.lang.Object |
tokenValue |
KEYWORD_ALL, KEYWORD_BOOLEAN, KEYWORD_CLASS, KEYWORD_COLLECT, KEYWORD_EXISTS, KEYWORD_FALSE, KEYWORD_FILTER, KEYWORD_FIRST, KEYWORD_FLATTEN, KEYWORD_INTERSECT, KEYWORD_IQUERY, KEYWORD_LATEST, KEYWORD_LIMIT, KEYWORD_LOCALIZED_KEYS, KEYWORD_LOCALIZED_MAP, KEYWORD_LOCALIZED_PROPERTY, KEYWORD_NULL, KEYWORD_RANGE, KEYWORD_SATISFIES_ALL, KEYWORD_SATISFIES_ANY, KEYWORD_SELECT, KEYWORD_SET, KEYWORD_TRAVERSE, KEYWORD_TRUE, KEYWORD_UNION, KEYWORD_UNIQUE, KEYWORD_VERSION, OPERATOR_AND, OPERATOR_ARRAY, OPERATOR_ASSIGN, OPERATOR_AT, OPERATOR_EACH, OPERATOR_ELSE, OPERATOR_EQUALS, OPERATOR_GT, OPERATOR_GT_EQUAL, OPERATOR_IF, OPERATOR_LT, OPERATOR_LT_EQUAL, OPERATOR_MATCHES, OPERATOR_MEMBER, OPERATOR_NOT, OPERATOR_NOT_EQUALS, OPERATOR_OR, OPERATOR_PARAMETER, PRIORITY_AND, PRIORITY_ASSIGNMENT, PRIORITY_BINARY, PRIORITY_COLLECTION, PRIORITY_COMMA, PRIORITY_CONDITION, PRIORITY_FUNCTION, PRIORITY_LAMBDA, PRIORITY_LITERAL, PRIORITY_MAX, PRIORITY_MEMBER, PRIORITY_NOT, PRIORITY_OR, PRIORITY_VARIABLE, VARIABLE_EVERYTHING, VARIABLE_THIS| Constructor and Description |
|---|
ExpressionParser(IExpressionFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertToken(int token) |
protected IExpression |
getVariableOrRootMember(java.lang.String id) |
protected java.util.Map<java.lang.String,java.lang.Integer> |
keywordToTokenMap() |
protected void |
nextToken() |
IExpression |
parse(java.lang.String exprString)
Create a new expression.
|
protected IExpression |
parseAnd() |
protected IExpression[] |
parseArray() |
protected IExpression |
parseBinary() |
protected IExpression |
parseCollectionExpression() |
protected IExpression |
parseCollectionLHS() |
protected IExpression |
parseCollectionRHS(IExpression expr,
int funcToken) |
protected IExpression |
parseCondition() |
protected IExpression |
parseLambdaDefinition() |
protected IExpression |
parseMember() |
protected IExpression |
parseNot() |
protected IExpression |
parseOr() |
IExpression |
parseQuery(java.lang.String exprString)
Create an arbitrary expression.
|
protected IExpression |
parseUnary() |
protected void |
popVariable() |
protected ExpressionParseException |
syntaxError() |
protected ExpressionParseException |
syntaxError(java.lang.String message) |
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSizeprotected static final int TOKEN_OR
protected static final int TOKEN_AND
protected static final int TOKEN_EQUAL
protected static final int TOKEN_NOT_EQUAL
protected static final int TOKEN_LESS
protected static final int TOKEN_LESS_EQUAL
protected static final int TOKEN_GREATER
protected static final int TOKEN_GREATER_EQUAL
protected static final int TOKEN_MATCHES
protected static final int TOKEN_NOT
protected static final int TOKEN_DOT
protected static final int TOKEN_COMMA
protected static final int TOKEN_PIPE
protected static final int TOKEN_DOLLAR
protected static final int TOKEN_IF
protected static final int TOKEN_ELSE
protected static final int TOKEN_LP
protected static final int TOKEN_RP
protected static final int TOKEN_LB
protected static final int TOKEN_RB
protected static final int TOKEN_LC
protected static final int TOKEN_RC
protected static final int TOKEN_IDENTIFIER
protected static final int TOKEN_LITERAL
protected static final int TOKEN_NULL
protected static final int TOKEN_TRUE
protected static final int TOKEN_FALSE
protected static final int TOKEN_END
protected static final int TOKEN_ERROR
protected static final java.util.Map<java.lang.String,java.lang.Integer> keywords
protected final IExpressionFactory factory
protected java.lang.String expression
protected int tokenPos
protected int currentToken
protected int lastTokenPos
protected java.lang.Object tokenValue
protected java.lang.String rootVariable
public ExpressionParser(IExpressionFactory factory)
public IExpression parse(java.lang.String exprString)
IExpressionParserparse in interface IExpressionParserexprString - The string representing the boolean expression.public IExpression parseQuery(java.lang.String exprString)
IExpressionParserparseQuery in interface IExpressionParserexprString - The string representing the boolean expression.protected java.util.Map<java.lang.String,java.lang.Integer> keywordToTokenMap()
protected IExpression parseCondition()
protected IExpression parseOr()
protected IExpression parseAnd()
protected IExpression parseBinary()
protected IExpression parseNot()
protected IExpression parseCollectionExpression()
protected IExpression parseCollectionLHS()
protected IExpression parseCollectionRHS(IExpression expr, int funcToken)
protected IExpression parseLambdaDefinition()
protected IExpression parseMember()
protected IExpression parseUnary()
protected IExpression[] parseArray()
protected void assertToken(int token)
protected IExpression getVariableOrRootMember(java.lang.String id)
protected void nextToken()
protected void popVariable()
protected ExpressionParseException syntaxError()
protected ExpressionParseException syntaxError(java.lang.String message)