public abstract class NFATraversalRegexASTVisitor extends Object
CharacterClass or a
MatchFound node.
Examples:
Successors of "b" in (a|b)c:
1.: "c"
Successors of "b" in (a|b)*c:
1.: "a"
2.: "b"
3.: "c"
For every successor, the visitor will find the full path of AST nodes that have been traversed
from the initial node to the successor node, where Group nodes are treated specially: The
path will contain separate entries for entering and leaving a Group,
and a special pass-through node for empty sequences of Groups marked with
RegexASTNode.isExpandedQuantifier(). Furthermore, the visitor will not descend into lookaround
assertions, it will jump over them and just add their corresponding LookAheadAssertion or
LookBehindAssertion node to the path.
Examples with full path information:
Successors of "b" in (a|b)c:
1.: [leave group 1], [CharClass c]
Successors of "b" in (a|b)*c:
1.: [leave group 1], [enter group 1], [CharClass a]
2.: [leave group 1], [enter group 1], [CharClass b]
3.: [leave group 1], [CharClass c]
| Modifier | Constructor and Description |
|---|---|
protected |
NFATraversalRegexASTVisitor(RegexAST ast) |
protected final RegexAST ast
protected NFATraversalRegexASTVisitor(RegexAST ast)
public Set<LookBehindAssertion> getTraversableLookBehindAssertions()
public void setTraversableLookBehindAssertions(Set<LookBehindAssertion> traversableLookBehindAssertions)
public boolean canTraverseCaret()
public void setCanTraverseCaret(boolean canTraverseCaret)
public void setMatchedConditionGroups(TBitSet matchedConditionGroups)
public TBitSet getMatchedConditionGroups()
protected TBitSet getCurrentMatchedConditionGroups()
protected boolean isReverse()
public void setReverse(boolean reverse)
protected abstract boolean isBuildingDFA()
protected abstract boolean canPruneAfterUnconditionalFinalState()
protected void run(Term runRoot)
protected abstract void visit(RegexASTNode target)
protected abstract void enterLookAhead(LookAheadAssertion assertion)
protected abstract void leaveLookAhead(LookAheadAssertion assertion)
protected boolean caretsOnPath()
protected boolean dollarsOnPath()
protected boolean hasQuantifierGuards()
protected QuantifierGuard[] getQuantifierGuardsOnPath()
protected void calcQuantifierGuards()
protected PositionAssertion getLastDollarOnPath()
protected GroupBoundaries getGroupBoundaries()