public class NFAState extends State
Modifier and Type | Field | Description |
---|---|---|
GrammarAST |
associatedASTNode |
Associate this NFAState with the corresponding GrammarAST node
from which this node was created.
|
static int |
BLOCK_START |
|
static int |
BYPASS |
|
protected int |
decisionNumber |
What's its decision number from 1..n?
|
int |
decisionStateType |
Subrules (...)* and (...)+ have more than one decision point in
the NFA created for them.
|
protected String |
description |
During debugging and for nondeterminism warnings, it's useful
to know what relationship this node has to the original grammar.
|
Rule |
enclosingRule |
What rule do we live in?
|
int |
endOfBlockStateNumber |
Jean Bovet needs in the GUI to know which state pairs correspond
to the start/stop of a block.
|
protected boolean |
EOTTargetState |
Is this state the sole target of an EOT transition?
|
Label |
incidentEdgeLabel |
For o-A->o type NFA tranitions, record the label that leads to this
state.
|
static int |
LOOPBACK |
|
static int |
MAX_TRANSITIONS |
|
NFA |
nfa |
Which NFA are we in?
|
static int |
OPTIONAL_BLOCK_START |
|
static int |
RIGHT_EDGE_OF_BLOCK |
|
Transition[] |
transition |
acceptState, INVALID_STATE_NUMBER, stateNumber
Modifier and Type | Method | Description |
---|---|---|
void |
addTransition(Transition e) |
|
int |
getDecisionNumber() |
|
String |
getDescription() |
|
int |
getNumberOfTransitions() |
|
boolean |
isDecisionState() |
|
boolean |
isEOTTargetState() |
|
void |
setDecisionASTNode(GrammarAST decisionASTNode) |
What AST node is associated with this NFAState? When you
set the AST node, I set the node to point back to this NFA state.
|
void |
setDecisionNumber(int decisionNumber) |
|
void |
setDescription(String description) |
|
void |
setEOTTargetState(boolean eot) |
|
void |
setTransition0(Transition e) |
Used during optimization to reset a state to have the (single)
transition another state has.
|
String |
toString() |
|
Transition |
transition(int i) |
|
int |
translateDisplayAltToWalkAlt(int displayAlt) |
The DFA decision for this NFA decision state always has
an exit path for loops as n+1 for n alts in the loop.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isAcceptState, setAcceptState
public static final int LOOPBACK
public static final int BLOCK_START
public static final int OPTIONAL_BLOCK_START
public static final int BYPASS
public static final int RIGHT_EDGE_OF_BLOCK
public static final int MAX_TRANSITIONS
public Transition[] transition
public Label incidentEdgeLabel
public NFA nfa
protected int decisionNumber
public int decisionStateType
public Rule enclosingRule
protected String description
public GrammarAST associatedASTNode
protected boolean EOTTargetState
public int endOfBlockStateNumber
public NFAState(NFA nfa)
public int getNumberOfTransitions()
getNumberOfTransitions
in class State
public void addTransition(Transition e)
addTransition
in class State
public void setTransition0(Transition e)
public Transition transition(int i)
transition
in class State
public int translateDisplayAltToWalkAlt(int displayAlt)
public void setDecisionASTNode(GrammarAST decisionASTNode)
public String getDescription()
public void setDescription(String description)
public int getDecisionNumber()
public void setDecisionNumber(int decisionNumber)
public boolean isEOTTargetState()
public void setEOTTargetState(boolean eot)
public boolean isDecisionState()
Copyright © 1992–2019 ANTLR. All rights reserved.