Class ParserTokenManager
java.lang.Object
org.apache.velocity.runtime.parser.ParserTokenManager
- All Implemented Interfaces:
ParserConstants
Token Manager.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classHolds the state of the parsing process. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected char(package private) intbooleanDebug output.(package private) intprivate intprivate org.apache.commons.lang3.text.StrBuilderprivate booleanbooleanprotected CharStreamprivate booleanboolean(package private) static final long[](package private) static final long[]private final org.apache.commons.lang3.text.StrBuilderprivate int(package private) int(package private) intstatic final int[]Lex State array.(package private) int(package private) static final int[](package private) intprivate final int[]private final int[]static final String[]Token literal values.(package private) static final long[](package private) static final long[](package private) static final long[](package private) static final long[]private intstatic final String[]Lexer state names.private intprivate int(package private) ListFields 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, EMPTY_INDEX, 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, IN_TEXTBLOCK, INDEX_LBRACKET, INDEX_RBRACKET, 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, REFINDEX, REFMOD, REFMOD2, REFMOD2_RPAREN, REFMODIFIER, RIGHT_CURLEY, RPAREN, SET_DIRECTIVE, SINGLE_LINE_COMMENT, SINGLE_LINE_COMMENT_START, STRING_LITERAL, TEXT, TEXTBLOCK, tokenImage, TRUE, WHITESPACE, WORD -
Constructor Summary
ConstructorsConstructorDescriptionParserTokenManager(CharStream stream) Constructor.ParserTokenManager(CharStream stream, int lexState) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidClears all state variables, resets to start values, clears stateStack.Get the next Token.private voidjjAddStates(int start, int end) private static final booleanjjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) private voidjjCheckNAdd(int state) private voidjjCheckNAddStates(int start, int end) private voidjjCheckNAddTwoStates(int state1, int state2) protected Tokenprivate intjjMoveNfa_0(int startState, int curPos) private intjjMoveNfa_1(int startState, int curPos) private intjjMoveNfa_10(int startState, int curPos) private intjjMoveNfa_11(int startState, int curPos) private intjjMoveNfa_2(int startState, int curPos) private intjjMoveNfa_3(int startState, int curPos) private intjjMoveNfa_4(int startState, int curPos) private intjjMoveNfa_5(int startState, int curPos) private intjjMoveNfa_6(int startState, int curPos) private intjjMoveNfa_7(int startState, int curPos) private intjjMoveNfa_8(int startState, int curPos) private intjjMoveNfa_9(int startState, int curPos) private intprivate intprivate intprivate intprivate intprivate intprivate intprivate intprivate intprivate intprivate intprivate intprivate intjjMoveStringLiteralDfa1_0(long active0) private intjjMoveStringLiteralDfa1_1(long active0) private intjjMoveStringLiteralDfa1_10(long active0) private intjjMoveStringLiteralDfa1_11(long active0) private intjjMoveStringLiteralDfa1_2(long active0) private intjjMoveStringLiteralDfa1_3(long active0) private intjjMoveStringLiteralDfa1_4(long active0) private intjjMoveStringLiteralDfa1_5(long active0) private intjjMoveStringLiteralDfa1_6(long active0) private intjjMoveStringLiteralDfa1_7(long active0) private intjjMoveStringLiteralDfa1_8(long active0) private intjjMoveStringLiteralDfa1_9(long active0) private intjjMoveStringLiteralDfa2_0(long old0, long active0) private intjjMoveStringLiteralDfa2_1(long old0, long active0) private intjjMoveStringLiteralDfa2_10(long old0, long active0) private intjjMoveStringLiteralDfa2_11(long old0, long active0) private intjjMoveStringLiteralDfa2_2(long old0, long active0) private intjjMoveStringLiteralDfa2_3(long old0, long active0) private intjjMoveStringLiteralDfa2_4(long old0, long active0) private intjjMoveStringLiteralDfa2_5(long old0, long active0) private intjjMoveStringLiteralDfa2_6(long old0, long active0) private intjjMoveStringLiteralDfa2_7(long old0, long active0) private intjjMoveStringLiteralDfa2_8(long old0, long active0) private intjjMoveStringLiteralDfa2_9(long old0, long active0) private intjjMoveStringLiteralDfa3_0(long old0, long active0) private intjjMoveStringLiteralDfa3_1(long old0, long active0) private intjjMoveStringLiteralDfa3_2(long old0, long active0) private intjjMoveStringLiteralDfa3_3(long old0, long active0) private intjjMoveStringLiteralDfa3_4(long old0, long active0) private intjjMoveStringLiteralDfa4_0(long old0, long active0) private intjjMoveStringLiteralDfa4_1(long old0, long active0) private intjjMoveStringLiteralDfa4_2(long old0, long active0) private intjjMoveStringLiteralDfa4_3(long old0, long active0) private intjjMoveStringLiteralDfa4_4(long old0, long active0) private final intjjStartNfa_0(int pos, long active0, long active1) private final intjjStartNfa_1(int pos, long active0, long active1) private final intjjStartNfa_10(int pos, long active0) private final intjjStartNfa_11(int pos, long active0) private final intjjStartNfa_2(int pos, long active0) private final intjjStartNfa_3(int pos, long active0) private final intjjStartNfa_4(int pos, long active0) private final intjjStartNfa_5(int pos, long active0) private final intjjStartNfa_6(int pos, long active0) private final intjjStartNfa_7(int pos, long active0) private final intjjStartNfa_8(int pos, long active0) private final intjjStartNfa_9(int pos, long active0) private intjjStartNfaWithStates_0(int pos, int kind, int state) private intjjStartNfaWithStates_1(int pos, int kind, int state) private intjjStartNfaWithStates_10(int pos, int kind, int state) private intjjStartNfaWithStates_11(int pos, int kind, int state) private intjjStartNfaWithStates_2(int pos, int kind, int state) private intjjStartNfaWithStates_3(int pos, int kind, int state) private intjjStartNfaWithStates_4(int pos, int kind, int state) private intjjStartNfaWithStates_5(int pos, int kind, int state) private intjjStartNfaWithStates_6(int pos, int kind, int state) private intjjStartNfaWithStates_7(int pos, int kind, int state) private intjjStartNfaWithStates_8(int pos, int kind, int state) private intjjStartNfaWithStates_9(int pos, int kind, int state) private intjjStopAtPos(int pos, int kind) private final intjjStopStringLiteralDfa_0(int pos, long active0, long active1) private final intjjStopStringLiteralDfa_1(int pos, long active0, long active1) private final intjjStopStringLiteralDfa_10(int pos, long active0) private final intjjStopStringLiteralDfa_11(int pos, long active0) private final intjjStopStringLiteralDfa_2(int pos, long active0) private final intjjStopStringLiteralDfa_3(int pos, long active0) private final intjjStopStringLiteralDfa_4(int pos, long active0) private final intjjStopStringLiteralDfa_5(int pos, long active0) private final intjjStopStringLiteralDfa_6(int pos, long active0) private final intjjStopStringLiteralDfa_7(int pos, long active0) private final intjjStopStringLiteralDfa_8(int pos, long active0) private final intjjStopStringLiteralDfa_9(int pos, long active0) (package private) voidvoidReInit(CharStream stream) Reinitialise parser.voidReInit(CharStream stream, int lexState) Reinitialise parser.private voidprivate voidhandles the dropdown logic when encountering a RPARENvoidSet debug output.(package private) voidSkipLexicalActions(Token matchedToken) booleanpushes the current state onto the 'state stack', and maintains the parens counts public because we need it in PD & VM handlingbooleanpops a state off the stack, and restores paren countsvoidSwitchTo(int lexState) Switch to specified lex state.(package private) voidTokenLexicalActions(Token matchedToken)
-
Field Details
-
fileDepth
private int fileDepth -
lparen
private int lparen -
rparen
private int rparen -
stateStack
List stateStack -
debugPrint
public boolean debugPrint -
inReference
private boolean inReference -
inDirective
public boolean inDirective -
inComment
private boolean inComment -
inSet
public boolean inSet -
debugStream
Debug output. -
jjbitVec0
static final long[] jjbitVec0 -
jjbitVec2
static final long[] jjbitVec2 -
jjnextStates
static final int[] jjnextStates -
jjstrLiteralImages
Token literal values. -
lexStateNames
Lexer state names. -
jjnewLexState
public static final int[] jjnewLexStateLex State array. -
jjtoToken
static final long[] jjtoToken -
jjtoSkip
static final long[] jjtoSkip -
jjtoSpecial
static final long[] jjtoSpecial -
jjtoMore
static final long[] jjtoMore -
input_stream
-
jjrounds
private final int[] jjrounds -
jjstateSet
private final int[] jjstateSet -
jjimage
private final org.apache.commons.lang3.text.StrBuilder jjimage -
image
private org.apache.commons.lang3.text.StrBuilder image -
jjimageLen
private int jjimageLen -
lengthOfMatch
private 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 Details
-
ParserTokenManager
Constructor. -
ParserTokenManager
Constructor.
-
-
Method Details
-
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. -
RPARENHandler
private void RPARENHandler()handles the dropdown logic when encountering a RPAREN -
setDebugStream
Set debug output. -
jjStopStringLiteralDfa_3
private final int jjStopStringLiteralDfa_3(int pos, long active0) -
jjStartNfa_3
private final int jjStartNfa_3(int pos, long active0) -
jjStopAtPos
private int jjStopAtPos(int pos, int kind) -
jjMoveStringLiteralDfa0_3
private int jjMoveStringLiteralDfa0_3() -
jjMoveStringLiteralDfa1_3
private int jjMoveStringLiteralDfa1_3(long active0) -
jjMoveStringLiteralDfa2_3
private int jjMoveStringLiteralDfa2_3(long old0, long active0) -
jjMoveStringLiteralDfa3_3
private int jjMoveStringLiteralDfa3_3(long old0, long active0) -
jjMoveStringLiteralDfa4_3
private int jjMoveStringLiteralDfa4_3(long old0, long active0) -
jjStartNfaWithStates_3
private int jjStartNfaWithStates_3(int pos, int kind, int state) -
jjMoveNfa_3
private int jjMoveNfa_3(int startState, int curPos) -
jjStopStringLiteralDfa_11
private final int jjStopStringLiteralDfa_11(int pos, long active0) -
jjStartNfa_11
private final int jjStartNfa_11(int pos, long active0) -
jjMoveStringLiteralDfa0_11
private int jjMoveStringLiteralDfa0_11() -
jjMoveStringLiteralDfa1_11
private int jjMoveStringLiteralDfa1_11(long active0) -
jjMoveStringLiteralDfa2_11
private int jjMoveStringLiteralDfa2_11(long old0, long active0) -
jjStartNfaWithStates_11
private int jjStartNfaWithStates_11(int pos, int kind, int state) -
jjMoveNfa_11
private int jjMoveNfa_11(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) -
jjMoveStringLiteralDfa0_8
private int jjMoveStringLiteralDfa0_8() -
jjMoveStringLiteralDfa1_8
private int jjMoveStringLiteralDfa1_8(long active0) -
jjMoveStringLiteralDfa2_8
private int jjMoveStringLiteralDfa2_8(long old0, long active0) -
jjStartNfaWithStates_8
private int jjStartNfaWithStates_8(int pos, int kind, int state) -
jjMoveNfa_8
private int jjMoveNfa_8(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) -
jjMoveStringLiteralDfa0_6
private int jjMoveStringLiteralDfa0_6() -
jjMoveStringLiteralDfa1_6
private int jjMoveStringLiteralDfa1_6(long active0) -
jjMoveStringLiteralDfa2_6
private int jjMoveStringLiteralDfa2_6(long old0, long active0) -
jjStartNfaWithStates_6
private int jjStartNfaWithStates_6(int pos, int kind, int state) -
jjMoveNfa_6
private int jjMoveNfa_6(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) -
jjMoveStringLiteralDfa0_5
private int jjMoveStringLiteralDfa0_5() -
jjMoveStringLiteralDfa1_5
private int jjMoveStringLiteralDfa1_5(long active0) -
jjMoveStringLiteralDfa2_5
private int jjMoveStringLiteralDfa2_5(long old0, long active0) -
jjStartNfaWithStates_5
private int jjStartNfaWithStates_5(int pos, int kind, int state) -
jjMoveNfa_5
private int jjMoveNfa_5(int startState, int curPos) -
jjStopStringLiteralDfa_9
private final int jjStopStringLiteralDfa_9(int pos, long active0) -
jjStartNfa_9
private final int jjStartNfa_9(int pos, long active0) -
jjMoveStringLiteralDfa0_9
private int jjMoveStringLiteralDfa0_9() -
jjMoveStringLiteralDfa1_9
private int jjMoveStringLiteralDfa1_9(long active0) -
jjMoveStringLiteralDfa2_9
private int jjMoveStringLiteralDfa2_9(long old0, long active0) -
jjStartNfaWithStates_9
private int jjStartNfaWithStates_9(int pos, int kind, int state) -
jjMoveNfa_9
private int jjMoveNfa_9(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) -
jjMoveStringLiteralDfa0_2
private int jjMoveStringLiteralDfa0_2() -
jjMoveStringLiteralDfa1_2
private int jjMoveStringLiteralDfa1_2(long active0) -
jjMoveStringLiteralDfa2_2
private int jjMoveStringLiteralDfa2_2(long old0, long active0) -
jjMoveStringLiteralDfa3_2
private int jjMoveStringLiteralDfa3_2(long old0, long active0) -
jjMoveStringLiteralDfa4_2
private int jjMoveStringLiteralDfa4_2(long old0, long active0) -
jjStartNfaWithStates_2
private int jjStartNfaWithStates_2(int pos, int kind, int state) -
jjMoveNfa_2
private int jjMoveNfa_2(int startState, int curPos) -
jjStopStringLiteralDfa_10
private final int jjStopStringLiteralDfa_10(int pos, long active0) -
jjStartNfa_10
private final int jjStartNfa_10(int pos, long active0) -
jjMoveStringLiteralDfa0_10
private int jjMoveStringLiteralDfa0_10() -
jjMoveStringLiteralDfa1_10
private int jjMoveStringLiteralDfa1_10(long active0) -
jjMoveStringLiteralDfa2_10
private int jjMoveStringLiteralDfa2_10(long old0, long active0) -
jjStartNfaWithStates_10
private int jjStartNfaWithStates_10(int pos, int kind, int state) -
jjMoveNfa_10
private int jjMoveNfa_10(int startState, int curPos) -
jjStopStringLiteralDfa_0
private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) -
jjStartNfa_0
private final int jjStartNfa_0(int pos, long active0, long active1) -
jjMoveStringLiteralDfa0_0
private int jjMoveStringLiteralDfa0_0() -
jjMoveStringLiteralDfa1_0
private int jjMoveStringLiteralDfa1_0(long active0) -
jjMoveStringLiteralDfa2_0
private int jjMoveStringLiteralDfa2_0(long old0, long active0) -
jjMoveStringLiteralDfa3_0
private int jjMoveStringLiteralDfa3_0(long old0, long active0) -
jjMoveStringLiteralDfa4_0
private int jjMoveStringLiteralDfa4_0(long old0, long active0) -
jjStartNfaWithStates_0
private int jjStartNfaWithStates_0(int pos, int kind, int state) -
jjMoveNfa_0
private int jjMoveNfa_0(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) -
jjMoveStringLiteralDfa0_4
private int jjMoveStringLiteralDfa0_4() -
jjMoveStringLiteralDfa1_4
private int jjMoveStringLiteralDfa1_4(long active0) -
jjMoveStringLiteralDfa2_4
private int jjMoveStringLiteralDfa2_4(long old0, long active0) -
jjMoveStringLiteralDfa3_4
private int jjMoveStringLiteralDfa3_4(long old0, long active0) -
jjMoveStringLiteralDfa4_4
private int jjMoveStringLiteralDfa4_4(long old0, long active0) -
jjStartNfaWithStates_4
private int jjStartNfaWithStates_4(int pos, int kind, int state) -
jjMoveNfa_4
private int jjMoveNfa_4(int startState, int curPos) -
jjStopStringLiteralDfa_1
private final int jjStopStringLiteralDfa_1(int pos, long active0, long active1) -
jjStartNfa_1
private final int jjStartNfa_1(int pos, long active0, long active1) -
jjMoveStringLiteralDfa0_1
private int jjMoveStringLiteralDfa0_1() -
jjMoveStringLiteralDfa1_1
private int jjMoveStringLiteralDfa1_1(long active0) -
jjMoveStringLiteralDfa2_1
private int jjMoveStringLiteralDfa2_1(long old0, long active0) -
jjMoveStringLiteralDfa3_1
private int jjMoveStringLiteralDfa3_1(long old0, long active0) -
jjMoveStringLiteralDfa4_1
private int jjMoveStringLiteralDfa4_1(long old0, long active0) -
jjStartNfaWithStates_1
private int jjStartNfaWithStates_1(int pos, int kind, int state) -
jjMoveNfa_1
private int jjMoveNfa_1(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) -
jjMoveStringLiteralDfa0_7
private int jjMoveStringLiteralDfa0_7() -
jjMoveStringLiteralDfa1_7
private int jjMoveStringLiteralDfa1_7(long active0) -
jjMoveStringLiteralDfa2_7
private int jjMoveStringLiteralDfa2_7(long old0, long active0) -
jjStartNfaWithStates_7
private int jjStartNfaWithStates_7(int pos, int kind, int state) -
jjMoveNfa_7
private int jjMoveNfa_7(int startState, int curPos) -
jjCanMove_0
private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) -
ReInit
Reinitialise parser. -
ReInitRounds
private void ReInitRounds() -
ReInit
Reinitialise parser. -
SwitchTo
public void SwitchTo(int lexState) Switch to specified lex state. -
jjFillToken
-
getNextToken
Get the next Token. -
SkipLexicalActions
-
MoreLexicalActions
void MoreLexicalActions() -
TokenLexicalActions
-
jjCheckNAdd
private void jjCheckNAdd(int state) -
jjAddStates
private void jjAddStates(int start, int end) -
jjCheckNAddTwoStates
private void jjCheckNAddTwoStates(int state1, int state2) -
jjCheckNAddStates
private void jjCheckNAddStates(int start, int end)
-