public class ParserTokenManager extends Object implements ParserConstants
Modifier and Type | Field and Description |
---|---|
protected char |
curChar |
PrintStream |
debugStream
Debug output.
|
protected CharStream |
input_stream |
boolean |
inSet |
static int[] |
jjnewLexState
Lex State array.
|
static String[] |
jjstrLiteralImages
Token literal values.
|
static String[] |
lexStateNames
Lexer state names.
|
Parser |
parser
The parser.
|
ALPHA_CHAR, ALT_VAL, BEFORE_EOF, BRACKETED_WORD, COLON, COMMA, DEFAULT, DIGIT, DIRECTIVE, DIRECTIVE_CHAR, DIRECTIVE_TERMINATOR, DIVIDE, DOLLAR, DOLLARBANG, DOT, DOUBLE_ESCAPE, DOUBLEDOT, ELSE, ELSEIF, 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_MULTILINE_COMMENT, IN_SINGLE_LINE_COMMENT, IN_TEXTBLOCK, INDEX_LBRACKET, INDEX_RBRACKET, INLINE_TEXT, 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, LOGICAL_OR_2, LONE_SYMBOL, LPAREN, MINUS, MODULUS, MULTI_LINE_COMMENT, MULTIPLY, NEWLINE, OLD_ALPHA_CHAR, OLD_IDENTIFIER, OLD_IDENTIFIER_CHAR, PIPE, PLUS, PRE_DIRECTIVE, PRE_OLD_REFERENCE, PRE_REFERENCE, RBRACKET, RCURLY, REFERENCE, REFERENCE_TERMINATOR, REFINDEX, REFMOD, REFMOD2, REFMOD2_RPAREN, REFMOD3, REFMODIFIER, RIGHT_CURLEY, RPAREN, SET_DIRECTIVE, SINGLE_LINE_COMMENT, SINGLE_LINE_COMMENT_START, STRING_LITERAL, SUFFIX, TEXT, TEXTBLOCK, tokenImage, TRUE, WHITESPACE, WORD
Constructor and Description |
---|
ParserTokenManager(Parser parserArg,
CharStream stream)
Constructor with parser.
|
ParserTokenManager(Parser parserArg,
CharStream stream,
int lexState)
Constructor with parser.
|
Modifier and Type | Method and Description |
---|---|
void |
clearStateVars()
Clears all state variables, resets to
start values, clears stateStack.
|
Token |
getNextToken()
Get the next Token.
|
protected Token |
jjFillToken() |
void |
ReInit(CharStream stream)
Reinitialise parser.
|
void |
ReInit(CharStream stream,
int lexState)
Reinitialise parser.
|
void |
setDebugStream(PrintStream ds)
Set debug output.
|
boolean |
stateStackPop()
pops a state off the stack, and restores paren counts
|
boolean |
stateStackPush()
pushes the current state onto the 'state stack',
and maintains the parens counts
public because we need it in PD & VM handling
|
void |
switchTo(int lexState)
Switches to a new state (add some log to the default method)
|
void |
SwitchTo(int lexState)
Switch to specified lex state.
|
static void |
trace(String message)
Our own trace method.
|
public boolean inSet
public PrintStream debugStream
public Parser parser
public static final String[] jjstrLiteralImages
public static final String[] lexStateNames
public static final int[] jjnewLexState
protected CharStream input_stream
protected char curChar
public ParserTokenManager(Parser parserArg, CharStream stream)
public ParserTokenManager(Parser parserArg, CharStream stream, int lexState)
public static void trace(String message)
public void switchTo(int lexState)
public boolean stateStackPop()
public boolean stateStackPush()
public void clearStateVars()
public void setDebugStream(PrintStream ds)
public void ReInit(CharStream stream)
public void ReInit(CharStream stream, int lexState)
public void SwitchTo(int lexState)
protected Token jjFillToken()
public Token getNextToken()
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.