public final class PureNFA extends Object implements StateIndex<PureNFAState>
RegexASTSubtreeRootNode.| Constructor and Description |
|---|
PureNFA(RegexASTSubtreeRootNode astSubRoot,
PureNFAState[] states,
Counter.ThresholdCounter stateIDCounter,
Counter.ThresholdCounter transitionIDCounter) |
| Modifier and Type | Method and Description |
|---|---|
PureNFATransition |
getAnchoredEntry() |
PureNFAState |
getAnchoredFinalState() |
PureNFAState |
getAnchoredInitialState() |
PureNFAState |
getAnchoredInitialState(boolean forward) |
PureNFAState |
getDummyInitialState()
Get this NFA's "dummy initial state".
|
int |
getId(PureNFAState state) |
int |
getNumberOfEntryPoints() |
int |
getNumberOfStates() |
PureNFATransition |
getReverseAnchoredEntry() |
PureNFATransition |
getReverseUnAnchoredEntry() |
PureNFAState |
getState(int id) |
PureNFAState[] |
getStates() |
int |
getSubTreeId()
Subtree ID of the
RegexASTSubtreeRootNode this NFA was generated from. |
PureNFATransition[] |
getTransitions() |
PureNFATransition |
getUnAnchoredEntry() |
PureNFAState |
getUnAnchoredFinalState() |
PureNFAState |
getUnAnchoredInitialState() |
PureNFAState |
getUnAnchoredInitialState(boolean forward) |
void |
materializeGroupBoundaries() |
JsonValue |
toJson(RegexAST ast) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisEmptypublic PureNFA(RegexASTSubtreeRootNode astSubRoot, PureNFAState[] states, Counter.ThresholdCounter stateIDCounter, Counter.ThresholdCounter transitionIDCounter)
public int getSubTreeId()
Subtree ID of the
RegexASTSubtreeRootNode this NFA was generated from.public PureNFAState getDummyInitialState()
DFAGenerator works on sets of NFA
transitions, we need pseudo-transitions to the NFA's initial states as entry points for the
DFA generator. The dummy initial state provides these transitions, in a fixed layout: The
first half of its successors lead to the NFA's anchored
initial states, and the second half leads to the unanchored initial states. The dummy initial
state's predecessors are the NFA's anchored and
unanchored final state, in that order. They serve as entry points for reverse DFAs.public int getNumberOfEntryPoints()
public PureNFATransition getAnchoredEntry()
public PureNFATransition getUnAnchoredEntry()
public PureNFAState getUnAnchoredInitialState()
public PureNFAState getAnchoredInitialState()
public PureNFATransition getReverseAnchoredEntry()
public PureNFATransition getReverseUnAnchoredEntry()
public PureNFAState getUnAnchoredFinalState()
public PureNFAState getAnchoredFinalState()
public PureNFAState getUnAnchoredInitialState(boolean forward)
public PureNFAState getAnchoredInitialState(boolean forward)
public PureNFAState[] getStates()
public PureNFATransition[] getTransitions()
public int getNumberOfStates()
getNumberOfStates in interface StateIndex<PureNFAState>public int getId(PureNFAState state)
getId in interface StateIndex<PureNFAState>public PureNFAState getState(int id)
getState in interface StateIndex<PureNFAState>public void materializeGroupBoundaries()