Class QuantifiableTerm
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.QuantifiableTerm
- All Implemented Interfaces:
AbstractState<Term,,ASTTransition> JsonConvertible
- Direct Known Subclasses:
BackReference,CharacterClass,Group,SubexpressionCall
Roughly corresponds to the goal symbol Atom in the ECMAScript RegExp syntax. An
Atom (
QuantifiableTerm) can be either a CharacterClass, a
BackReference or a Group). Quantifiers (Token.Quantifier) are attached
directly to the quantified term.-
Method Summary
Modifier and TypeMethodDescriptionabstract QuantifiableTermCopy this node only, without any child nodes.booleanabstract booleanequalsSemantic(RegexASTNode obj, boolean ignoreQuantifier) Returns the subtree root node that this node is a part of.booleanReturnstrueiff this term has a quantifier that was not unrolled by the parser.booleanabstract booleanReturnstrueiff the parser should try to unroll this term's quantifier.protected StringvoidsetQuantifier(Token.Quantifier quantifier) Methods inherited from class com.oracle.truffle.regex.tregex.parser.ast.Term
copyRecursive, getSeqIndex, 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, 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, toJson, toStringWithIDMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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
-
copy
Description copied from class:RegexASTNodeCopy this node only, without any child nodes. The ID and minPath of the copied nodes is left unset. -
hasQuantifier
public boolean hasQuantifier() -
hasNotUnrolledQuantifier
public boolean hasNotUnrolledQuantifier()Returnstrueiff this term has a quantifier that was not unrolled by the parser. -
isUnrollingCandidate
public abstract boolean isUnrollingCandidate()Returnstrueiff the parser should try to unroll this term's quantifier. -
getQuantifier
-
setQuantifier
-
equalsSemantic
- Specified by:
equalsSemanticin classRegexASTNode
-
equalsSemantic
-
quantifierToString
-
getSubTreeParent
Description copied from class:RegexASTNodeReturns the subtree root node that this node is a part of. If this node is nested inside several look-around assertion nodes, returns the innermost one that contains this node. Every AST node should have a subtree parent, but nodes implicitly generated byRegexAST.getNFAAnchoredInitialState(int)andRegexAST.getNFAUnAnchoredInitialState(int)technically don't belong to the AST, so they will returnnull.- Overrides:
getSubTreeParentin classTerm
-