public final class NFAState extends BasicState<NFAState,NFAStateTransition> implements JsonConvertible
FLAG_ANCHORED_FINAL_STATE, FLAG_ANCHORED_INITIAL_STATE, FLAG_ANY_FINAL_STATE, FLAG_ANY_INITIAL_OR_FINAL_STATE, FLAG_ANY_INITIAL_STATE, FLAG_UN_ANCHORED_FINAL_STATE, FLAG_UN_ANCHORED_INITIAL_STATE, N_FLAGS| Constructor and Description |
|---|
NFAState(short id,
StateSet<RegexAST,? extends RegexASTNode> stateSet,
CodePointSet matcherBuilder,
Set<LookBehindAssertion> finishedLookBehinds,
boolean hasPrefixStates,
boolean mustAdvance) |
addPredecessor, addPredecessorUnchecked, getFlag, getFlags, getId, getNPredecessors, getPredecessors, getPredecessors, getSuccessors, getSuccessors, hasPredecessors, hasSuccessors, incPredecessors, isAnchoredFinalState, isAnchoredFinalState, isAnchoredInitialState, isAnchoredInitialState, isDead, isFinalState, isFinalState, isInitialState, isInitialState, isUnAnchoredFinalState, isUnAnchoredFinalState, isUnAnchoredInitialState, isUnAnchoredInitialState, setAnchoredFinalState, setAnchoredInitialState, setFlag, setFlag, setPredecessors, setSuccessors, setUnAnchoredFinalState, setUnAnchoredInitialState, setUnAnchoredInitialStatepublic NFAState(short id,
StateSet<RegexAST,? extends RegexASTNode> stateSet,
CodePointSet matcherBuilder,
Set<LookBehindAssertion> finishedLookBehinds,
boolean hasPrefixStates,
boolean mustAdvance)
public NFAState createTraceFinderCopy(short copyID)
public CodePointSet getCharSet()
public Set<LookBehindAssertion> getFinishedLookBehinds()
public StateSet<RegexAST,? extends RegexASTNode> getStateSet()
public boolean hasPrefixStates()
public void setHasPrefixStates(boolean value)
public boolean isMustAdvance()
public void setMustAdvance(boolean value)
public boolean hasTransitionToAnchoredFinalState(boolean forward)
public short getTransitionToAnchoredFinalStateId(boolean forward)
public NFAStateTransition getTransitionToAnchoredFinalState(boolean forward)
public boolean hasTransitionToUnAnchoredFinalState(boolean forward)
hasTransitionToUnAnchoredFinalState in class BasicState<NFAState,NFAStateTransition>public NFAStateTransition getTransitionToUnAnchoredFinalState(boolean forward)
public short getTransitionToUnAnchoredFinalStateId(boolean forward)
public boolean hasTransitionToFinalState(boolean forward)
public int getFirstTransitionToFinalStateIndex(boolean forward)
public NFAStateTransition getFirstTransitionToFinalState(boolean forward)
public void addLoopBackNext(NFAStateTransition transition)
public void removeLoopBackNext()
public void setSuccessors(NFAStateTransition[] transitions, boolean createReverseTransitions)
public void removeSuccessor(NFAState state)
public void linkPredecessors()
public TBitSet getPossibleResults()
NFATraceFinderGenerator. This set must be sorted, since the index values indicate the
priority of their respective pre-calculated results. Example: /(a)|([ab])/ will yield two
possible results, where the one corresponding to capture group 1 will have the higher
priority, so when a single 'a' is encountered when searching for a match, the pre-calculated
result corresponding to capture group 1 must be preferred.public boolean hasPossibleResults()
public void addPossibleResult(int index)
public String idToString()
protected NFAStateTransition[] createTransitionsArray(int length)
createTransitionsArray in class BasicState<NFAState,NFAStateTransition>public JsonObject toJson()
toJson in interface JsonConvertiblepublic JsonObject toJson(boolean forward)