Class DFAInitialStateNode
java.lang.Object
com.oracle.truffle.regex.tregex.nodes.dfa.DFAAbstractStateNode
com.oracle.truffle.regex.tregex.nodes.dfa.DFAInitialStateNode
- All Implemented Interfaces:
JsonConvertible
This state node is responsible for selecting a DFA's initial state based on the index the search
starts from. Successors are entry points in case we start matching at the beginning of the input
string, followed by entry points in case we do not start matching at the beginning of the input
string. If possible matches must start at the beginning of the input string, entry points may be
-1.
-
Field Summary
Fields inherited from class com.oracle.truffle.regex.tregex.nodes.dfa.DFAAbstractStateNode
successors -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateNodeSplitCopy(short copyID) Creates a node split copy of this initial state as described inDFAAbstractStateNode, but ignores copyID, since having two initial states in a DFA is not supported.short[]intbooleantoJson()Methods inherited from class com.oracle.truffle.regex.tregex.nodes.dfa.DFAAbstractStateNode
getId, getSuccessors
-
Constructor Details
-
DFAInitialStateNode
public DFAInitialStateNode(short[] successors, short[] cgLastTransition)
-
-
Method Details
-
getCgLastTransition
public short[] getCgLastTransition() -
getPrefixLength
public int getPrefixLength() -
hasUnAnchoredEntry
public boolean hasUnAnchoredEntry() -
createNodeSplitCopy
Creates a node split copy of this initial state as described inDFAAbstractStateNode, but ignores copyID, since having two initial states in a DFA is not supported. Therefore, this method should be used for replacing the original initial state with the copy.- Specified by:
createNodeSplitCopyin classDFAAbstractStateNode- Parameters:
copyID- new ID for the copy.- Returns:
- a node split copy of this initial state as described in
DFAAbstractStateNode, ignoring copyID.
-
toJson
-