org.apache.velocity.runtime.parser

Class ParserTokenManager

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) StringBuffer
image
private boolean
inComment
boolean
inDirective
private boolean
inReference
boolean
inSet
private CharStream
input_stream
(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 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 String[]
lexStateNames
private int
lparen
private int
rparen
(package private) Stack
stateStack

Fields inherited from interface org.apache.velocity.runtime.parser.ParserConstants

ALPHANUM_CHAR, ALPHA_CHAR, COMMA, DEFAULT, DIGIT, DIRECTIVE, DIRECTIVE_CHAR, DIRECTIVE_TERMINATOR, DIVIDE, DOLLAR, DOLLARBANG, DOT, DOUBLEDOT, DOUBLE_ESCAPE, ELSEIF_DIRECTIVE, ELSE_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, MULTIPLY, MULTI_LINE_COMMENT, 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, TRUE, WHITESPACE, WORD, tokenImage

Constructor Summary

ParserTokenManager(CharStream stream)
ParserTokenManager(CharStream stream, int lexState)

Method Summary

(package private) void
MoreLexicalActions()
private void
RPARENHandler()
handles the dropdown logic when encountering a RPAREN
void
ReInit(CharStream stream)
void
ReInit(CharStream stream, int lexState)
private void
ReInitRounds()
(package private) void
SkipLexicalActions(Token matchedToken)
void
SwitchTo(int lexState)
(package private) void
TokenLexicalActions(Token matchedToken)
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
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
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
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)
void
setDebugStream(java.io.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

Field Details

curChar

protected char curChar


curLexState

(package private)  int curLexState


debugPrint

public boolean debugPrint


debugStream

public java.io.PrintStream debugStream


defaultLexState

(package private)  int defaultLexState


fileDepth

private int fileDepth


image

(package private)  StringBuffer image


inComment

private boolean inComment


inDirective

public boolean inDirective


inReference

private boolean inReference


inSet

public boolean inSet


input_stream

private CharStream input_stream


jjbitVec0

(package private) static final long[] jjbitVec0


jjbitVec2

(package private) static final long[] jjbitVec2


jjimageLen

(package private)  int jjimageLen


jjmatchedKind

(package private)  int jjmatchedKind


jjmatchedPos

(package private)  int jjmatchedPos


jjnewLexState

public static final int[] jjnewLexState


jjnewStateCnt

(package private)  int jjnewStateCnt


jjnextStates

(package private) static final int[] jjnextStates


jjround

(package private)  int jjround


jjrounds

private final int[] jjrounds


jjstateSet

private final int[] jjstateSet


jjstrLiteralImages

public static final String[] jjstrLiteralImages


jjtoMore

(package private) static final long[] jjtoMore


jjtoSkip

(package private) static final long[] jjtoSkip


jjtoSpecial

(package private) static final long[] jjtoSpecial


jjtoToken

(package private) static final long[] jjtoToken


lengthOfMatch

(package private)  int lengthOfMatch


lexStateNames

public static final String[] lexStateNames


lparen

private int lparen


rparen

private int rparen


stateStack

(package private)  Stack stateStack

Constructor Details

ParserTokenManager

public ParserTokenManager(CharStream stream)


ParserTokenManager

public ParserTokenManager(CharStream stream,
                          int lexState)

Method Details

MoreLexicalActions

(package private) final void MoreLexicalActions()


RPARENHandler

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


ReInit

public void ReInit(CharStream stream)


ReInit

public void ReInit(CharStream stream,
                   int lexState)


ReInitRounds

private final void ReInitRounds()


SkipLexicalActions

(package private) final void SkipLexicalActions(Token matchedToken)


SwitchTo

public void SwitchTo(int lexState)


TokenLexicalActions

(package private) final void TokenLexicalActions(Token matchedToken)


clearStateVars

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


getNextToken

public final Token getNextToken()


jjAddStates

private final void jjAddStates(int start,
                               int end)


jjCanMove_0

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


jjCheckNAdd

private final void jjCheckNAdd(int state)


jjCheckNAddStates

private final void jjCheckNAddStates(int start)


jjCheckNAddStates

private final void jjCheckNAddStates(int start,
                                     int end)


jjCheckNAddTwoStates

private final void jjCheckNAddTwoStates(int state1,
                                        int state2)


jjFillToken

private final Token jjFillToken()


jjMoveNfa_0

private final int jjMoveNfa_0(int startState,
                              int curPos)


jjMoveNfa_1

private final int jjMoveNfa_1(int startState,
                              int curPos)


jjMoveNfa_2

private final int jjMoveNfa_2(int startState,
                              int curPos)


jjMoveNfa_3

private final int jjMoveNfa_3(int startState,
                              int curPos)


jjMoveNfa_4

private final int jjMoveNfa_4(int startState,
                              int curPos)


jjMoveNfa_5

private final int jjMoveNfa_5(int startState,
                              int curPos)


jjMoveNfa_6

private final int jjMoveNfa_6(int startState,
                              int curPos)


jjMoveNfa_7

private final int jjMoveNfa_7(int startState,
                              int curPos)


jjMoveNfa_8

private final int jjMoveNfa_8(int startState,
                              int curPos)


jjMoveStringLiteralDfa0_0

private final int jjMoveStringLiteralDfa0_0()


jjMoveStringLiteralDfa0_1

private final int jjMoveStringLiteralDfa0_1()


jjMoveStringLiteralDfa0_2

private final int jjMoveStringLiteralDfa0_2()


jjMoveStringLiteralDfa0_3

private final int jjMoveStringLiteralDfa0_3()


jjMoveStringLiteralDfa0_4

private final int jjMoveStringLiteralDfa0_4()


jjMoveStringLiteralDfa0_5

private final int jjMoveStringLiteralDfa0_5()


jjMoveStringLiteralDfa0_6

private final int jjMoveStringLiteralDfa0_6()


jjMoveStringLiteralDfa0_7

private final int jjMoveStringLiteralDfa0_7()


jjMoveStringLiteralDfa0_8

private final int jjMoveStringLiteralDfa0_8()


jjMoveStringLiteralDfa1_0

private final int jjMoveStringLiteralDfa1_0(long active0)


jjMoveStringLiteralDfa1_1

private final int jjMoveStringLiteralDfa1_1(long active0)


jjMoveStringLiteralDfa1_2

private final int jjMoveStringLiteralDfa1_2(long active0)


jjMoveStringLiteralDfa1_3

private final int jjMoveStringLiteralDfa1_3(long active0)


jjMoveStringLiteralDfa1_4

private final int jjMoveStringLiteralDfa1_4(long active0)


jjMoveStringLiteralDfa1_5

private final int jjMoveStringLiteralDfa1_5(long active0)


jjMoveStringLiteralDfa1_6

private final int jjMoveStringLiteralDfa1_6(long active0)


jjMoveStringLiteralDfa1_7

private final int jjMoveStringLiteralDfa1_7(long active0)


jjMoveStringLiteralDfa1_8

private final int jjMoveStringLiteralDfa1_8(long active0)


jjMoveStringLiteralDfa2_0

private final int jjMoveStringLiteralDfa2_0(long old0,
                                            long active0)


jjMoveStringLiteralDfa2_1

private final int jjMoveStringLiteralDfa2_1(long old0,
                                            long active0)


jjMoveStringLiteralDfa2_2

private final int jjMoveStringLiteralDfa2_2(long old0,
                                            long active0)


jjMoveStringLiteralDfa2_4

private final int jjMoveStringLiteralDfa2_4(long old0,
                                            long active0)


jjMoveStringLiteralDfa2_5

private final int jjMoveStringLiteralDfa2_5(long old0,
                                            long active0)


jjMoveStringLiteralDfa3_0

private final int jjMoveStringLiteralDfa3_0(long old0,
                                            long active0)


jjMoveStringLiteralDfa3_1

private final int jjMoveStringLiteralDfa3_1(long old0,
                                            long active0)


jjMoveStringLiteralDfa3_2

private final int jjMoveStringLiteralDfa3_2(long old0,
                                            long active0)


jjMoveStringLiteralDfa3_4

private final int jjMoveStringLiteralDfa3_4(long old0,
                                            long active0)


jjMoveStringLiteralDfa3_5

private final int jjMoveStringLiteralDfa3_5(long old0,
                                            long active0)


jjMoveStringLiteralDfa4_0

private final int jjMoveStringLiteralDfa4_0(long old0,
                                            long active0)


jjMoveStringLiteralDfa4_1

private final int jjMoveStringLiteralDfa4_1(long old0,
                                            long active0)


jjMoveStringLiteralDfa4_2

private final int jjMoveStringLiteralDfa4_2(long old0,
                                            long active0)


jjMoveStringLiteralDfa4_4

private final int jjMoveStringLiteralDfa4_4(long old0,
                                            long active0)


jjMoveStringLiteralDfa4_5

private final int jjMoveStringLiteralDfa4_5(long old0,
                                            long active0)


jjMoveStringLiteralDfa5_4

private final int jjMoveStringLiteralDfa5_4(long old0,
                                            long active0)


jjStartNfaWithStates_0

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


jjStartNfaWithStates_1

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


jjStartNfaWithStates_2

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


jjStartNfaWithStates_3

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


jjStartNfaWithStates_4

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


jjStartNfaWithStates_5

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


jjStartNfaWithStates_6

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


jjStartNfaWithStates_7

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


jjStartNfaWithStates_8

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


jjStartNfa_0

private final int jjStartNfa_0(int pos,
                               long active0)


jjStartNfa_1

private final int jjStartNfa_1(int pos,
                               long active0)


jjStartNfa_2

private final int jjStartNfa_2(int pos,
                               long active0)


jjStartNfa_3

private final int jjStartNfa_3(int pos,
                               long active0)


jjStartNfa_4

private final int jjStartNfa_4(int pos,
                               long active0)


jjStartNfa_5

private final int jjStartNfa_5(int pos,
                               long active0)


jjStartNfa_6

private final int jjStartNfa_6(int pos,
                               long active0)


jjStartNfa_7

private final int jjStartNfa_7(int pos,
                               long active0)


jjStartNfa_8

private final int jjStartNfa_8(int pos,
                               long active0)


jjStopAtPos

private final int jjStopAtPos(int pos,
                              int kind)


jjStopStringLiteralDfa_0

private final int jjStopStringLiteralDfa_0(int pos,
                                           long active0)


jjStopStringLiteralDfa_1

private final int jjStopStringLiteralDfa_1(int pos,
                                           long active0)


jjStopStringLiteralDfa_2

private final int jjStopStringLiteralDfa_2(int pos,
                                           long active0)


jjStopStringLiteralDfa_3

private final int jjStopStringLiteralDfa_3(int pos,
                                           long active0)


jjStopStringLiteralDfa_4

private final int jjStopStringLiteralDfa_4(int pos,
                                           long active0)


jjStopStringLiteralDfa_5

private final int jjStopStringLiteralDfa_5(int pos,
                                           long active0)


jjStopStringLiteralDfa_6

private final int jjStopStringLiteralDfa_6(int pos,
                                           long active0)


jjStopStringLiteralDfa_7

private final int jjStopStringLiteralDfa_7(int pos,
                                           long active0)


jjStopStringLiteralDfa_8

private final int jjStopStringLiteralDfa_8(int pos,
                                           long active0)


setDebugStream

public void setDebugStream(java.io.PrintStream ds)


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


Copyright B) 2002 Apache Software Foundation. All Rights Reserved.