public abstract class Transition extends Object
This is a one way link. It emanates from a state (usually via a list of transitions) and has a target state.
Since we never have to change the ATN transitions once we construct it, we can fix these transitions as specific classes. The DFA transitions on the other hand need to update the labels as it adds transitions to the states. We'll use the term Edge for the DFA to distinguish them from ATN transitions.
Modifier and Type | Field and Description |
---|---|
static int |
ACTION |
static int |
ATOM |
static int |
EPSILON |
static int |
NOT_SET |
static int |
PRECEDENCE |
static int |
PREDICATE |
static int |
RANGE |
static int |
RULE |
static List<String> |
serializationNames |
static Map<Class<? extends Transition>,Integer> |
serializationTypes |
static int |
SET |
ATNState |
target
The target of this transition.
|
static int |
WILDCARD |
Modifier | Constructor and Description |
---|---|
protected |
Transition(ATNState target) |
Modifier and Type | Method and Description |
---|---|
abstract int |
getSerializationType() |
boolean |
isEpsilon()
Are we epsilon, action, sempred?
|
IntervalSet |
label() |
abstract boolean |
matches(int symbol,
int minVocabSymbol,
int maxVocabSymbol) |
public static final int EPSILON
public static final int RANGE
public static final int RULE
public static final int PREDICATE
public static final int ATOM
public static final int ACTION
public static final int SET
public static final int NOT_SET
public static final int WILDCARD
public static final int PRECEDENCE
public static final Map<Class<? extends Transition>,Integer> serializationTypes
public abstract int getSerializationType()
public boolean isEpsilon()
@Nullable public IntervalSet label()
public abstract boolean matches(int symbol, int minVocabSymbol, int maxVocabSymbol)
Copyright © 1992–2014 ANTLR. All rights reserved.