Class ContextSensitivityInfo

java.lang.Object
org.antlr.v4.runtime.atn.DecisionEventInfo
org.antlr.v4.runtime.atn.ContextSensitivityInfo

public class ContextSensitivityInfo extends DecisionEventInfo
This class represents profiling event information for a context sensitivity. Context sensitivities are decisions where a particular input resulted in an SLL conflict, but LL prediction produced a single unique alternative.

In some cases, the unique alternative identified by LL prediction is not equal to the minimum represented alternative in the conflicting SLL configuration set. Grammars and inputs which result in this scenario are unable to use PredictionMode.SLL, which in turn means they cannot use the two-stage parsing strategy to improve parsing performance for that input.

Since:
4.3
See Also:
  • Constructor Details

    • ContextSensitivityInfo

      public ContextSensitivityInfo(int decision, ATNConfigSet configs, TokenStream input, int startIndex, int stopIndex)
      Constructs a new instance of the ContextSensitivityInfo class with the specified detailed context sensitivity information.
      Parameters:
      decision - The decision number
      configs - The final configuration set containing the unique alternative identified by full-context prediction
      input - The input token stream
      startIndex - The start index for the current prediction
      stopIndex - The index at which the context sensitivity was identified during full-context prediction