public class ATNConfig extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
ATNConfig(ATNConfig c,
ATNState state,
PredictionContext context) |
protected |
ATNConfig(ATNState state,
int alt,
PredictionContext context) |
| Modifier and Type | Method and Description |
|---|---|
ATNConfig |
appendContext(int context,
PredictionContextCache contextCache) |
ATNConfig |
appendContext(PredictionContext context,
PredictionContextCache contextCache) |
ATNConfig |
clone() |
boolean |
contains(ATNConfig subconfig) |
static ATNConfig |
create(ATNState state,
int alt,
PredictionContext context) |
static ATNConfig |
create(ATNState state,
int alt,
PredictionContext context,
SemanticContext semanticContext) |
static ATNConfig |
create(ATNState state,
int alt,
PredictionContext context,
SemanticContext semanticContext,
LexerActionExecutor lexerActionExecutor) |
boolean |
equals(ATNConfig other) |
boolean |
equals(Object o)
An ATN configuration is equal to another if both have
the same state, they predict the same alternative, and
syntactic/semantic contexts are the same.
|
int |
getAlt()
What alt (or lexer rule) is predicted by this configuration
|
PredictionContext |
getContext() |
LexerActionExecutor |
getLexerActionExecutor() |
int |
getOuterContextDepth()
We cannot execute predicates dependent upon local context unless
we know for sure we are in the correct context.
|
boolean |
getReachesIntoOuterContext() |
SemanticContext |
getSemanticContext() |
ATNState |
getState()
Gets the ATN state associated with this configuration
|
int |
hashCode() |
boolean |
hasPassedThroughNonGreedyDecision() |
boolean |
isPrecedenceFilterSuppressed() |
void |
setContext(PredictionContext context) |
void |
setOuterContextDepth(int outerContextDepth) |
void |
setPrecedenceFilterSuppressed(boolean value) |
String |
toDotString() |
String |
toString() |
String |
toString(Recognizer<?,?> recog,
boolean showAlt) |
String |
toString(Recognizer<?,?> recog,
boolean showAlt,
boolean showContext) |
ATNConfig |
transform(ATNState state,
boolean checkNonGreedy) |
ATNConfig |
transform(ATNState state,
LexerActionExecutor lexerActionExecutor,
boolean checkNonGreedy) |
ATNConfig |
transform(ATNState state,
PredictionContext context,
boolean checkNonGreedy) |
ATNConfig |
transform(ATNState state,
SemanticContext semanticContext,
boolean checkNonGreedy) |
protected ATNConfig(@NotNull ATNState state, int alt, @NotNull PredictionContext context)
public static ATNConfig create(@NotNull ATNState state, int alt, @Nullable PredictionContext context)
public static ATNConfig create(@NotNull ATNState state, int alt, @Nullable PredictionContext context, @NotNull SemanticContext semanticContext)
public static ATNConfig create(@NotNull ATNState state, int alt, @Nullable PredictionContext context, @NotNull SemanticContext semanticContext, LexerActionExecutor lexerActionExecutor)
@NotNull public final ATNState getState()
public final int getAlt()
@NotNull public final PredictionContext getContext()
public void setContext(@NotNull PredictionContext context)
public final boolean getReachesIntoOuterContext()
public final int getOuterContextDepth()
closure() tracks the depth of how far we dip into the outer context: depth > 0. Note that it may not be totally accurate depth since I don't ever decrement. TODO: make it a boolean then
public void setOuterContextDepth(int outerContextDepth)
@Nullable public LexerActionExecutor getLexerActionExecutor()
@NotNull public SemanticContext getSemanticContext()
public boolean hasPassedThroughNonGreedyDecision()
public final ATNConfig transform(@NotNull ATNState state, @NotNull SemanticContext semanticContext, boolean checkNonGreedy)
public final ATNConfig transform(@NotNull ATNState state, @Nullable PredictionContext context, boolean checkNonGreedy)
public final ATNConfig transform(@NotNull ATNState state, LexerActionExecutor lexerActionExecutor, boolean checkNonGreedy)
public ATNConfig appendContext(int context, PredictionContextCache contextCache)
public ATNConfig appendContext(PredictionContext context, PredictionContextCache contextCache)
public boolean contains(ATNConfig subconfig)
public final boolean isPrecedenceFilterSuppressed()
public final void setPrecedenceFilterSuppressed(boolean value)
public boolean equals(Object o)
public boolean equals(ATNConfig other)
public String toDotString()
public String toString(@Nullable Recognizer<?,?> recog, boolean showAlt)
public String toString(@Nullable Recognizer<?,?> recog, boolean showAlt, boolean showContext)
Copyright © 1992–2015 ANTLR. All rights reserved.