Class Parser
java.lang.Object
org.apache.commons.jexl2.parser.StringParser
org.apache.commons.jexl2.parser.JexlParser
org.apache.commons.jexl2.parser.Parser
- All Implemented Interfaces:
ParserConstants, ParserTreeConstants
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanNext token.protected JJTParserStateCurrent token.Generated Token Manager.Fields inherited from class JexlParser
frameFields inherited from interface ParserConstants
and, AND, assign, COLON, COMMA, DEFAULT, DIGIT, div, DOT, ELSE, ELVIS, EMPTY, EOF, eq, FALSE, FLOAT_LITERAL, FOR, FOR_EACH_IN, FOREACH, ge, gt, IDENTIFIER, IF, IN, INTEGER_LITERAL, LBRACKET, LCURLY, le, LETTER, LPAREN, lt, minus, mod, mult, ne, NEW, not, NULL, or, OR, plus, QMARK, RBRACKET, RCURLY, REGISTER, REGISTERS, req, RETURN, rne, RPAREN, SEMICOL, SIZE, STRING_LITERAL, tilda, tokenImage, TRUE, VAR, WHILE, xorFields inherited from interface ParserTreeConstants
JJTADDITIVENODE, JJTADDITIVEOPERATOR, JJTAMBIGUOUS, JJTANDNODE, JJTARRAYACCESS, JJTARRAYLITERAL, JJTASSIGNMENT, JJTBITWISEANDNODE, JJTBITWISECOMPLNODE, JJTBITWISEORNODE, JJTBITWISEXORNODE, JJTBLOCK, JJTCONSTRUCTORNODE, JJTDIVNODE, JJTEMPTYFUNCTION, JJTEQNODE, JJTERNODE, JJTFALSENODE, JJTFOREACHSTATEMENT, JJTFUNCTIONNODE, JJTGENODE, JJTGTNODE, JJTIDENTIFIER, JJTIFSTATEMENT, JJTJEXLSCRIPT, JJTLENODE, JJTLTNODE, JJTMAPENTRY, JJTMAPLITERAL, JJTMETHODNODE, JJTMODNODE, JJTMULNODE, JJTNENODE, jjtNodeName, JJTNOTNODE, JJTNRNODE, JJTNULLLITERAL, JJTNUMBERLITERAL, JJTORNODE, JJTREFERENCE, JJTREFERENCEEXPRESSION, JJTRETURNSTATEMENT, JJTSIZEFUNCTION, JJTSIZEMETHOD, JJTSTRINGLITERAL, JJTTERNARYNODE, JJTTRUENODE, JJTUNARYMINUSNODE, JJTVAR, JJTVOID, JJTWHILESTATEMENT -
Constructor Summary
ConstructorsConstructorDescriptionParser(InputStream stream) Constructor with InputStream.Parser(InputStream stream, String encoding) Constructor with InputStream and supplied encodingConstructor.Constructor with generated Token Manager. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidArithmeticfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidBlock()final voidfinal voidfinal voidConditional & relationalfinal voidfinal voidfinal voidfinal voidDisable tracing.final voidfinal voidFunctions & Methodsfinal voidEnable tracing.final voidfinal voidfinal voidExpression syntaxfinal voidfinal voidfinal voidfinal voidFunction()Generate ParseException.final TokenGet the next Token.final TokengetToken(int index) Get the specific Token.final voidIdentifier(boolean top) Identifier & Literalsfinal voidfinal voidfinal voidfinal ASTJexlScriptStatementsfinal voidLiteral()final voidfinal voidMapEntry()final voidfinal voidMethod()final voidfinal voidfinal voidReferencesfinal voidfinal voidReferenceExpression is a subclass of ArrayAccessvoidReInit(InputStream stream) Reinitialise.voidReInit(InputStream stream, String encoding) Reinitialise.voidReinitialise.voidReinitialise.final voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal voidfinal booleanTrace enabled.final voidfinal voidVar()final voidMethods inherited from class JexlParser
checkVariable, declareVariable, getFrame, Identifier, setFrameMethods inherited from class StringParser
buildString, escapeString, readString
-
Field Details
-
jjtree
-
ALLOW_REGISTERS
-
token_source
Generated Token Manager. -
token
-
jj_nt
-
-
Constructor Details
-
Parser
Constructor with InputStream. -
Parser
Constructor with InputStream and supplied encoding -
Parser
-
Parser
Constructor with generated Token Manager.
-
-
Method Details
-
parse
- Throws:
ParseException
-
JexlScript
-
Statement
- Throws:
ParseException
-
Block
- Throws:
ParseException
-
ExpressionStatement
- Throws:
ParseException
-
IfStatement
- Throws:
ParseException
-
WhileStatement
- Throws:
ParseException
-
ForeachStatement
- Throws:
ParseException
-
ReturnStatement
- Throws:
ParseException
-
Expression
-
Assignment
- Throws:
ParseException
-
Var
- Throws:
ParseException
-
DeclareVar
- Throws:
ParseException
-
LValueVar
- Throws:
ParseException
-
ConditionalExpression
Conditional & relational- Throws:
ParseException
-
ConditionalOrExpression
- Throws:
ParseException
-
ConditionalAndExpression
- Throws:
ParseException
-
InclusiveOrExpression
- Throws:
ParseException
-
ExclusiveOrExpression
- Throws:
ParseException
-
AndExpression
- Throws:
ParseException
-
EqualityExpression
- Throws:
ParseException
-
RelationalExpression
- Throws:
ParseException
-
AdditiveExpression
-
AdditiveOperator
- Throws:
ParseException
-
MultiplicativeExpression
- Throws:
ParseException
-
UnaryExpression
- Throws:
ParseException
-
Identifier
Identifier & Literals- Overrides:
Identifierin classJexlParser- Parameters:
top- whether the identifier is beginning an l/r value- Throws:
ParseException- subclasses may throw this
-
StringIdentifier
- Throws:
ParseException
-
Literal
- Throws:
ParseException
-
NullLiteral
- Throws:
ParseException
-
BooleanLiteral
- Throws:
ParseException
-
IntegerLiteral
- Throws:
ParseException
-
FloatLiteral
- Throws:
ParseException
-
StringLiteral
- Throws:
ParseException
-
ArrayLiteral
- Throws:
ParseException
-
MapLiteral
- Throws:
ParseException
-
MapEntry
- Throws:
ParseException
-
EmptyFunction
-
SizeFunction
- Throws:
ParseException
-
Function
- Throws:
ParseException
-
Method
- Throws:
ParseException
-
AnyMethod
- Throws:
ParseException
-
SizeMethod
- Throws:
ParseException
-
Constructor
- Throws:
ParseException
-
PrimaryExpression
-
ArrayAccess
- Throws:
ParseException
-
DotReference
- Throws:
ParseException
-
Reference
- Throws:
ParseException
-
ReferenceExpression
ReferenceExpression is a subclass of ArrayAccess- Throws:
ParseException
-
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
-
ReInit
Reinitialise. -
getNextToken
Get the next Token. -
getToken
Get the specific Token.- Overrides:
getTokenin classJexlParser
-
generateParseException
Generate ParseException. -
trace_enabled
Trace enabled. -
enable_tracing
Enable tracing. -
disable_tracing
Disable tracing.
-