public class State extends Object implements JapeConstants
Modifier and Type | Field and Description |
---|---|
protected RightHandSide |
action
The right hand side associated to the rule for which this state recognizes
the lhs.
|
protected int |
fileIndex
The index in the definition file of the rule that was used for creating
this state.
|
protected static int |
index
The class data member used for generating unique indices for State
instances.
|
static int |
INITIAL_INDEX |
static String |
INITIAL_RULE |
protected boolean |
isFinal
Is this state a final one?
|
protected int |
myIndex
The unique index of this state.
|
protected int |
priority
The priority of the rule from which this state derived.
|
static int |
UNKNOWN_INDEX |
static String |
UNKNOWN_RULE |
static int |
UNVISITED_INDEX |
static String |
UNVISITED_RULE |
static int |
VISITED_INDEX |
ALL_STYLE, APPELT_STYLE, BRILL_STYLE, DEFAULT_PRIORITY, FIRST_STYLE, INDENT_PADDING, KLEENE_PLUS, KLEENE_QUERY, KLEENE_STAR, MULTI_SPAN_BINDING, NO_BINDING, NO_KLEENE_OP, ONCE_STYLE, SINGLE_SPAN_BINDING
Constructor and Description |
---|
State()
Build a new state.
|
Modifier and Type | Method and Description |
---|---|
void |
addTransition(Transition transition)
Adds a new transition to the list of outgoing transitions for this state.
|
RightHandSide |
getAction()
Gets the action associated to this state.
|
String |
getEdgesGML()
Returns a GML (graph modelling language) representation for the edges
corresponding to transitions departing from this state in the
transition graph of the FSM to which this state belongs
|
protected int |
getFileIndex()
Returns the index in the definition file of the rule that generated this
state.
|
int |
getIndex()
Gets the index of this state.
|
int |
getIndexInRuleList() |
protected int |
getPriority()
Returns the priority in the definition file of the rule that generated
this state.
|
int |
getRuleForState(Map<String,Integer> ruleNameToIndexMap,
List<RuleTime> ruleTimes)
Sets the index of the rule for this state.
|
SimpleArraySet<Transition> |
getTransitions()
Gets the set of transitions for this state.
|
boolean |
isFinal()
Reports if this state is a final one.
|
protected void |
setAction(RightHandSide rhs)
Sets the action associated to this FINAL state.
|
protected void |
setFileIndex(int i)
Sets the value for fileIndex.
|
protected void |
setPriority(int i)
Sets the value for priority.
|
String |
toString()
Returns a textual description of this state
|
public static final int UNKNOWN_INDEX
public static final int VISITED_INDEX
public static final int UNVISITED_INDEX
public static final int INITIAL_INDEX
public static final String INITIAL_RULE
public static final String UNKNOWN_RULE
public static final String UNVISITED_RULE
protected boolean isFinal
protected RightHandSide action
protected int myIndex
protected static int index
protected int fileIndex
protected int priority
public State()
public int getIndexInRuleList()
public int getRuleForState(Map<String,Integer> ruleNameToIndexMap, List<RuleTime> ruleTimes)
public boolean isFinal()
public SimpleArraySet<Transition> getTransitions()
protected void setAction(RightHandSide rhs)
protected void setFileIndex(int i)
protected void setPriority(int i)
public RightHandSide getAction()
protected int getFileIndex()
protected int getPriority()
public void addTransition(Transition transition)
transition
- the transition to be addedpublic int getIndex()
public String getEdgesGML()