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 TypeClassDescriptionclassThis class extendsParserRuleContextby allowing the value ofInterpreterRuleContext.getRuleIndex()to be explicitly set for the context.classA rule invocation record for parsing.classA rule context is a record of a single rule invocation.classA 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.childrenIf 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 TypeInterfaceDescriptioninterfaceinterfaceinterfaceClasses in org.antlr.v4.runtime.tree that implement ParseTreeModifier and TypeClassDescriptionclassRepresents a token that was consumed during resynchronization rather than during a valid match operation.classFields 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 voidTrees._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 ParserRuleContextTrees.getRootOfSubtreeEnclosingRegion(ParseTree t, int startTokenIndex, int stopTokenIndex) Find smallest subtree of t enclosing range startTokenIndex..stopTokenIndex inclusively using postorder traversal.voidParseTreeProperty.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.voidIterativeParseTreeWalker.walk(ParseTreeListener listener, ParseTree t) voidParseTreeWalker.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 voidTrees._findAllNodes(ParseTree t, int index, boolean findTokens, List<? super ParseTree> nodes) -
Uses of ParseTree in org.antlr.v4.runtime.tree.pattern
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 ParseTreeParseTreePatternMatcher.matchImpl(ParseTree tree, ParseTree patternTree, MultiMap<String, ParseTree> labels) Recursively walktreeagainstpatternTree, fillingmatch.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 RuleTagTokenParseTreePatternMatcher.getRuleTagToken(ParseTree t) Ist(expr <expr>)subtree?Match a specific parse tree against this tree pattern.Comparepatternmatched as rulepatternRuleIndexagainsttreeand return aParseTreeMatchobject that contains the matched elements, or the node at which the match failed.ParseTreePatternMatcher.match(ParseTree tree, ParseTreePattern pattern) Comparepatternmatched againsttreeand return aParseTreeMatchobject that contains the matched elements, or the node at which the match failed.booleanDetermine whether or not a parse tree matches this tree pattern.booleanDoespatternmatched as rulepatternRuleIndexmatchtree?booleanParseTreePatternMatcher.matches(ParseTree tree, ParseTreePattern pattern) Doespatternmatched as rule patternRuleIndex match tree? Pass in a compiled pattern instead of a string representation of a tree pattern.protected ParseTreeParseTreePatternMatcher.matchImpl(ParseTree tree, ParseTree patternTree, MultiMap<String, ParseTree> labels) Recursively walktreeagainstpatternTree, fillingmatch.labels.Method parameters in org.antlr.v4.runtime.tree.pattern with type arguments of type ParseTreeModifier and TypeMethodDescriptionprotected ParseTreeParseTreePatternMatcher.matchImpl(ParseTree tree, ParseTree patternTree, MultiMap<String, ParseTree> labels) Recursively walktreeagainstpatternTree, fillingmatch.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 ofParseTreeMatchfrom the specified parse tree and pattern.ParseTreePattern(ParseTreePatternMatcher matcher, String pattern, int patternRuleIndex, ParseTree patternTree) Construct a new instance of theParseTreePatternclass.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 ofParseTreeMatchfrom 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 attas root that satisfy the path.abstract Collection<ParseTree> Given tree rooted attreturn 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 attas root that satisfy the path.abstract Collection<ParseTree> Given tree rooted attreturn 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 TypeClassDescriptionclassAnInterpreterRuleContextthat knows which alternative for a rule was matched.