Top Description Fields Constructors Methods
org.antlr.v4.runtime.dfa

public Class AcceptStateInfo

extends Object
Class Inheritance
Imports
org.antlr.v4.runtime.atn.LexerActionExecutor, .ParserATNSimulator

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.
Author
Sam Harwell

Field Summary

Modifier and TypeField and Description
private final LexerActionExecutor
private final int

Constructor Summary

AccessConstructor and Description
public
AcceptStateInfo(int prediction)

public
AcceptStateInfo(int prediction, LexerActionExecutor lexerActionExecutor)

Method Summary

Modifier and TypeMethod and Description
public LexerActionExecutor
getLexerActionExecutor()

Gets the LexerActionExecutor which can be used to execute actions and/or commands after the lexer matches a token.

public int
getPrediction()

Gets the prediction made by this accept state.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

lexerActionExecutorback to summary
private final LexerActionExecutor lexerActionExecutor
predictionback to summary
private final int prediction

Constructor Detail

AcceptStateInfoback to summary
public AcceptStateInfo(int prediction)
AcceptStateInfoback to summary
public AcceptStateInfo(int prediction, LexerActionExecutor lexerActionExecutor)

Method Detail

getLexerActionExecutorback to summary
public LexerActionExecutor getLexerActionExecutor()

Gets the LexerActionExecutor which can be used to execute actions and/or commands after the lexer matches a token.

getPredictionback to summary
public int getPrediction()

Gets the prediction made by this accept state. Note that this value assumes the predicates, if any, in the DFAState evaluate to true. If predicate evaluation is enabled, the final prediction of the accept state will be determined by the result of predicate evaluation.