Class RegexASTSubtreeRootNode
java.lang.Object
com.oracle.truffle.regex.tregex.parser.ast.RegexASTNode
com.oracle.truffle.regex.tregex.parser.ast.Term
com.oracle.truffle.regex.tregex.parser.ast.RegexASTSubtreeRootNode
- All Implemented Interfaces:
AbstractState<Term,,ASTTransition> RegexASTVisitorIterable,JsonConvertible
- Direct Known Subclasses:
AtomicGroup,LookAroundAssertion,RegexASTRootNode
A common supertype to the root node, lookahead and lookbehind assertions and atomic groups. Every
AST subtree contains a
Group which contains the syntactic subtree, as well as a
MatchFound node, which is needed for NFA-like traversal of the AST, see
NFATraversalRegexASTVisitor.-
Method Summary
Modifier and TypeMethodDescriptionabstract RegexASTSubtreeRootNodeCopy this node only, without any child nodes.intgetGroup()Returns theGroupthat represents the contents of this subtree.Returns this subtree's correspondingMatchFoundnode.abstract StringintbooleanvoidvoidsetAnchoredFinalState(PositionAssertion anchoredFinalState) voidsetAnchoredInitialState(PositionAssertion anchoredInitialState) voidsetGlobalSubTreeId(int globalSubTreeId) voidSets the contents of this subtree.voidsetMatchFound(MatchFound matchFound) voidsetSubTreeId(int subTreeId) voidsetUnAnchoredInitialState(MatchFound unAnchoredInitialState) booleanprotected JsonObjecttoString()visitorGetNext(boolean reverse) booleanMethods inherited from class com.oracle.truffle.regex.tregex.parser.ast.Term
copyRecursive, getSeqIndex, getSubTreeParent, setSeqIndexMethods inherited from class com.oracle.truffle.regex.tregex.parser.ast.RegexASTNode
asAtomicGroup, asBackReference, asCharacterClass, asConditionalBackReferenceGroup, asGroup, asLookAheadAssertion, asLookAroundAssertion, asLookBehindAssertion, asMatchFound, asPositionAssertion, asQuantifiableTerm, asSequence, asSubexpressionCall, asSubtreeRootNode, astNodeId, endsWithDollar, equalsSemantic, getFlags, getId, getMaxPath, getMinPath, getParent, getPrefixLengthMax, getPrefixLengthMin, hasBackReferences, hasCaptureGroups, hasCaret, hasDollar, hasEmptyGuard, hasLookAheads, hasLookBehinds, hasLoops, hasQuantifiers, hasVariablePrefixLength, idInitialized, incMaxPath, incMaxPath, incMinPath, incMinPath, isAtomicGroup, isBackReference, isCaret, isCharacterClass, isConditionalBackReferenceGroup, isDead, isDollar, isExpandedQuantifier, isFlagSet, isGroup, isGroupWithGuards, isInLookAheadAssertion, isInLookBehindAssertion, isLookAheadAssertion, isLookAroundAssertion, isLookBehindAssertion, isMandatoryUnrolledQuantifier, isMatchFound, isPositionAssertion, isPrefix, isQuantifiableTerm, isQuantifierPassThroughSequence, isRoot, isSequence, isSubexpressionCall, isSubtreeRoot, markAsDead, setDead, setEmptyGuard, setEndsWithDollar, setEndsWithDollar, setExpandedQuantifier, setFlag, setFlag, setFlags, setHasBackReferences, setHasCaptureGroups, setHasCaret, setHasCaret, setHasDollar, setHasDollar, setHasLookAheads, setHasLookBehinds, setHasLoops, setHasLoops, setHasQuantifiers, setId, setMandatoryUnrolledQuantifier, setMaxPath, setMinPath, setParent, setPrefix, setPrefixLengthMax, setPrefixLengthMin, setQuantifierPassThroughSequence, setStartsWithCaret, setStartsWithCaret, startsWithCaret, toStringWithIDMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.oracle.truffle.regex.tregex.automaton.AbstractState
getIdMethods inherited from interface com.oracle.truffle.regex.tregex.util.json.JsonConvertible
toJson
-
Method Details
-
globalSubTreeIdInitialized
public boolean globalSubTreeIdInitialized() -
getGlobalSubTreeId
public int getGlobalSubTreeId() -
setGlobalSubTreeId
public void setGlobalSubTreeId(int globalSubTreeId) -
subTreeIdInitialized
public boolean subTreeIdInitialized() -
getSubTreeId
public int getSubTreeId() -
setSubTreeId
public void setSubTreeId(int subTreeId) -
getSubtrees
-
copy
Description copied from class:RegexASTNodeCopy this node only, without any child nodes. The ID and minPath of the copied nodes is left unset. -
getGroup
-
setGroup
Sets the contents of this subtree.This method should be called after creating any instance of this class. Otherwise, methods of this class could throw
NullPointerExceptions or returnnulls. -
getMatchFound
Returns this subtree's correspondingMatchFoundnode. -
setMatchFound
-
getAnchoredInitialState
-
setAnchoredInitialState
-
getUnAnchoredInitialState
-
setUnAnchoredInitialState
-
getAnchoredFinalState
-
setAnchoredFinalState
-
visitorHasNext
public boolean visitorHasNext()- Specified by:
visitorHasNextin interfaceRegexASTVisitorIterable
-
visitorGetNext
- Specified by:
visitorGetNextin interfaceRegexASTVisitorIterable
-
resetVisitorIterator
public void resetVisitorIterator()- Specified by:
resetVisitorIteratorin interfaceRegexASTVisitorIterable
-
getPrefix
-
toString
-
toJson
- Overrides:
toJsonin classRegexASTNode
-