Class ConflictInfo

java.lang.Object
org.antlr.v4.runtime.atn.ConflictInfo

public class ConflictInfo extends Object
This class stores information about a configuration conflict.
  • Field Details

    • conflictedAlts

      private final BitSet conflictedAlts
    • exact

      private final boolean exact
  • Constructor Details

    • ConflictInfo

      public ConflictInfo(BitSet conflictedAlts, boolean exact)
  • Method Details

    • getConflictedAlts

      public final BitSet getConflictedAlts()
      Gets the set of conflicting alternatives for the configuration set.
    • isExact

      public final boolean isExact()
      Gets whether or not the configuration conflict is an exact conflict. An exact conflict occurs when the prediction algorithm determines that the represented alternatives for a particular configuration set cannot be further reduced by consuming additional input. After reaching an exact conflict during an SLL prediction, only switch to full-context prediction could reduce the set of viable alternatives. In LL prediction, an exact conflict indicates a true ambiguity in the input.

      For the PredictionMode.LL_EXACT_AMBIG_DETECTION prediction mode, accept states are conflicting but not exact are treated as non-accept states.

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object