public class PositionAssertion extends Term
Corresponds to the ^ and $ right-hand sides of the Assertion goal symbol in the ECMAScript RegExp syntax.
PositionAssertion nodes are also used for state sets of NFA initial states, which is why
they can have a next-pointer (PositionAssertion.getNext()), see
RegexAST.getNFAAnchoredInitialState(int).
| Modifier and Type | Class and Description |
|---|---|
static class |
PositionAssertion.Type
The position assertions supported by ECMAScript RegExps.
|
| Modifier and Type | Field and Description |
|---|---|
PositionAssertion.Type |
type
Indicates which position assertion this node represents.
|
FLAG_CHARACTER_CLASS_WAS_SINGLE_CHAR, FLAG_EMPTY_GUARD, FLAG_GROUP_EXPANDED_QUANTIFIER, FLAG_GROUP_LOOP, FLAG_HAS_LOOPS, FLAG_LOOK_AROUND_NEGATED| Modifier and Type | Method and Description |
|---|---|
PositionAssertion |
copy(RegexAST ast,
boolean recursive)
Copy this node, in one of the following ways:
if
recursive is true, recursively copy this subtree. |
boolean |
equalsSemantic(RegexASTNode obj,
boolean ignoreQuantifier) |
RegexASTNode |
getNext() |
void |
setNext(RegexASTNode next) |
JsonValue |
toJson() |
String |
toString() |
equalsSemantic, getQuantifier, getSeqIndex, getSubTreeParent, hasQuantifier, quantifierToString, setQuantifier, setSeqIndexastNodeId, endsWithDollar, getId, getMaxPath, getMinPath, getParent, hasEmptyGuard, hasLoops, idInitialized, incMaxPath, incMaxPath, incMinPath, incMinPath, isDead, isFlagSet, isInLookAheadAssertion, isInLookBehindAssertion, isPrefix, markAsDead, setEmptyGuard, setEndsWithDollar, setEndsWithDollar, setFlag, setFlag, setHasLoops, setHasLoops, setId, setMaxPath, setMinPath, setParent, setPrefix, setStartsWithCaret, setStartsWithCaret, startsWithCaret, toJson, toStringWithIDpublic final PositionAssertion.Type type
public PositionAssertion copy(RegexAST ast, boolean recursive)
RegexASTNoderecursive is true, recursively copy this subtree. This method should
be used instead of CopyVisitor if the copying process is required to be thread-safe.
public RegexASTNode getNext()
public void setNext(RegexASTNode next)
public boolean equalsSemantic(RegexASTNode obj, boolean ignoreQuantifier)
equalsSemantic in class Termpublic JsonValue toJson()