public final class PredicateTransition extends AbstractPredicateTransition
Modifier and Type | Field and Description |
---|---|
boolean |
isCtxDependent |
int |
predIndex |
int |
ruleIndex |
ACTION, ATOM, EPSILON, NOT_SET, PRECEDENCE, PREDICATE, RANGE, RULE, serializationNames, serializationTypes, SET, target, WILDCARD
Constructor and Description |
---|
PredicateTransition(ATNState target,
int ruleIndex,
int predIndex,
boolean isCtxDependent) |
Modifier and Type | Method and Description |
---|---|
SemanticContext.Predicate |
getPredicate() |
int |
getSerializationType() |
boolean |
isEpsilon()
Determines if the transition is an "epsilon" transition.
|
boolean |
matches(int symbol,
int minVocabSymbol,
int maxVocabSymbol) |
java.lang.String |
toString() |
label
public final int ruleIndex
public final int predIndex
public final boolean isCtxDependent
public PredicateTransition(ATNState target, int ruleIndex, int predIndex, boolean isCtxDependent)
public int getSerializationType()
getSerializationType
in class Transition
public boolean isEpsilon()
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.public boolean matches(int symbol, int minVocabSymbol, int maxVocabSymbol)
matches
in class Transition
public SemanticContext.Predicate getPredicate()
public java.lang.String toString()
toString
in class java.lang.Object