org.webmacro.parser
Class WMParser_impl
java.lang.Object
|
+--org.webmacro.parser.WMParser_impl
- All Implemented Interfaces:
- WMParser_implConstants
- public class WMParser_impl
- extends java.lang.Object
- implements WMParser_implConstants
WMParser_impl
JavaCC parser class for parsing WebMacro templates.
The supported entry point is WMDocument, which returns a BlockBuilder.
- Author:
- Brian Goetz
Fields inherited from interface org.webmacro.parser.WMParser_implConstants |
_ALPHA_CHAR, _ALPHANUM_CHAR, _COMMENT, _IDENTIFIER, _IDENTIFIER_CHAR, _NEWLINE, _NUM_CHAR, _QCHAR, _RESTOFLINE, _WHITESPACE, BEGIN, COMMA, COMMENT, COMMENT_ELSE, DEFAULT, DOLLAR, DOT, END, EOF, FALSE, LBRACE, LBRACKET, LPAREN, NEWLINE, NULL, NUMBER, OP_AND, OP_DIV, OP_EQ, OP_GE, OP_GT, OP_LE, OP_LT, OP_MINUS, OP_MULT, OP_NE, OP_NOT, OP_OR, OP_PLUS, OP_SET, OTHER, POUND, POUNDPOUND, QCHAR, QS, QS_TEXT, QUOTE, RBRACE, RBRACKET, RESTOFLINE, RPAREN, SEMI, SLASH, SQS, SQS_TEXT, SQUOTE, STUFF, tokenImage, TRUE, WM, WORD, WS |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
token_source
public WMParser_implTokenManager token_source
token
public Token token
jj_nt
public Token jj_nt
lookingAhead
public boolean lookingAhead
WMParser_impl
public WMParser_impl(Broker broker,
java.lang.String templateName,
BackupCharStream stream)
WMParser_impl
public WMParser_impl(Broker broker,
java.lang.String templateName,
java.io.Reader reader)
WMParser_impl
public WMParser_impl(CharStream stream)
WMParser_impl
public WMParser_impl(WMParser_implTokenManager tm)
ReInit
public void ReInit(java.lang.String templateName,
java.io.Reader reader)
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
EatWsNlIfNl
public final void EatWsNlIfNl(BlockBuilder b)
throws ParseException
EatWsNlOrSpace
public final void EatWsNlOrSpace(BlockBuilder b)
throws ParseException
BeforeBlock
public final void BeforeBlock()
throws ParseException
OptionalWsNl
public final void OptionalWsNl()
throws ParseException
OptionalWs
public final void OptionalWs()
throws ParseException
SubdirectiveStart
public final void SubdirectiveStart()
throws ParseException
LValue
public final Builder LValue()
throws ParseException
RValue
public final java.lang.Object RValue()
throws ParseException
Punct_EQ
public final void Punct_EQ()
throws ParseException
Punct_COMMA
public final void Punct_COMMA()
throws ParseException
Punct_LPAREN
public final void Punct_LPAREN()
throws ParseException
Punct_RPAREN
public final void Punct_RPAREN()
throws ParseException
Keyword
public final void Keyword(java.lang.String s)
throws ParseException
Conditional
public final java.lang.Object Conditional()
throws ParseException
VariableReferenceGuts
public final void VariableReferenceGuts(java.util.ArrayList v)
throws ParseException
VariableReference
public final Builder VariableReference()
throws ParseException
QuotedString
public final Builder QuotedString()
throws ParseException
StringArg
public final Builder StringArg()
throws ParseException
ArgList
public final ListBuilder ArgList()
throws ParseException
BracketList
public final ListBuilder BracketList()
throws ParseException
Term
public final java.lang.Object Term()
throws ParseException
Factor
public final java.lang.Object Factor()
throws ParseException
AExpression
public final java.lang.Object AExpression()
throws ParseException
RelOp
public final Token RelOp()
throws ParseException
CExpression
public final java.lang.Object CExpression()
throws ParseException
AndExpression
public final java.lang.Object AndExpression()
throws ParseException
OrExpression
public final java.lang.Object OrExpression()
throws ParseException
Expression
public final java.lang.Object Expression()
throws ParseException
Directive
public final void Directive(ParserBlockBuilder b)
throws ParseException
Comment
public final void Comment(ParserBlockBuilder b)
throws ParseException
DollarReference
public final java.lang.Object DollarReference()
throws ParseException
WMContent
public final void WMContent(ParserBlockBuilder b)
throws ParseException
WMContentNoDirective
public final void WMContentNoDirective(ParserBlockBuilder b)
throws ParseException
LiteralWMContent
public final void LiteralWMContent(ParserBlockBuilder b)
throws ParseException
LiteralBlock
public final BlockBuilder LiteralBlock()
throws ParseException
Block
public final BlockBuilder Block(Directive.Subdirective[] subdirectives)
throws ParseException
WMDocument
public final BlockBuilder WMDocument()
throws ParseException
ReInit
public void ReInit(CharStream stream)
ReInit
public void ReInit(WMParser_implTokenManager tm)
getNextToken
public final Token getNextToken()
getToken
public final Token getToken(int index)
generateParseException
public final ParseException generateParseException()
enable_tracing
public final void enable_tracing()
disable_tracing
public final void disable_tracing()