org.apache.velocity.runtime.parser
Class ParserTokenManager

java.lang.Object
  |
  +--org.apache.velocity.runtime.parser.ParserTokenManager
All Implemented Interfaces:
ParserConstants

public class ParserTokenManager
extends java.lang.Object
implements ParserConstants


Field Summary
protected  char curChar
           
(package private)  int curLexState
           
 boolean debugPrint
           
 java.io.PrintStream debugStream
           
(package private)  int defaultLexState
           
private  int fileDepth
           
(package private)  java.lang.StringBuffer image
           
private  boolean inComment
           
 boolean inDirective
           
private  CharStream input_stream
           
private  boolean inReference
           
 boolean inSet
           
(package private) static long[] jjbitVec0
           
(package private) static long[] jjbitVec2
           
(package private)  int jjimageLen
           
(package private)  int jjmatchedKind
           
(package private)  int jjmatchedPos
           
static int[] jjnewLexState
           
(package private)  int jjnewStateCnt
           
(package private) static int[] jjnextStates
           
(package private)  int jjround
           
private  int[] jjrounds
           
private  int[] jjstateSet
           
static java.lang.String[] jjstrLiteralImages
           
(package private) static long[] jjtoMore
           
(package private) static long[] jjtoSkip
           
(package private) static long[] jjtoSpecial
           
(package private) static long[] jjtoToken
           
(package private)  int lengthOfMatch
           
static java.lang.String[] lexStateNames
           
private  int lparen
           
private  int rparen
           
(package private)  java.util.Stack stateStack
           
 
Fields inherited from interface org.apache.velocity.runtime.parser.ParserConstants
ALPHA_CHAR, ALPHANUM_CHAR, 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, FALSE, FORMAL_COMMENT, HASH, IDENTIFIER, IDENTIFIER_CHAR, IF_DIRECTIVE, IN_FORMAL_COMMENT, IN_MULTI_LINE_COMMENT, IN_SINGLE_LINE_COMMENT, LBRACKET, LCURLY, 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, NUMBER_LITERAL, PLUS, PRE_DIRECTIVE, RBRACKET, RCURLY, REFERENCE, REFERENCE_TERMINATOR, REFMOD2, REFMOD2_RPAREN, REFMODIFIER, 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()
           
private  void jjAddStates(int start, int end)
           
private static boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
           
private  void jjCheckNAdd(int state)
           
private  void jjCheckNAddStates(int start)
           
private  void jjCheckNAddStates(int start, int end)
           
private  void jjCheckNAddTwoStates(int state1, int state2)
           
private  Token jjFillToken()
           
private  int jjMoveNfa_0(int startState, int curPos)
           
private  int jjMoveNfa_1(int startState, int curPos)
           
private  int jjMoveNfa_2(int startState, int curPos)
           
private  int jjMoveNfa_3(int startState, int curPos)
           
private  int jjMoveNfa_4(int startState, int curPos)
           
private  int jjMoveNfa_5(int startState, int curPos)
           
private  int jjMoveNfa_6(int startState, int curPos)
           
private  int jjMoveNfa_7(int startState, int curPos)
           
private  int jjMoveNfa_8(int startState, int curPos)
           
private  int jjMoveStringLiteralDfa0_0()
           
private  int jjMoveStringLiteralDfa0_1()
           
private  int jjMoveStringLiteralDfa0_2()
           
private  int jjMoveStringLiteralDfa0_3()
           
private  int jjMoveStringLiteralDfa0_4()
           
private  int jjMoveStringLiteralDfa0_5()
           
private  int jjMoveStringLiteralDfa0_6()
           
private  int jjMoveStringLiteralDfa0_7()
           
private  int jjMoveStringLiteralDfa0_8()
           
private  int jjMoveStringLiteralDfa1_0(long active0)
           
private  int jjMoveStringLiteralDfa1_1(long active0)
           
private  int jjMoveStringLiteralDfa1_2(long active0)
           
private  int jjMoveStringLiteralDfa1_3(long active0)
           
private  int jjMoveStringLiteralDfa1_4(long active0)
           
private  int jjMoveStringLiteralDfa1_5(long active0)
           
private  int jjMoveStringLiteralDfa1_6(long active0)
           
private  int jjMoveStringLiteralDfa1_7(long active0)
           
private  int jjMoveStringLiteralDfa1_8(long active0)
           
private  int jjMoveStringLiteralDfa2_0(long old0, long active0)
           
private  int jjMoveStringLiteralDfa2_1(long old0, long active0)
           
private  int jjMoveStringLiteralDfa2_2(long old0, long active0)
           
private  int jjMoveStringLiteralDfa2_4(long old0, long active0)
           
private  int jjMoveStringLiteralDfa2_5(long old0, long active0)
           
private  int jjMoveStringLiteralDfa3_0(long old0, long active0)
           
private  int jjMoveStringLiteralDfa3_1(long old0, long active0)
           
private  int jjMoveStringLiteralDfa3_2(long old0, long active0)
           
private  int jjMoveStringLiteralDfa3_4(long old0, long active0)
           
private  int jjMoveStringLiteralDfa3_5(long old0, long active0)
           
private  int jjMoveStringLiteralDfa4_0(long old0, long active0)
           
private  int jjMoveStringLiteralDfa4_1(long old0, long active0)
           
private  int jjMoveStringLiteralDfa4_2(long old0, long active0)
           
private  int jjMoveStringLiteralDfa4_4(long old0, long active0)
           
private  int jjMoveStringLiteralDfa4_5(long old0, long active0)
           
private  int jjMoveStringLiteralDfa5_4(long old0, long active0)
           
private  int jjStartNfa_0(int pos, long active0)
           
private  int jjStartNfa_1(int pos, long active0)
           
private  int jjStartNfa_2(int pos, long active0)
           
private  int jjStartNfa_3(int pos, long active0)
           
private  int jjStartNfa_4(int pos, long active0)
           
private  int jjStartNfa_5(int pos, long active0)
           
private  int jjStartNfa_6(int pos, long active0)
           
private  int jjStartNfa_7(int pos, long active0)
           
private  int jjStartNfa_8(int pos, long active0)
           
private  int jjStartNfaWithStates_0(int pos, int kind, int state)
           
private  int jjStartNfaWithStates_1(int pos, int kind, int state)
           
private  int jjStartNfaWithStates_2(int pos, int kind, int state)
           
private  int jjStartNfaWithStates_3(int pos, int kind, int state)
           
private  int jjStartNfaWithStates_4(int pos, int kind, int state)
           
private  int jjStartNfaWithStates_5(int pos, int kind, int state)
           
private  int jjStartNfaWithStates_6(int pos, int kind, int state)
           
private  int jjStartNfaWithStates_7(int pos, int kind, int state)
           
private  int jjStartNfaWithStates_8(int pos, int kind, int state)
           
private  int jjStopAtPos(int pos, int kind)
           
private  int jjStopStringLiteralDfa_0(int pos, long active0)
           
private  int jjStopStringLiteralDfa_1(int pos, long active0)
           
private  int jjStopStringLiteralDfa_2(int pos, long active0)
           
private  int jjStopStringLiteralDfa_3(int pos, long active0)
           
private  int jjStopStringLiteralDfa_4(int pos, long active0)
           
private  int jjStopStringLiteralDfa_5(int pos, long active0)
           
private  int jjStopStringLiteralDfa_6(int pos, long active0)
           
private  int jjStopStringLiteralDfa_7(int pos, long active0)
           
private  int jjStopStringLiteralDfa_8(int pos, long active0)
           
(package private)  void MoreLexicalActions()
           
 void ReInit(CharStream stream)
           
 void ReInit(CharStream stream, int lexState)
           
private  void ReInitRounds()
           
private  void RPARENHandler()
          handles the dropdown logic when encountering a RPAREN
 void setDebugStream(java.io.PrintStream ds)
           
(package private)  void SkipLexicalActions(Token matchedToken)
           
 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)
           
(package private)  void TokenLexicalActions(Token matchedToken)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

fileDepth

private int fileDepth

lparen

private int lparen

rparen

private int rparen

stateStack

java.util.Stack stateStack

debugPrint

public boolean debugPrint

inReference

private boolean inReference

inDirective

public boolean inDirective

inComment

private boolean inComment

inSet

public boolean inSet

debugStream

public java.io.PrintStream debugStream

jjbitVec0

static final long[] jjbitVec0

jjbitVec2

static final long[] jjbitVec2

jjnextStates

static final int[] jjnextStates

jjstrLiteralImages

public static final java.lang.String[] jjstrLiteralImages

lexStateNames

public static final java.lang.String[] lexStateNames

jjnewLexState

public static final int[] jjnewLexState

jjtoToken

static final long[] jjtoToken

jjtoSkip

static final long[] jjtoSkip

jjtoSpecial

static final long[] jjtoSpecial

jjtoMore

static final long[] jjtoMore

input_stream

private CharStream input_stream

jjrounds

private final int[] jjrounds

jjstateSet

private final int[] jjstateSet

image

java.lang.StringBuffer image

jjimageLen

int jjimageLen

lengthOfMatch

int lengthOfMatch

curChar

protected char curChar

curLexState

int curLexState

defaultLexState

int defaultLexState

jjnewStateCnt

int jjnewStateCnt

jjround

int jjround

jjmatchedPos

int jjmatchedPos

jjmatchedKind

int jjmatchedKind
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.
Returns:
void

RPARENHandler

private void RPARENHandler()
handles the dropdown logic when encountering a RPAREN

setDebugStream

public void setDebugStream(java.io.PrintStream ds)

jjStopStringLiteralDfa_0

private final int jjStopStringLiteralDfa_0(int pos,
                                           long active0)

jjStartNfa_0

private final int jjStartNfa_0(int pos,
                               long active0)

jjStopAtPos

private final int jjStopAtPos(int pos,
                              int kind)

jjStartNfaWithStates_0

private final int jjStartNfaWithStates_0(int pos,
                                         int kind,
                                         int state)

jjMoveStringLiteralDfa0_0

private final int jjMoveStringLiteralDfa0_0()

jjMoveStringLiteralDfa1_0

private final int jjMoveStringLiteralDfa1_0(long active0)

jjMoveStringLiteralDfa2_0

private final int jjMoveStringLiteralDfa2_0(long old0,
                                            long active0)

jjMoveStringLiteralDfa3_0

private final int jjMoveStringLiteralDfa3_0(long old0,
                                            long active0)

jjMoveStringLiteralDfa4_0

private final int jjMoveStringLiteralDfa4_0(long old0,
                                            long active0)

jjCheckNAdd

private final void jjCheckNAdd(int state)

jjAddStates

private final void jjAddStates(int start,
                               int end)

jjCheckNAddTwoStates

private final void jjCheckNAddTwoStates(int state1,
                                        int state2)

jjCheckNAddStates

private final void jjCheckNAddStates(int start,
                                     int end)

jjCheckNAddStates

private final void jjCheckNAddStates(int start)

jjMoveNfa_0

private final int jjMoveNfa_0(int startState,
                              int curPos)

jjStopStringLiteralDfa_6

private final int jjStopStringLiteralDfa_6(int pos,
                                           long active0)

jjStartNfa_6

private final int jjStartNfa_6(int pos,
                               long active0)

jjStartNfaWithStates_6

private final int jjStartNfaWithStates_6(int pos,
                                         int kind,
                                         int state)

jjMoveStringLiteralDfa0_6

private final int jjMoveStringLiteralDfa0_6()

jjMoveStringLiteralDfa1_6

private final int jjMoveStringLiteralDfa1_6(long active0)

jjMoveNfa_6

private final int jjMoveNfa_6(int startState,
                              int curPos)

jjStopStringLiteralDfa_4

private final int jjStopStringLiteralDfa_4(int pos,
                                           long active0)

jjStartNfa_4

private final int jjStartNfa_4(int pos,
                               long active0)

jjStartNfaWithStates_4

private final int jjStartNfaWithStates_4(int pos,
                                         int kind,
                                         int state)

jjMoveStringLiteralDfa0_4

private final int jjMoveStringLiteralDfa0_4()

jjMoveStringLiteralDfa1_4

private final int jjMoveStringLiteralDfa1_4(long active0)

jjMoveStringLiteralDfa2_4

private final int jjMoveStringLiteralDfa2_4(long old0,
                                            long active0)

jjMoveStringLiteralDfa3_4

private final int jjMoveStringLiteralDfa3_4(long old0,
                                            long active0)

jjMoveStringLiteralDfa4_4

private final int jjMoveStringLiteralDfa4_4(long old0,
                                            long active0)

jjMoveStringLiteralDfa5_4

private final int jjMoveStringLiteralDfa5_4(long old0,
                                            long active0)

jjMoveNfa_4

private final int jjMoveNfa_4(int startState,
                              int curPos)

jjStopStringLiteralDfa_3

private final int jjStopStringLiteralDfa_3(int pos,
                                           long active0)

jjStartNfa_3

private final int jjStartNfa_3(int pos,
                               long active0)

jjStartNfaWithStates_3

private final int jjStartNfaWithStates_3(int pos,
                                         int kind,
                                         int state)

jjMoveStringLiteralDfa0_3

private final int jjMoveStringLiteralDfa0_3()

jjMoveStringLiteralDfa1_3

private final int jjMoveStringLiteralDfa1_3(long active0)

jjMoveNfa_3

private final int jjMoveNfa_3(int startState,
                              int curPos)

jjStopStringLiteralDfa_7

private final int jjStopStringLiteralDfa_7(int pos,
                                           long active0)

jjStartNfa_7

private final int jjStartNfa_7(int pos,
                               long active0)

jjStartNfaWithStates_7

private final int jjStartNfaWithStates_7(int pos,
                                         int kind,
                                         int state)

jjMoveStringLiteralDfa0_7

private final int jjMoveStringLiteralDfa0_7()

jjMoveStringLiteralDfa1_7

private final int jjMoveStringLiteralDfa1_7(long active0)

jjMoveNfa_7

private final int jjMoveNfa_7(int startState,
                              int curPos)

jjStopStringLiteralDfa_8

private final int jjStopStringLiteralDfa_8(int pos,
                                           long active0)

jjStartNfa_8

private final int jjStartNfa_8(int pos,
                               long active0)

jjStartNfaWithStates_8

private final int jjStartNfaWithStates_8(int pos,
                                         int kind,
                                         int state)

jjMoveStringLiteralDfa0_8

private final int jjMoveStringLiteralDfa0_8()

jjMoveStringLiteralDfa1_8

private final int jjMoveStringLiteralDfa1_8(long active0)

jjMoveNfa_8

private final int jjMoveNfa_8(int startState,
                              int curPos)

jjStopStringLiteralDfa_5

private final int jjStopStringLiteralDfa_5(int pos,
                                           long active0)

jjStartNfa_5

private final int jjStartNfa_5(int pos,
                               long active0)

jjStartNfaWithStates_5

private final int jjStartNfaWithStates_5(int pos,
                                         int kind,
                                         int state)

jjMoveStringLiteralDfa0_5

private final int jjMoveStringLiteralDfa0_5()

jjMoveStringLiteralDfa1_5

private final int jjMoveStringLiteralDfa1_5(long active0)

jjMoveStringLiteralDfa2_5

private final int jjMoveStringLiteralDfa2_5(long old0,
                                            long active0)

jjMoveStringLiteralDfa3_5

private final int jjMoveStringLiteralDfa3_5(long old0,
                                            long active0)

jjMoveStringLiteralDfa4_5

private final int jjMoveStringLiteralDfa4_5(long old0,
                                            long active0)

jjMoveNfa_5

private final int jjMoveNfa_5(int startState,
                              int curPos)

jjStopStringLiteralDfa_1

private final int jjStopStringLiteralDfa_1(int pos,
                                           long active0)

jjStartNfa_1

private final int jjStartNfa_1(int pos,
                               long active0)

jjStartNfaWithStates_1

private final int jjStartNfaWithStates_1(int pos,
                                         int kind,
                                         int state)

jjMoveStringLiteralDfa0_1

private final int jjMoveStringLiteralDfa0_1()

jjMoveStringLiteralDfa1_1

private final int jjMoveStringLiteralDfa1_1(long active0)

jjMoveStringLiteralDfa2_1

private final int jjMoveStringLiteralDfa2_1(long old0,
                                            long active0)

jjMoveStringLiteralDfa3_1

private final int jjMoveStringLiteralDfa3_1(long old0,
                                            long active0)

jjMoveStringLiteralDfa4_1

private final int jjMoveStringLiteralDfa4_1(long old0,
                                            long active0)

jjMoveNfa_1

private final int jjMoveNfa_1(int startState,
                              int curPos)

jjStopStringLiteralDfa_2

private final int jjStopStringLiteralDfa_2(int pos,
                                           long active0)

jjStartNfa_2

private final int jjStartNfa_2(int pos,
                               long active0)

jjStartNfaWithStates_2

private final int jjStartNfaWithStates_2(int pos,
                                         int kind,
                                         int state)

jjMoveStringLiteralDfa0_2

private final int jjMoveStringLiteralDfa0_2()

jjMoveStringLiteralDfa1_2

private final int jjMoveStringLiteralDfa1_2(long active0)

jjMoveStringLiteralDfa2_2

private final int jjMoveStringLiteralDfa2_2(long old0,
                                            long active0)

jjMoveStringLiteralDfa3_2

private final int jjMoveStringLiteralDfa3_2(long old0,
                                            long active0)

jjMoveStringLiteralDfa4_2

private final int jjMoveStringLiteralDfa4_2(long old0,
                                            long active0)

jjMoveNfa_2

private final int jjMoveNfa_2(int startState,
                              int curPos)

jjCanMove_0

private static final boolean jjCanMove_0(int hiByte,
                                         int i1,
                                         int i2,
                                         long l1,
                                         long l2)

ReInit

public void ReInit(CharStream stream)

ReInitRounds

private final void ReInitRounds()

ReInit

public void ReInit(CharStream stream,
                   int lexState)

SwitchTo

public void SwitchTo(int lexState)

jjFillToken

private final Token jjFillToken()

getNextToken

public final Token getNextToken()

SkipLexicalActions

final void SkipLexicalActions(Token matchedToken)

MoreLexicalActions

final void MoreLexicalActions()

TokenLexicalActions

final void TokenLexicalActions(Token matchedToken)


Copyright © 2003 Apache Software Foundation. All Rights Reserved.