Uses of Interface
org.antlr.v4.runtime.tree.ParseTree
Packages that use ParseTree
Package
Description
-
Uses of ParseTree in org.antlr.v4.runtime
Classes in org.antlr.v4.runtime that implement ParseTreeModifier and TypeClassDescriptionclass
This class extendsParserRuleContext
by allowing the value ofInterpreterRuleContext.getRuleIndex()
to be explicitly set for the context.class
A rule invocation record for parsing.class
A rule context is a record of a single rule invocation.class
A handy class for use with options {contextSuperClass=org.antlr.v4.runtime.RuleContextWithAltNum;} that provides a backing field / impl for the outer alternative number matched for an internal parse tree node.Fields in org.antlr.v4.runtime with type parameters of type ParseTreeModifier and TypeFieldDescriptionParserRuleContext.children
If we are debugging or building a parse tree for a visitor, we need to track all of the tokens and rule invocations associated with this rule's context.Methods in org.antlr.v4.runtime with type parameters of type ParseTreeModifier and TypeMethodDescription<T extends ParseTree>
TParserRuleContext.addAnyChild
(T t) Add a parse tree node to this as a child.<T extends ParseTree>
TMethods in org.antlr.v4.runtime that return ParseTree -
Uses of ParseTree in org.antlr.v4.runtime.tree
Subinterfaces of ParseTree in org.antlr.v4.runtime.treeModifier and TypeInterfaceDescriptioninterface
interface
interface
Classes in org.antlr.v4.runtime.tree that implement ParseTreeModifier and TypeClassDescriptionclass
Represents a token that was consumed during resynchronization rather than during a valid match operation.class
Fields in org.antlr.v4.runtime.tree declared as ParseTreeFields in org.antlr.v4.runtime.tree with type parameters of type ParseTreeMethods in org.antlr.v4.runtime.tree that return ParseTreeModifier and TypeMethodDescriptionParseTree.getChild
(int i) TerminalNodeImpl.getChild
(int i) ParseTree.getParent()
TerminalNodeImpl.getParent()
Methods in org.antlr.v4.runtime.tree that return types with arguments of type ParseTreeModifier and TypeMethodDescriptionTrees.descendants
(ParseTree t) Deprecated.Trees.findAllNodes
(ParseTree t, int index, boolean findTokens) static Collection
<ParseTree> Trees.findAllRuleNodes
(ParseTree t, int ruleIndex) static Collection
<ParseTree> Trees.findAllTokenNodes
(ParseTree t, int ttype) Trees.getDescendants
(ParseTree t) Get all descendents; includes t itself.Methods in org.antlr.v4.runtime.tree with parameters of type ParseTreeModifier and TypeMethodDescriptionstatic void
Trees._findAllNodes
(ParseTree t, int index, boolean findTokens, List<? super ParseTree> nodes) Trees.descendants
(ParseTree t) Deprecated.Trees.findAllNodes
(ParseTree t, int index, boolean findTokens) static Collection
<ParseTree> Trees.findAllRuleNodes
(ParseTree t, int ruleIndex) static Collection
<ParseTree> Trees.findAllTokenNodes
(ParseTree t, int ttype) Trees.getDescendants
(ParseTree t) Get all descendents; includes t itself.static ParserRuleContext
Trees.getRootOfSubtreeEnclosingRegion
(ParseTree t, int startTokenIndex, int stopTokenIndex) Find smallest subtree of t enclosing range startTokenIndex..stopTokenIndex inclusively using postorder traversal.void
ParseTreeProperty.removeFrom
(ParseTree node) Visit a parse tree, and return a user-defined result of the operation.Visit a parse tree, and return a user-defined result of the operation.void
IterativeParseTreeWalker.walk
(ParseTreeListener listener, ParseTree t) void
ParseTreeWalker.walk
(ParseTreeListener listener, ParseTree t) Performs a walk on the given parse tree starting at the root and going down recursively with depth-first search.Method parameters in org.antlr.v4.runtime.tree with type arguments of type ParseTreeModifier and TypeMethodDescriptionstatic void
Trees._findAllNodes
(ParseTree t, int index, boolean findTokens, List<? super ParseTree> nodes) -
Uses of ParseTree in org.antlr.v4.runtime.tree.pattern
Fields in org.antlr.v4.runtime.tree.pattern declared as ParseTreeModifier and TypeFieldDescriptionprivate final ParseTree
ParseTreeMatch.mismatchedNode
This is the backing field forParseTreeMatch.getMismatchedNode()
.private final ParseTree
ParseTreePattern.patternTree
This is the backing field forParseTreePattern.getPatternTree()
.private final ParseTree
ParseTreeMatch.tree
This is the backing field forParseTreeMatch.getTree()
.Fields in org.antlr.v4.runtime.tree.pattern with type parameters of type ParseTreeModifier and TypeFieldDescriptionParseTreeMatch.labels
This is the backing field forParseTreeMatch.getLabels()
.Methods in org.antlr.v4.runtime.tree.pattern that return ParseTreeModifier and TypeMethodDescriptionGet the last node associated with a specificlabel
.ParseTreeMatch.getMismatchedNode()
Get the node at which we first detected a mismatch.ParseTreePattern.getPatternTree()
Get the tree pattern as aParseTree
.ParseTreeMatch.getTree()
Get the parse tree we are trying to match to a pattern.protected ParseTree
ParseTreePatternMatcher.matchImpl
(ParseTree tree, ParseTree patternTree, MultiMap<String, ParseTree> labels) Methods in org.antlr.v4.runtime.tree.pattern that return types with arguments of type ParseTreeModifier and TypeMethodDescriptionReturn all nodes matching a rule or token tag with the specified label.ParseTreeMatch.getLabels()
Return a mapping from label → [list of nodes].Methods in org.antlr.v4.runtime.tree.pattern with parameters of type ParseTreeModifier and TypeMethodDescriptionFind all nodes using XPath and then try to match those subtrees against this tree pattern.protected RuleTagToken
ParseTreePatternMatcher.getRuleTagToken
(ParseTree t) Ist
(expr <expr>)
subtree?Match a specific parse tree against this tree pattern.Comparepattern
matched as rulepatternRuleIndex
againsttree
and return aParseTreeMatch
object that contains the matched elements, or the node at which the match failed.ParseTreePatternMatcher.match
(ParseTree tree, ParseTreePattern pattern) Comparepattern
matched againsttree
and return aParseTreeMatch
object that contains the matched elements, or the node at which the match failed.boolean
Determine whether or not a parse tree matches this tree pattern.boolean
Doespattern
matched as rulepatternRuleIndex
matchtree
?boolean
ParseTreePatternMatcher.matches
(ParseTree tree, ParseTreePattern pattern) Doespattern
matched as rule patternRuleIndex match tree? Pass in a compiled pattern instead of a string representation of a tree pattern.protected ParseTree
ParseTreePatternMatcher.matchImpl
(ParseTree tree, ParseTree patternTree, MultiMap<String, ParseTree> labels) Method parameters in org.antlr.v4.runtime.tree.pattern with type arguments of type ParseTreeModifier and TypeMethodDescriptionprotected ParseTree
ParseTreePatternMatcher.matchImpl
(ParseTree tree, ParseTree patternTree, MultiMap<String, ParseTree> labels) Constructors in org.antlr.v4.runtime.tree.pattern with parameters of type ParseTreeModifierConstructorDescriptionParseTreeMatch
(ParseTree tree, ParseTreePattern pattern, MultiMap<String, ParseTree> labels, ParseTree mismatchedNode) Constructs a new instance ofParseTreeMatch
from the specified parse tree and pattern.ParseTreePattern
(ParseTreePatternMatcher matcher, String pattern, int patternRuleIndex, ParseTree patternTree) Construct a new instance of theParseTreePattern
class.Constructor parameters in org.antlr.v4.runtime.tree.pattern with type arguments of type ParseTreeModifierConstructorDescriptionParseTreeMatch
(ParseTree tree, ParseTreePattern pattern, MultiMap<String, ParseTree> labels, ParseTree mismatchedNode) Constructs a new instance ofParseTreeMatch
from the specified parse tree and pattern. -
Uses of ParseTree in org.antlr.v4.runtime.tree.xpath
Methods in org.antlr.v4.runtime.tree.xpath that return types with arguments of type ParseTreeModifier and TypeMethodDescriptionReturn a list of all nodes starting att
as root that satisfy the path.abstract Collection
<ParseTree> Given tree rooted att
return all nodes matched by this path element.static Collection
<ParseTree> Methods in org.antlr.v4.runtime.tree.xpath with parameters of type ParseTreeModifier and TypeMethodDescriptionReturn a list of all nodes starting att
as root that satisfy the path.abstract Collection
<ParseTree> Given tree rooted att
return all nodes matched by this path element.static Collection
<ParseTree> -
Uses of ParseTree in org.antlr.v4.tool
Classes in org.antlr.v4.tool that implement ParseTreeModifier and TypeClassDescriptionclass
AnInterpreterRuleContext
that knows which alternative for a rule was matched.