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.
|
| Modifier and Type | Method and Description |
|---|---|
PositionAssertion |
copy(RegexAST ast)
Copy this node only, without any child nodes.
|
Term |
copyRecursive(RegexAST ast,
CompilationBuffer compilationBuffer)
Recursively copy this subtree.
|
boolean |
equalsSemantic(RegexASTNode obj) |
RegexASTNode |
getNext()
Points to the body of a regular expression when this node is treated as an initial state of
an NFA.
|
boolean |
isCaret() |
boolean |
isDollar() |
void |
setNext(RegexASTNode next) |
JsonValue |
toJson() |
String |
toString() |
getSeqIndex, getSubTreeParent, setSeqIndexasAtomicGroup, asBackReference, asCharacterClass, asConditionalBackReferenceGroup, asGroup, asLookAheadAssertion, asLookAroundAssertion, asLookBehindAssertion, asMatchFound, asPositionAssertion, asQuantifiableTerm, asSequence, asSubtreeRootNode, astNodeId, endsWithDollar, getFlags, getId, getMaxPath, getMinPath, getParent, getPrefixLengthMax, getPrefixLengthMin, hasBackReferences, hasCaptureGroups, hasCaret, hasDollar, hasEmptyGuard, hasLookAheads, hasLookBehinds, hasLoops, hasQuantifiers, hasVariablePrefixLength, idInitialized, incMaxPath, incMaxPath, incMinPath, incMinPath, isAtomicGroup, isBackReference, isCharacterClass, isConditionalBackReferenceGroup, isDead, isExpandedQuantifier, isFlagSet, isGroup, isInLookAheadAssertion, isInLookBehindAssertion, isLookAheadAssertion, isLookAroundAssertion, isLookBehindAssertion, isMatchFound, isPositionAssertion, isPrefix, isQuantifiableTerm, isRoot, isSequence, isSubtreeRoot, markAsDead, setDead, setEmptyGuard, setEndsWithDollar, setEndsWithDollar, setExpandedQuantifier, setFlag, setFlag, setFlags, setHasBackReferences, setHasCaptureGroups, setHasCaret, setHasCaret, setHasDollar, setHasDollar, setHasLookAheads, setHasLookBehinds, setHasLoops, setHasLoops, setHasQuantifiers, setId, setMaxPath, setMinPath, setParent, setPrefix, setPrefixLengthMax, setPrefixLengthMin, setStartsWithCaret, setStartsWithCaret, startsWithCaret, toJson, toStringWithIDclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetIdpublic final PositionAssertion.Type type
public PositionAssertion copy(RegexAST ast)
RegexASTNodepublic Term copyRecursive(RegexAST ast, CompilationBuffer compilationBuffer)
RegexASTNodeCopyVisitor if
the copying process is required to be thread-safe. The ID and minPath of the copied nodes is
left unset.copyRecursive in class Termast - RegexAST the new nodes should belong to.public RegexASTNode getNext()
PositionAssertion.isCaret(), then this returns the next expression. If this
PositionAssertion.isDollar(), then this returns the previous expression.public void setNext(RegexASTNode next)
public boolean isCaret()
isCaret in class RegexASTNodepublic boolean isDollar()
isDollar in class RegexASTNodepublic boolean equalsSemantic(RegexASTNode obj)
equalsSemantic in class RegexASTNodepublic JsonValue toJson()