public final class PureNFA extends Object implements StateIndex<PureNFAState>
RegexASTSubtreeRootNode.| Constructor and Description |
|---|
PureNFA(RegexASTSubtreeRootNode astSubRoot,
PureNFAState[] states,
Counter.ThresholdCounter stateIDCounter,
Counter.ThresholdCounter transitionIDCounter) |
clone, equals, 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 int getGlobalSubTreeId()
public boolean isRoot()
public RegexASTSubtreeRootNode getASTSubtree(RegexAST ast)
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 PureNFA[] getSubtrees()
public int getNumberOfStates()
getNumberOfStates in interface StateIndex<PureNFAState>public int getNumberOfTransitions()
public int getId(PureNFAState state)
getId in interface StateIndex<PureNFAState>public PureNFAState getState(int id)
getState in interface StateIndex<PureNFAState>public void materializeGroupBoundaries()
public CodePointSet getMergedInitialStateCharSet(RegexAST ast, CompilationBuffer compilationBuffer)
CodePointSet that matches the union of all code point sets of
character class successor states of the root NFA's
unanchored initial state. If this can not be
calculated, e.g. because one of the successors is an empty
match state, null is returned.