VmParserConstants
, VmParserTreeConstants
public class VmParser extends java.lang.Object implements VmParserTreeConstants, VmParserConstants
Modifier and Type | Field | Description |
---|---|---|
java.lang.String |
currentTemplateName |
Name of current template we are parsing.
|
Token |
jj_nt |
Next token.
|
protected JJTVmParserState |
jjtree |
|
boolean |
strictEscape |
Set to true if the property
RuntimeConstants.RUNTIME_REFERENCES_STRICT_ESCAPE is set to true
|
Token |
token |
Current token.
|
VmParserTokenManager |
token_source |
Generated Token Manager.
|
ALPHA_CHAR, ALPHANUM_CHAR, BRACKETED_WORD, COLON, COMMA, DEFAULT, DIGIT, DIRECTIVE, DIRECTIVE_CHAR, DIRECTIVE_TERMINATOR, DIVIDE, DOLLAR, DOLLARBANG, DOT, DOUBLE_ESCAPE, DOUBLEDOT, ELSE_DIRECTIVE, ELSEIF_DIRECTIVE, EMPTY_INDEX, END, EOF, EQUALS, ESCAPE, ESCAPE_DIRECTIVE, EXPONENT, FALSE, FLOATING_POINT_LITERAL, FOREACH_DIRECTIVE, FORMAL_COMMENT, HASH, IDENTIFIER, IDENTIFIER_CHAR, IF_DIRECTIVE, IN, IN_FORMAL_COMMENT, IN_MULTI_LINE_COMMENT, IN_SINGLE_LINE_COMMENT, IN_TEXTBLOCK, INDEX_LBRACKET, INDEX_RBRACKET, INTEGER_LITERAL, LBRACKET, LCURLY, LEFT_CURLEY, LETTER, LOGICAL_AND, LOGICAL_EQUALS, LOGICAL_GE, LOGICAL_GT, LOGICAL_LE, LOGICAL_LT, LOGICAL_NOT, LOGICAL_NOT_EQUALS, LOGICAL_OR, LPAREN, MINUS, MODULUS, MULTI_LINE_COMMENT, MULTIPLY, NEWLINE, PLUS, PRE_DIRECTIVE, RBRACKET, RCURLY, REFERENCE, REFERENCE_TERMINATOR, REFINDEX, REFMOD, REFMOD2, REFMOD2_RPAREN, REFMODIFIER, RIGHT_CURLEY, RPAREN, SET_DIRECTIVE, SINGLE_LINE_COMMENT, SINGLE_LINE_COMMENT_START, STRING_LITERAL, TEXT, TEXTBLOCK, tokenImage, TRUE, WHITESPACE, WORD
JJTADDNODE, JJTANDNODE, JJTASSIGNMENT, JJTBLOCK, JJTCOMMENT, JJTDIRECTIVE, JJTDIVNODE, JJTELSEIFSTATEMENT, JJTELSESTATEMENT, JJTEQNODE, JJTESCAPE, JJTESCAPEDDIRECTIVE, JJTEXPRESSION, JJTFALSE, JJTFLOATINGPOINTLITERAL, JJTFOREACHSTATEMENT, JJTGENODE, JJTGTNODE, JJTIDENTIFIER, JJTIFSTATEMENT, JJTINDEX, JJTINTEGERLITERAL, JJTINTEGERRANGE, JJTLENODE, JJTLTNODE, JJTMAP, JJTMETHOD, JJTMODNODE, JJTMULNODE, JJTNENODE, jjtNodeName, JJTNOTNODE, JJTOBJECTARRAY, JJTORNODE, JJTPROCESS, JJTREFERENCE, JJTSETDIRECTIVE, JJTSTRINGLITERAL, JJTSUBTRACTNODE, JJTTEXT, JJTTEXTBLOCK, JJTTRUE, JJTVOID, JJTWORD
Constructor | Description |
---|---|
VmParser(net.sourceforge.pmd.lang.ast.CharStream stream) |
Constructor with user supplied CharStream.
|
VmParser(VmParserTokenManager tm) |
Constructor with generated Token Manager.
|
Modifier and Type | Method | Description |
---|---|---|
void |
AdditiveExpression() |
|
void |
Assignment() |
|
void |
Comment() |
|
void |
ConditionalAndExpression() |
|
void |
ConditionalOrExpression() |
|
VmNode |
Directive() |
Supports the Pluggable Directives
#foo( arg+ )
|
int |
DirectiveArg() |
Supports the arguments for the Pluggable Directives
|
void |
disable_tracing() |
Disable tracing.
|
void |
ElseIfStatement() |
|
void |
ElseStatement() |
|
void |
enable_tracing() |
Enable tracing.
|
void |
EqualityExpression() |
|
void |
Escape() |
Used to catch and process escape sequences in grammatical constructs
as escapes outside of VTL are just characters.
|
void |
EscapedDirective() |
used to separate the notion of a valid directive that has been
escaped, versus something that looks like a directive and
is just schmoo.
|
void |
Expression() |
|
void |
False() |
|
void |
FloatingPointLiteral() |
|
void |
ForeachStatement() |
|
ParseException |
generateParseException() |
Generate ParseException.
|
Directive |
getDirective(java.lang.String directive) |
This method gets a Directive from the directives Hashtable
|
Token |
getNextToken() |
Get the next Token.
|
Token |
getToken(int index) |
Get the specific Token.
|
void |
Identifier() |
This method corresponds to variable
references in Velocity templates.
|
void |
IfStatement() |
|
void |
Index() |
|
void |
IndexParameter() |
A Simplified parameter more suitable for an index position: $foo[$index]
|
void |
IntegerLiteral() |
|
void |
IntegerRange() |
supports the [n..m] vector generator for use in
the #foreach() to generate measured ranges w/o
needing explicit support from the app/servlet
|
boolean |
isDirective(java.lang.String directive) |
This method finds out of the directive exists in the directives Map.
|
void |
Map() |
for creating a map in a #set
#set($foo = {$foo : $bar, $blargh : $thingy})
|
void |
Method() |
This method has yet to be fully implemented
but will allow arbitrarily nested method
calls
|
void |
MultiplicativeExpression() |
|
void |
ObjectArray() |
|
void |
Parameter() |
This method has yet to be fully implemented
but will allow arbitrarily nested method
calls
|
void |
PrimaryExpression() |
|
ASTprocess |
process() |
This method is what starts the whole parsing
process.
|
void |
Reference() |
|
void |
ReInit(net.sourceforge.pmd.lang.ast.CharStream stream) |
Reinitialise.
|
void |
ReInit(VmParserTokenManager tm) |
Reinitialise.
|
void |
RelationalExpression() |
|
void |
SetDirective() |
Currently support both types of set :
#set( expr )
#set expr
|
void |
Statement() |
These are the types of statements that
are acceptable in Velocity templates.
|
void |
StringLiteral() |
|
void |
Text() |
This method is responsible for allowing
all non-grammar text to pass through
unscathed.
|
void |
Textblock() |
|
void |
True() |
|
void |
UnaryExpression() |
|
void |
Word() |
protected JJTVmParserState jjtree
public java.lang.String currentTemplateName
public boolean strictEscape
public VmParserTokenManager token_source
public Token token
public Token jj_nt
public VmParser(net.sourceforge.pmd.lang.ast.CharStream stream)
public VmParser(VmParserTokenManager tm)
public Directive getDirective(java.lang.String directive)
public boolean isDirective(java.lang.String directive)
public final ASTprocess process() throws ParseException
ParseException
public final void Statement() throws ParseException
ParseException
public final void EscapedDirective() throws ParseException
ParseException
public final void Escape() throws ParseException
ParseException
public final void Comment() throws ParseException
ParseException
public final void Textblock() throws ParseException
ParseException
public final void FloatingPointLiteral() throws ParseException
ParseException
public final void IntegerLiteral() throws ParseException
ParseException
public final void StringLiteral() throws ParseException
ParseException
public final void Identifier() throws ParseException
ParseException
public final void Word() throws ParseException
ParseException
public final int DirectiveArg() throws ParseException
ParseException
public final VmNode Directive() throws ParseException
ParseException
public final void Map() throws ParseException
ParseException
public final void ObjectArray() throws ParseException
ParseException
public final void IntegerRange() throws ParseException
ParseException
public final void IndexParameter() throws ParseException
ParseException
public final void Parameter() throws ParseException
ParseException
public final void Method() throws ParseException
ParseException
public final void Index() throws ParseException
ParseException
public final void Reference() throws ParseException
ParseException
public final void True() throws ParseException
ParseException
public final void False() throws ParseException
ParseException
public final void Text() throws ParseException
ParseException
public final void ForeachStatement() throws ParseException
ParseException
public final void IfStatement() throws ParseException
ParseException
public final void ElseStatement() throws ParseException
ParseException
public final void ElseIfStatement() throws ParseException
ParseException
public final void SetDirective() throws ParseException
ParseException
public final void Expression() throws ParseException
ParseException
public final void Assignment() throws ParseException
ParseException
public final void ConditionalOrExpression() throws ParseException
ParseException
public final void ConditionalAndExpression() throws ParseException
ParseException
public final void EqualityExpression() throws ParseException
ParseException
public final void RelationalExpression() throws ParseException
ParseException
public final void AdditiveExpression() throws ParseException
ParseException
public final void MultiplicativeExpression() throws ParseException
ParseException
public final void UnaryExpression() throws ParseException
ParseException
public final void PrimaryExpression() throws ParseException
ParseException
public void ReInit(net.sourceforge.pmd.lang.ast.CharStream stream)
public void ReInit(VmParserTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
Copyright © 2002–2018 PMD. All rights reserved.