public class BackReference extends QuantifiableTerm
Corresponds to the goal symbol DecimalEscape in the ECMAScript RegExp syntax.
Currently not implemented in TRegex and so any use of this node type causes TRegex to bail out.
| Modifier and Type | Method and Description |
|---|---|
BackReference |
copy(RegexAST ast)
Copy this node only, without any child nodes.
|
BackReference |
copyRecursive(RegexAST ast,
CompilationBuffer compilationBuffer)
Recursively copy this subtree.
|
boolean |
equalsSemantic(RegexASTNode obj,
boolean ignoreQuantifier) |
int |
getGroupNr()
Returns the capture group number this back-reference is referring to, e.g.
|
boolean |
isForwardReference() |
boolean |
isNestedBackReference() |
boolean |
isNestedOrForwardReference()
Returns
true iff this "back-reference" is actually a reference to its own parent
group or a later group in the expression. |
boolean |
isUnrollingCandidate()
Returns
true iff the parser should try to unroll this term's quantifier. |
void |
setForwardReference() |
void |
setNestedBackReference() |
JsonValue |
toJson() |
String |
toString() |
equalsSemantic, getQuantifier, getSubTreeParent, hasNotUnrolledQuantifier, hasQuantifier, quantifierToString, setQuantifiergetSeqIndex, setSeqIndexasAtomicGroup, asBackReference, asCharacterClass, asGroup, asLookAheadAssertion, asLookAroundAssertion, asLookBehindAssertion, asMatchFound, asPositionAssertion, asQuantifiableTerm, asSequence, asSubtreeRootNode, astNodeId, endsWithDollar, getFlags, getId, getMaxPath, getMinPath, getParent, hasBackReferences, hasCaptureGroups, hasCaret, hasDollar, hasEmptyGuard, hasLookAheads, hasLookBehinds, hasLoops, hasQuantifiers, idInitialized, incMaxPath, incMaxPath, incMinPath, incMinPath, isAtomicGroup, isBackReference, isCaret, isCharacterClass, isDead, isDollar, 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, setStartsWithCaret, setStartsWithCaret, startsWithCaret, toJson, toStringWithIDclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetIdpublic BackReference copy(RegexAST ast)
RegexASTNodecopy in class QuantifiableTermast - RegexAST the node should belong to.public BackReference 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 int getGroupNr()
\1 is 1.public boolean isNestedBackReference()
public void setNestedBackReference()
public boolean isForwardReference()
public void setForwardReference()
public boolean isNestedOrForwardReference()
true iff this "back-reference" is actually a reference to its own parent
group or a later group in the expression. In JavaScript, such nested/forward references will
always match the empty string.public boolean isUnrollingCandidate()
QuantifiableTermtrue iff the parser should try to unroll this term's quantifier.isUnrollingCandidate in class QuantifiableTermpublic boolean equalsSemantic(RegexASTNode obj, boolean ignoreQuantifier)
equalsSemantic in class QuantifiableTermpublic JsonValue toJson()