|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.antlr.analysis.State
org.antlr.analysis.NFAState
public class NFAState
A state within an NFA. At most 2 transitions emanate from any NFA state.
Field Summary | |
---|---|
protected 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 java.lang.String |
description
During debugging and for nondeterminism warnings, it's useful to know what relationship this node has to the original grammar. |
protected java.lang.String |
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? |
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
|
Fields inherited from class org.antlr.analysis.State |
---|
acceptState, INVALID_STATE_NUMBER, stateNumber |
Constructor Summary | |
---|---|
NFAState(NFA nfa)
|
Method Summary | |
---|---|
void |
addTransition(Transition e)
|
GrammarAST |
getAssociatedASTNode()
|
int |
getDecisionNumber()
|
java.lang.String |
getDescription()
|
java.lang.String |
getEnclosingRule()
|
int |
getNumberOfTransitions()
|
boolean |
isDecisionState()
|
boolean |
isEOTTargetState()
|
void |
setAssociatedASTNode(GrammarAST ASTNode)
|
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(java.lang.String description)
|
void |
setEnclosingRuleName(java.lang.String rule)
|
void |
setEOTTargetState(boolean eot)
|
void |
setTransition0(Transition e)
Used during optimization to reset a state to have the (single) transition another state has. |
java.lang.String |
toString()
|
Transition |
transition(int i)
|
int |
translateDisplayAltToWalkAlt(DFA dfa,
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. |
Methods inherited from class org.antlr.analysis.State |
---|
isAcceptState, setAcceptState |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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 NFA nfa
protected int decisionNumber
public int decisionStateType
protected java.lang.String enclosingRule
protected java.lang.String description
protected GrammarAST associatedASTNode
protected boolean EOTTargetState
public int endOfBlockStateNumber
Constructor Detail |
---|
public NFAState(NFA nfa)
Method Detail |
---|
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(DFA dfa, int displayAlt)
public void setDecisionASTNode(GrammarAST decisionASTNode)
public GrammarAST getAssociatedASTNode()
public void setAssociatedASTNode(GrammarAST ASTNode)
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
public int getDecisionNumber()
public void setDecisionNumber(int decisionNumber)
public void setEnclosingRuleName(java.lang.String rule)
public java.lang.String getEnclosingRule()
public boolean isEOTTargetState()
public void setEOTTargetState(boolean eot)
public boolean isDecisionState()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |