Package org.antlr.v4.runtime.atn
Class PredicateTransition
- java.lang.Object
-
- org.antlr.v4.runtime.atn.Transition
-
- org.antlr.v4.runtime.atn.AbstractPredicateTransition
-
- org.antlr.v4.runtime.atn.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 Summary
Fields Modifier and Type Field Description booleanisCtxDependentintpredIndexintruleIndex-
Fields inherited from class org.antlr.v4.runtime.atn.Transition
ACTION, ATOM, EPSILON, NOT_SET, PRECEDENCE, PREDICATE, RANGE, RULE, serializationNames, serializationTypes, SET, target, WILDCARD
-
-
Constructor Summary
Constructors Constructor Description PredicateTransition(ATNState target, int ruleIndex, int predIndex, boolean isCtxDependent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SemanticContext.PredicategetPredicate()intgetSerializationType()booleanisEpsilon()Determines if the transition is an "epsilon" transition.booleanmatches(int symbol, int minVocabSymbol, int maxVocabSymbol)StringtoString()-
Methods inherited from class org.antlr.v4.runtime.atn.Transition
label
-
-
-
-
Constructor Detail
-
PredicateTransition
public PredicateTransition(ATNState target, int ruleIndex, int predIndex, boolean isCtxDependent)
-
-
Method Detail
-
getSerializationType
public int getSerializationType()
- Specified by:
getSerializationTypein classTransition
-
isEpsilon
public boolean isEpsilon()
Description copied from class:TransitionDetermines if the transition is an "epsilon" transition.The default implementation returns
false.- Overrides:
isEpsilonin classTransition- Returns:
trueif traversing this transition in the ATN does not consume an input symbol; otherwise,falseif traversing this transition consumes (matches) an input symbol.
-
matches
public boolean matches(int symbol, int minVocabSymbol, int maxVocabSymbol)- Specified by:
matchesin classTransition
-
getPredicate
public SemanticContext.Predicate getPredicate()
-
-