SyntaxTree
, Tree
ErrorNode
, RuleNode
, TerminalNode
ErrorNodeImpl
, GrammarInterpreterRuleContext
, InterpreterRuleContext
, ParserRuleContext
, RuleContext
, RuleContextWithAltNum
, TerminalNodeImpl
public interface ParseTree extends SyntaxTree
RuleContext
objects created
during a parse that makes the data structure look like a simple parse tree.
This node represents both internal nodes, rule invocations,
and leaf nodes, token matches.
The payload is either a Token
or a RuleContext
object.
Modifier and Type | Method | Description |
---|---|---|
<T> T |
accept(ParseTreeVisitor<? extends T> visitor) |
The
ParseTreeVisitor needs a double dispatch method. |
ParseTree |
getChild(int i) |
If there are children, get the
i th value indexed from 0. |
ParseTree |
getParent() |
The parent of this node.
|
String |
getText() |
Return the combined text of all leaf nodes.
|
String |
toStringTree(Parser parser) |
Specialize toStringTree so that it can print out more information
based upon the parser.
|
getSourceInterval
getChildCount, getPayload, toStringTree
ParseTree getParent()
Tree
ParseTree getChild(int i)
Tree
i
th value indexed from 0.<T> T accept(ParseTreeVisitor<? extends T> visitor)
ParseTreeVisitor
needs a double dispatch method.String getText()
Copyright © 1992–2018 ANTLR. All rights reserved.