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 boolean
isCtxDependent
int
predIndex
int
ruleIndex
-
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.Predicate
getPredicate()
int
getSerializationType()
boolean
isEpsilon()
Determines if the transition is an "epsilon" transition.boolean
matches(int symbol, int minVocabSymbol, int maxVocabSymbol)
String
toString()
-
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:
getSerializationType
in classTransition
-
isEpsilon
public boolean isEpsilon()
Description copied from class:Transition
Determines if the transition is an "epsilon" transition.The default implementation returns
false
.- Overrides:
isEpsilon
in classTransition
- Returns:
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 classTransition
-
getPredicate
public SemanticContext.Predicate getPredicate()
-
-