Class PredicateTransition

  • public final class PredicateTransition
    extends AbstractPredicateTransition
    TODO: this is old comment: A tree of semantic predicates from the grammar AST if label==SEMPRED. In the ATN, labels will always be exactly one predicate, but the DFA may have to combine a bunch of them as it collects predicates from multiple ATN configurations into a single DFA state.
    • Field Detail

      • ruleIndex

        public final int ruleIndex
      • predIndex

        public final int predIndex
      • isCtxDependent

        public final boolean isCtxDependent
    • Constructor Detail

      • PredicateTransition

        public PredicateTransition​(ATNState target,
                                   int ruleIndex,
                                   int predIndex,
                                   boolean isCtxDependent)
    • Method Detail

      • isEpsilon

        public boolean isEpsilon()
        Description copied from class: Transition
        Determines if the transition is an "epsilon" transition.

        The default implementation returns false.

        isEpsilon in class Transition
        true if traversing this transition in the ATN does not consume an input symbol; otherwise, false if traversing this transition consumes (matches) an input symbol.
      • matches

        public boolean matches​(int symbol,
                               int minVocabSymbol,
                               int maxVocabSymbol)
        Specified by:
        matches in class Transition