org.apache.velocity.runtime.parser
Class ParserTokenManager

java.lang.Object
  extended by org.apache.velocity.runtime.parser.ParserTokenManager
All Implemented Interfaces:
ParserConstants

public class ParserTokenManager
extends Object
implements ParserConstants


Field Summary
protected  char curChar
           
 boolean debugPrint
           
 PrintStream debugStream
           
 boolean inDirective
           
protected  CharStream input_stream
           
 boolean inSet
           
static int[] jjnewLexState
           
static String[] jjstrLiteralImages
           
static String[] lexStateNames
           
 
Fields inherited from interface org.apache.velocity.runtime.parser.ParserConstants
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, END, EOF, EQUALS, ESCAPE, ESCAPE_DIRECTIVE, EXPONENT, FALSE, FLOATING_POINT_LITERAL, FORMAL_COMMENT, HASH, IDENTIFIER, IDENTIFIER_CHAR, IF_DIRECTIVE, IN_FORMAL_COMMENT, IN_MULTI_LINE_COMMENT, IN_SINGLE_LINE_COMMENT, 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, REFMOD2, REFMOD2_RPAREN, REFMODIFIER, RIGHT_CURLEY, RPAREN, SET_DIRECTIVE, SINGLE_LINE_COMMENT, STOP_DIRECTIVE, STRING_LITERAL, TEXT, tokenImage, TRUE, WHITESPACE, WORD
 
Constructor Summary
ParserTokenManager(CharStream stream)
           
ParserTokenManager(CharStream stream, int lexState)
           
 
Method Summary
 void clearStateVars()
          Clears all state variables, resets to start values, clears stateStack.
 Token getNextToken()
           
protected  Token jjFillToken()
           
 void ReInit(CharStream stream)
           
 void ReInit(CharStream stream, int lexState)
           
 void setDebugStream(PrintStream ds)
           
 boolean stateStackPop()
          pushes the current state onto the 'state stack', and maintains the parens counts public because we need it in PD & VM handling
 boolean stateStackPush()
          pops a state off the stack, and restores paren counts
 void SwitchTo(int lexState)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debugPrint

public boolean debugPrint

inDirective

public boolean inDirective

inSet

public boolean inSet

debugStream

public PrintStream debugStream

jjstrLiteralImages

public static final String[] jjstrLiteralImages

lexStateNames

public static final String[] lexStateNames

jjnewLexState

public static final int[] jjnewLexState

input_stream

protected CharStream input_stream

curChar

protected char curChar
Constructor Detail

ParserTokenManager

public ParserTokenManager(CharStream stream)

ParserTokenManager

public ParserTokenManager(CharStream stream,
                          int lexState)
Method Detail

stateStackPop

public boolean stateStackPop()
pushes the current state onto the 'state stack', and maintains the parens counts public because we need it in PD & VM handling

Returns:
boolean : success. It can fail if the state machine gets messed up (do don't mess it up :)

stateStackPush

public boolean stateStackPush()
pops a state off the stack, and restores paren counts

Returns:
boolean : success of operation

clearStateVars

public void clearStateVars()
Clears all state variables, resets to start values, clears stateStack. Call before parsing.


setDebugStream

public void setDebugStream(PrintStream ds)

ReInit

public void ReInit(CharStream stream)

ReInit

public void ReInit(CharStream stream,
                   int lexState)

SwitchTo

public void SwitchTo(int lexState)

jjFillToken

protected Token jjFillToken()

getNextToken

public Token getNextToken()


Copyright © 2002 Apache Software Foundation. All Rights Reserved.