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 TypeMethodDescriptionvoidvoidaddActionsOnExit(ScopeInfo.Action[] act) voidAFollow()attHead()Computes ATTHEAD set of this state and returns them in a sorted order.voidComputes AFOLLOW from this state.intfinds a transition invoked by the passed alphabetintgetIndex()State[]Gets all the states reachable from this state.booleanhasTransition(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.booleaniterateTransitions(int alphabetTypes) Iterate transitions with specified alphabets.voidvoidmergeTransitions(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.voidGets the code to invoke exit-actions.voidvoidsetAcceptable(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:
compareToin 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. SeeHeadfor the definition. -
attHead
Computes ATTHEAD set of this state and returns them in a sorted order. Seefor the definition.invalid reference
HEAD -
AFollow
-
calcAFOLLOW
public void calcAFOLLOW()Computes AFOLLOW from this state.
-