public class GrammarAST extends CommonTree
| Modifier and Type | Field and Description |
|---|---|
ATNState |
atnState
If we build an ATN, we make AST node point at left edge of ATN construct
|
Grammar |
g
For error msgs, nice to know which grammar this AST lives in
|
String |
textOverride
|
| Constructor and Description |
|---|
GrammarAST()
|
GrammarAST(int type, Token t)
|
GrammarAST(int type, Token t, String
|
GrammarAST(Token t)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
deleteChild(org.antlr.runtime.tree.Tree t)
|
GrammarAST |
dupNode()
|
GrammarAST |
dupTree()
|
List |
getAllChildrenWithType(int type)
|
String |
getAltLabel()
Walk ancestors of this node until we find ALT with alt!=null or leftRecursiveAltInfo!=null.
|
GrammarAST |
getChildrenAsArray()
|
CommonTree |
getFirstDescendantWithType(int type)
|
CommonTree |
getFirstDescendantWithType(org.antlr.runtime.BitSet types)
|
List |
getNodesWithType(int ttype)
|
List |
getNodesWithType(IntervalSet types)
|
void |
getNodesWithTypePreorderDFS_(List
|
List |
getNodesWithTypePreorderDFS(IntervalSet types)
|
GrammarAST |
getNodeWithTokenIndex(int index)
|
AltAST |
getOutermostAltNode()
|
void |
setText(String
|
void |
setType(int type)
|
String |
toTokenString()
|
Object |
visit(GrammarASTVisitor
|
public Grammarg
public ATNState atnState
public StringtextOverride
public GrammarAST()
public GrammarAST(Token t)
public GrammarAST(int type,
Token t)public GrammarAST(int type,
Token t,
String text) public GrammarAST[] getChildrenAsArray()
public List<GrammarAST > getNodesWithType(int ttype)
public List<GrammarAST > getAllChildrenWithType(int type)
public List<GrammarAST > getNodesWithType(IntervalSet types)
public List<GrammarAST > getNodesWithTypePreorderDFS(IntervalSet types)
public void getNodesWithTypePreorderDFS_(List<GrammarAST > nodes, IntervalSet types)
public GrammarASTgetNodeWithTokenIndex(int index)
public AltASTgetOutermostAltNode()
public StringgetAltLabel()
public boolean deleteChild(org.antlr.runtime.tree.Tree t)
public CommonTree getFirstDescendantWithType(int type)
public CommonTree getFirstDescendantWithType(org.antlr.runtime.BitSet types)
public void setType(int type)
public void setText(Stringtext)
public GrammarASTdupNode()
public GrammarASTdupTree()
public StringtoTokenString()
public Objectvisit(GrammarASTVisitor v)