Package org.antlr.v4.runtime.dfa
Class AcceptStateInfo
java.lang.Object
org.antlr.v4.runtime.dfa.AcceptStateInfo
Stores information about a
DFAState which is an accept state under
some condition. Certain settings, such as
ParserATNSimulator.getPredictionMode(), may be used in addition to
this information to determine whether or not a particular state is an accept
state.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAcceptStateInfo(int prediction) AcceptStateInfo(int prediction, LexerActionExecutor lexerActionExecutor) -
Method Summary
Modifier and TypeMethodDescriptionGets theLexerActionExecutorwhich can be used to execute actions and/or commands after the lexer matches a token.intGets the prediction made by this accept state.
-
Field Details
-
prediction
private final int prediction -
lexerActionExecutor
-
-
Constructor Details
-
AcceptStateInfo
public AcceptStateInfo(int prediction) -
AcceptStateInfo
-
-
Method Details
-
getPrediction
public int getPrediction()Gets the prediction made by this accept state. Note that this value assumes the predicates, if any, in theDFAStateevaluate totrue. If predicate evaluation is enabled, the final prediction of the accept state will be determined by the result of predicate evaluation. -
getLexerActionExecutor
Gets theLexerActionExecutorwhich can be used to execute actions and/or commands after the lexer matches a token.
-