org.apache.velocity.runtime.parser
public class Parser extends Object implements ParserTreeConstants, ParserConstants
Version: $Id: Parser.java,v 1.74 2002/04/27 19:33:30 geirm Exp $
Nested Class Summary | |
---|---|
static class | Parser.JJCalls |
Field Summary | |
---|---|
String | currentTemplateName
Name of current template we are parsing. |
Hashtable | directives
This Hashtable contains a list of all of the dynamic directives. |
protected JJTParserState | jjtree |
Parser.JJCalls[] | jj_2_rtns |
int | jj_endpos |
Vector | jj_expentries |
int[] | jj_expentry |
int | jj_gc |
int | jj_gen |
int | jj_kind |
int | jj_la |
int[] | jj_la1 |
int[] | jj_la1_0 |
int[] | jj_la1_1 |
Token | jj_lastpos |
int[] | jj_lasttokens |
Token | jj_nt |
int | jj_ntk |
boolean | jj_rescan |
Token | jj_scanpos |
boolean | jj_semLA |
boolean | lookingAhead |
RuntimeServices | rsvc |
Token | token |
ParserTokenManager | token_source |
VelocityCharStream | velcharstream |
Constructor Summary | |
---|---|
Parser(RuntimeServices rs)
This constructor was added to allow the re-use of parsers.
| |
Parser(CharStream stream) | |
Parser(ParserTokenManager tm) |
Method Summary | |
---|---|
void | AdditiveExpression() |
void | Assignment() |
void | Comment() |
void | ConditionalAndExpression() |
void | ConditionalOrExpression() |
void | disable_tracing() |
SimpleNode | Directive()
Supports the Pluggable Directives
#foo( arg+ ) |
int | DirectiveArg()
Supports the arguments for the Pluggable Directives
We add whitespace in here as a token so the VMs can
easily reconstruct a macro body from the token stream
See Directive() |
void | enable_tracing() |
String | escapedDirective(String strImage)
Produces a processed output for an escaped control or
pluggable directive |
void | ElseIfStatement() |
void | ElseStatement() |
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() |
ParseException | generateParseException() |
Directive | getDirective(String directive)
This method gets a Directive from the directives Hashtable |
Token | getNextToken() |
Token | getToken(int index) |
boolean | isDirective(String directive)
This method finds out of the directive exists in the directives
Hashtable. |
void | Identifier()
This method corresponds to variable
references in Velocity templates.
|
void | IfStatement() |
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 | jj_2_1(int xla) |
boolean | jj_2_10(int xla) |
boolean | jj_2_11(int xla) |
boolean | jj_2_2(int xla) |
boolean | jj_2_3(int xla) |
boolean | jj_2_4(int xla) |
boolean | jj_2_5(int xla) |
boolean | jj_2_6(int xla) |
boolean | jj_2_7(int xla) |
boolean | jj_2_8(int xla) |
boolean | jj_2_9(int xla) |
boolean | jj_3R_19() |
boolean | jj_3R_20() |
boolean | jj_3R_21() |
boolean | jj_3R_22() |
boolean | jj_3R_23() |
boolean | jj_3R_24() |
boolean | jj_3R_25() |
boolean | jj_3R_26() |
boolean | jj_3R_27() |
boolean | jj_3R_28() |
boolean | jj_3R_29() |
boolean | jj_3R_30() |
boolean | jj_3R_31() |
boolean | jj_3R_32() |
boolean | jj_3R_33() |
boolean | jj_3R_34() |
boolean | jj_3R_35() |
boolean | jj_3R_36() |
boolean | jj_3R_37() |
boolean | jj_3R_38() |
boolean | jj_3R_39() |
boolean | jj_3R_40() |
boolean | jj_3R_41() |
boolean | jj_3R_42() |
boolean | jj_3R_43() |
boolean | jj_3R_44() |
boolean | jj_3R_45() |
boolean | jj_3R_46() |
boolean | jj_3R_47() |
boolean | jj_3R_48() |
boolean | jj_3R_49() |
boolean | jj_3R_50() |
boolean | jj_3R_51() |
boolean | jj_3R_52() |
boolean | jj_3R_53() |
boolean | jj_3R_54() |
boolean | jj_3R_55() |
boolean | jj_3R_56() |
boolean | jj_3R_57() |
boolean | jj_3R_58() |
boolean | jj_3R_59() |
boolean | jj_3R_60() |
boolean | jj_3R_61() |
boolean | jj_3R_62() |
boolean | jj_3R_63() |
boolean | jj_3R_64() |
boolean | jj_3R_65() |
boolean | jj_3R_66() |
boolean | jj_3R_67() |
boolean | jj_3R_68() |
boolean | jj_3R_69() |
boolean | jj_3R_70() |
boolean | jj_3R_71() |
boolean | jj_3R_72() |
boolean | jj_3R_73() |
boolean | jj_3R_74() |
boolean | jj_3R_75() |
boolean | jj_3R_76() |
boolean | jj_3R_77() |
boolean | jj_3R_78() |
boolean | jj_3R_79() |
boolean | jj_3R_80() |
boolean | jj_3R_81() |
boolean | jj_3R_82() |
boolean | jj_3R_83() |
boolean | jj_3R_84() |
boolean | jj_3R_85() |
boolean | jj_3R_86() |
boolean | jj_3R_87() |
boolean | jj_3R_88() |
boolean | jj_3R_89() |
boolean | jj_3_1() |
boolean | jj_3_10() |
boolean | jj_3_11() |
boolean | jj_3_2() |
boolean | jj_3_3() |
boolean | jj_3_4() |
boolean | jj_3_5() |
boolean | jj_3_6() |
boolean | jj_3_7() |
boolean | jj_3_8() |
boolean | jj_3_9() |
void | jj_add_error_token(int kind, int pos) |
Token | jj_consume_token(int kind) |
int | jj_ntk() |
void | jj_rescan_token() |
void | jj_save(int index, int xla) |
boolean | jj_scan_token(int kind) |
void | Method()
This method has yet to be fully implemented
but will allow arbitrarily nested method
calls |
void | MultiplicativeExpression() |
void | NumberLiteral() |
void | ObjectArray() |
SimpleNode | parse(Reader reader, String templateName)
This was also added to allow parsers to be
re-usable. |
SimpleNode | process()
This method is what starts the whole parsing
process. |
void | Parameter()
This method has yet to be fully implemented
but will allow arbitrarily nested method
calls |
void | PrimaryExpression() |
void | Reference() |
void | ReInit(CharStream stream) |
void | ReInit(ParserTokenManager tm) |
void | RelationalExpression() |
void | setDirectives(Hashtable directives)
This method sets the directives Hashtable |
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 | StopStatement()
This method corresponds to the #stop
directive which just simulates and EOF
so that parsing stops. |
void | StringLiteral() |
void | Text()
This method is responsible for allowing
all non-grammar text to pass through
unscathed. |
void | True() |
void | UnaryExpression() |
void | Word() |