Class ProfilingATNSimulator


public class ProfilingATNSimulator extends ParserATNSimulator
Since:
4.3
  • Field Details

    • decisions

      protected final DecisionInfo[] decisions
    • numDecisions

      protected int numDecisions
    • _input

      protected TokenStream _input
    • _startIndex

      protected int _startIndex
    • _sllStopIndex

      protected int _sllStopIndex
    • _llStopIndex

      protected int _llStopIndex
    • currentDecision

      protected int currentDecision
    • currentState

      protected SimulatorState currentState
    • conflictingAltResolvedBySLL

      protected int conflictingAltResolvedBySLL
      At the point of LL failover, we record how SLL would resolve the conflict so that we can determine whether or not a decision / input pair is context-sensitive. If LL gives a different result than SLL's predicted alternative, we have a context sensitivity for sure. The converse is not necessarily true, however. It's possible that after conflict resolution chooses minimum alternatives, SLL could get the same answer as LL. Regardless of whether or not the result indicates an ambiguity, it is not treated as a context sensitivity because LL prediction was not required in order to produce a correct prediction for this decision and input sequence. It may in fact still be a context sensitivity but we don't know by looking at the minimum alternatives for the current input.
  • Constructor Details

    • ProfilingATNSimulator

      public ProfilingATNSimulator(Parser parser)
  • Method Details