Class ParserTokenManager
java.lang.Object
org.apache.velocity.runtime.parser.ParserTokenManager
- All Implemented Interfaces:
ParserConstants
Token Manager.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected charbooleanDebug output.booleanprotected CharStreambooleanstatic final int[]Lex State array.static final String[]Token literal values.static final String[]Lexer state names.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, 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.protected TokenvoidReInit(CharStream stream) Reinitialise parser.voidReInit(CharStream stream, int lexState) Reinitialise parser.voidSet debug output.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.
-
Field Details
-
debugPrint
public boolean debugPrint -
inDirective
public boolean inDirective -
inSet
public boolean inSet -
debugStream
Debug output. -
jjstrLiteralImages
Token literal values. -
lexStateNames
Lexer state names. -
jjnewLexState
public static final int[] jjnewLexStateLex State array. -
input_stream
-
curChar
protected char curChar
-
-
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. -
setDebugStream
Set debug output. -
ReInit
Reinitialise parser. -
ReInit
Reinitialise parser. -
SwitchTo
public void SwitchTo(int lexState) Switch to specified lex state. -
jjFillToken
-
getNextToken
Get the next Token.
-