Package relaxngcc.automaton
Class State
java.lang.Object
relaxngcc.automaton.State
- All Implemented Interfaces:
Comparable
A State object has zero or more Transition objects
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addActionsOnExit
(ScopeInfo.Action[] act) void
AFollow()
attHead()
Computes ATTHEAD set of this state and returns them in a sorted order.void
Computes AFOLLOW from this state.int
finds a transition invoked by the passed alphabetint
getIndex()
State[]
Gets all the states reachable from this state.boolean
hasTransition
(int alphabetTypes) Checks if this state has transitions with at least one of given types of alphabets.head
(boolean includeEE) Computes HEAD set of this state.boolean
iterateTransitions
(int alphabetTypes) Iterate transitions with specified alphabets.void
void
mergeTransitions
(State s, ScopeInfo.Action action) For all the transitions leaving from the specified state, add it to this state by appending the specified action (possibly null) at the head of its prologue actions.void
Gets the code to invoke exit-actions.void
void
setAcceptable
(boolean newvalue)
-
Field Details
-
_locationHint
Pattern from which this state was created.
-
-
Constructor Details
-
State
- Parameters:
location
- Indicates the pattern object from which this state is created.
-
-
Method Details
-
setAcceptable
public void setAcceptable(boolean newvalue) -
isAcceptable
public boolean isAcceptable() -
getActionsOnExit
-
outputActionsOnExit
Gets the code to invoke exit-actions. -
addActionOnExit
-
addActionsOnExit
-
getContainer
-
getIndex
public int getIndex() -
addTransition
-
removeTransition
-
iterateTransitions
-
hasTransition
public boolean hasTransition(int alphabetTypes) Checks if this state has transitions with at least one of given types of alphabets.- Parameters:
alphabetTypes
- OR-ed combination of alphabet types you want to iterate.
-
iterateTransitions
Iterate transitions with specified alphabets.- Parameters:
alphabetTypes
- OR-ed combination of alphabet types you want to iterate.
-
compareTo
- Specified by:
compareTo
in interfaceComparable
-
mergeTransitions
-
mergeTransitions
For all the transitions leaving from the specified state, add it to this state by appending the specified action (possibly null) at the head of its prologue actions. -
findTransition
finds a transition invoked by the passed alphabet -
getReachableStates
Gets all the states reachable from this state. -
head
Computes HEAD set of this state. SeeHead
for the definition. -
attHead
Computes ATTHEAD set of this state and returns them in a sorted order. SeeHEAD
for the definition. -
AFollow
-
calcAFOLLOW
public void calcAFOLLOW()Computes AFOLLOW from this state.
-