org.webmacro.parser
Class WMParser_impl

java.lang.Object
  extended byorg.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

Field Summary
 Token jj_nt
           
 boolean lookingAhead
           
 Token token
           
 WMParser_implTokenManager token_source
           
 
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, UNDEFINED, WM, WORD, WS
 
Constructor Summary
WMParser_impl(Broker broker, java.lang.String templateName, BackupCharStream stream)
           
WMParser_impl(Broker broker, java.lang.String templateName, java.io.Reader reader)
           
WMParser_impl(CharStream stream)
           
WMParser_impl(WMParser_implTokenManager tm)
           
 
Method Summary
 java.lang.Object AExpression()
           
 java.lang.Object AndExpression()
           
 ListBuilder ArgList()
           
 void BeforeBlock()
           
 BlockBuilder Block(Directive.Subdirective[] subdirectives)
           
 ListBuilder BracketList()
           
 java.lang.Object CExpression()
           
 void Comment(ParserBlockBuilder b)
           
 java.lang.Object Conditional()
           
 void Directive(ParserBlockBuilder b)
           
 void disable_tracing()
           
 java.lang.Object DollarReference()
           
 void EatWsNlIfNl(BlockBuilder b)
           
 void EatWsNlOrSpace(BlockBuilder b)
           
 void enable_tracing()
           
 java.lang.Object Expression()
           
 java.lang.Object Factor()
           
 java.lang.Object[] FormalArgList()
           
 ParseException generateParseException()
           
 Token getNextToken()
           
 Token getToken(int index)
           
 void Keyword(java.lang.String s)
           
 BlockBuilder LiteralBlock()
           
 void LiteralWMContent(ParserBlockBuilder b)
           
 Builder LValue()
           
 ListBuilder MacroArgList()
           
static void main(java.lang.String[] args)
           
 java.lang.Object ObjectRoot()
           
 void OptionalWs()
           
 void OptionalWsNl()
           
 java.lang.Object OrExpression()
           
 void Punct_COMMA()
           
 void Punct_EQ()
           
 void Punct_LPAREN()
           
 void Punct_RPAREN()
           
 Builder QuotedString()
           
 void ReInit(CharStream stream)
           
 void ReInit(java.lang.String templateName, java.io.Reader reader)
           
 void ReInit(WMParser_implTokenManager tm)
           
 Token RelOp()
           
 java.lang.Object RValue()
           
 Builder StringArg()
           
 void SubdirectiveStart()
           
 java.lang.Object Term()
           
 Builder VariableReference()
           
 void VariableReferenceGuts(java.util.ArrayList v)
           
 void WMContent(ParserBlockBuilder b)
           
 void WMContentNoDirective(ParserBlockBuilder b)
           
 BlockBuilder WMDocument()
           
 java.lang.String Word()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public WMParser_implTokenManager token_source

token

public Token token

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead
Constructor Detail

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)
Method Detail

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
Throws:
java.lang.Exception

EatWsNlIfNl

public final void EatWsNlIfNl(BlockBuilder b)
                       throws ParseException
Throws:
ParseException

EatWsNlOrSpace

public final void EatWsNlOrSpace(BlockBuilder b)
                          throws ParseException
Throws:
ParseException

BeforeBlock

public final void BeforeBlock()
                       throws ParseException
Throws:
ParseException

OptionalWsNl

public final void OptionalWsNl()
                        throws ParseException
Throws:
ParseException

OptionalWs

public final void OptionalWs()
                      throws ParseException
Throws:
ParseException

SubdirectiveStart

public final void SubdirectiveStart()
                             throws ParseException
Throws:
ParseException

LValue

public final Builder LValue()
                     throws ParseException
Throws:
ParseException

RValue

public final java.lang.Object RValue()
                              throws ParseException
Throws:
ParseException

Punct_EQ

public final void Punct_EQ()
                    throws ParseException
Throws:
ParseException

Punct_COMMA

public final void Punct_COMMA()
                       throws ParseException
Throws:
ParseException

Punct_LPAREN

public final void Punct_LPAREN()
                        throws ParseException
Throws:
ParseException

Punct_RPAREN

public final void Punct_RPAREN()
                        throws ParseException
Throws:
ParseException

Keyword

public final void Keyword(java.lang.String s)
                   throws ParseException
Throws:
ParseException

Word

public final java.lang.String Word()
                            throws ParseException
Throws:
ParseException

Conditional

public final java.lang.Object Conditional()
                                   throws ParseException
Throws:
ParseException

ObjectRoot

public final java.lang.Object ObjectRoot()
                                  throws ParseException
Throws:
ParseException

VariableReferenceGuts

public final void VariableReferenceGuts(java.util.ArrayList v)
                                 throws ParseException
Throws:
ParseException

VariableReference

public final Builder VariableReference()
                                throws ParseException
Throws:
ParseException

QuotedString

public final Builder QuotedString()
                           throws ParseException
Throws:
ParseException

StringArg

public final Builder StringArg()
                        throws ParseException
Throws:
ParseException

ArgList

public final ListBuilder ArgList()
                          throws ParseException
Throws:
ParseException

BracketList

public final ListBuilder BracketList()
                              throws ParseException
Throws:
ParseException

FormalArgList

public final java.lang.Object[] FormalArgList()
                                       throws ParseException
Throws:
ParseException

MacroArgList

public final ListBuilder MacroArgList()
                               throws ParseException
Throws:
ParseException

Term

public final java.lang.Object Term()
                            throws ParseException
Throws:
ParseException

Factor

public final java.lang.Object Factor()
                              throws ParseException
Throws:
ParseException

AExpression

public final java.lang.Object AExpression()
                                   throws ParseException
Throws:
ParseException

RelOp

public final Token RelOp()
                  throws ParseException
Throws:
ParseException

CExpression

public final java.lang.Object CExpression()
                                   throws ParseException
Throws:
ParseException

AndExpression

public final java.lang.Object AndExpression()
                                     throws ParseException
Throws:
ParseException

OrExpression

public final java.lang.Object OrExpression()
                                    throws ParseException
Throws:
ParseException

Expression

public final java.lang.Object Expression()
                                  throws ParseException
Throws:
ParseException

Directive

public final void Directive(ParserBlockBuilder b)
                     throws ParseException
Throws:
ParseException

Comment

public final void Comment(ParserBlockBuilder b)
                   throws ParseException
Throws:
ParseException

DollarReference

public final java.lang.Object DollarReference()
                                       throws ParseException
Throws:
ParseException

WMContent

public final void WMContent(ParserBlockBuilder b)
                     throws ParseException
Throws:
ParseException

WMContentNoDirective

public final void WMContentNoDirective(ParserBlockBuilder b)
                                throws ParseException
Throws:
ParseException

LiteralWMContent

public final void LiteralWMContent(ParserBlockBuilder b)
                            throws ParseException
Throws:
ParseException

LiteralBlock

public final BlockBuilder LiteralBlock()
                                throws ParseException
Throws:
ParseException

Block

public final BlockBuilder Block(Directive.Subdirective[] subdirectives)
                         throws ParseException
Throws:
ParseException

WMDocument

public final BlockBuilder WMDocument()
                              throws ParseException
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()