Class AcceptStateInfo

java.lang.Object
org.antlr.v4.runtime.dfa.AcceptStateInfo

public class AcceptStateInfo extends Object
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 Details

    • prediction

      private final int prediction
    • lexerActionExecutor

      private final LexerActionExecutor lexerActionExecutor
  • Constructor Details

    • AcceptStateInfo

      public AcceptStateInfo(int prediction)
    • AcceptStateInfo

      public AcceptStateInfo(int prediction, LexerActionExecutor lexerActionExecutor)
  • Method Details

    • getPrediction

      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.
    • getLexerActionExecutor

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