public class RecognizerSharedState extends Object
Modifier and Type | Field and Description |
---|---|
int |
_fsp |
int |
backtracking
If 0, no backtracking is going on.
|
int |
channel
The channel number for the current token
|
boolean |
errorRecovery
This is true when we see an error and before having successfully
matched a token.
|
boolean |
failed
In lieu of a return value, this indicates that a rule or token
has failed to match.
|
BitSet[] |
following
Track the set of token types that can follow any rule invocation.
|
int |
lastErrorIndex
The index into the input stream where the last error occurred.
|
Map[] |
ruleMemo
An array[size num rules] of Map
|
int |
syntaxErrors
Did the recognizer encounter a syntax error? Track how many.
|
String |
text
You can set the text for the current token to override what is in
the input char buffer.
|
Token |
token
The goal of all lexer rules/methods is to create a token object.
|
int |
tokenStartCharIndex
What character index in the stream did the current token start at?
Needed, for example, to get the text for current token.
|
int |
tokenStartCharPositionInLine
The character position of first character within the line
|
int |
tokenStartLine
The line on which the first character of the token resides
|
int |
type
The token type for the current token
|
Constructor and Description |
---|
RecognizerSharedState() |
RecognizerSharedState(RecognizerSharedState state) |
public BitSet[] following
public int _fsp
public boolean errorRecovery
public int lastErrorIndex
public boolean failed
public int syntaxErrors
public int backtracking
public Map[] ruleMemo
public Token token
public int tokenStartCharIndex
public int tokenStartLine
public int tokenStartCharPositionInLine
public int channel
public int type
public String text
public RecognizerSharedState()
public RecognizerSharedState(RecognizerSharedState state)
Copyright © 2020. All rights reserved.