public class JexlParser extends StringParser
Modifier and Type | Field and Description |
---|---|
protected JexlEngine.Scope |
frame
The map of named registers aka script parameters.
|
Constructor and Description |
---|
JexlParser() |
Modifier and Type | Method and Description |
---|---|
String |
checkVariable(ASTIdentifier identifier,
String image)
Checks whether an identifier is a local variable or argument, ie stored in a register.
|
void |
declareVariable(ASTVar identifier,
String image)
Declares a local variable.
|
JexlEngine.Scope |
getFrame()
Gets the frame used by this parser.
|
Token |
getToken(int index) |
void |
Identifier() |
void |
Identifier(boolean top)
Default implementation does nothing but is overriden by generated code.
|
void |
setFrame(JexlEngine.Scope theFrame)
Sets the frame to use bythis parser.
|
buildString, escapeString, readString
protected JexlEngine.Scope frame
public void setFrame(JexlEngine.Scope theFrame)
This is used to allow parameters to be declared before parsing.
theFrame
- the register mappublic JexlEngine.Scope getFrame()
Since local variables create new named registers, it is important to regain access after parsing to known which / how-many registers are needed.
public String checkVariable(ASTIdentifier identifier, String image)
identifier
- the identifierimage
- the identifier imagepublic void declareVariable(ASTVar identifier, String image)
This method creates an new entry in the named register map.
identifier
- the identifier used to declareimage
- the variable namepublic void Identifier(boolean top) throws ParseException
top
- whether the identifier is beginning an l/r valueParseException
- subclasses may throw thispublic final void Identifier() throws ParseException
ParseException
public Token getToken(int index)
Copyright © 2016 Internet2. All rights reserved.