public class GrammarAST
extends org.antlr.runtime.tree.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(GrammarAST node) |
GrammarAST(int type) |
GrammarAST(int type,
org.antlr.runtime.Token t) |
GrammarAST(int type,
org.antlr.runtime.Token t,
String text) |
GrammarAST(org.antlr.runtime.Token t) |
Modifier and Type | Method and Description |
---|---|
boolean |
deleteChild(org.antlr.runtime.tree.Tree t) |
GrammarAST |
dupNode() |
GrammarAST |
dupTree() |
List<GrammarAST> |
getAllChildrenWithType(int type) |
String |
getAltLabel()
Walk ancestors of this node until we find ALT with
alt!=null or leftRecursiveAltInfo!=null.
|
GrammarAST[] |
getChildrenAsArray() |
org.antlr.runtime.tree.CommonTree |
getFirstDescendantWithType(org.antlr.runtime.BitSet types) |
org.antlr.runtime.tree.CommonTree |
getFirstDescendantWithType(int type) |
List<GrammarAST> |
getNodesWithType(int ttype) |
List<GrammarAST> |
getNodesWithType(IntervalSet types) |
void |
getNodesWithTypePreorderDFS_(List<GrammarAST> nodes,
IntervalSet types) |
List<GrammarAST> |
getNodesWithTypePreorderDFS(IntervalSet types) |
GrammarAST |
getNodeWithTokenIndex(int index) |
AltAST |
getOutermostAltNode() |
void |
setText(String text) |
void |
setType(int type) |
String |
toTokenString() |
Object |
visit(GrammarASTVisitor v) |
getCharPositionInLine, getChildIndex, getLine, getParent, getText, getToken, getTokenStartIndex, getTokenStopIndex, getType, isNil, setChildIndex, setParent, setTokenStartIndex, setTokenStopIndex, setUnknownTokenBoundaries, toString
addChild, addChildren, createChildrenList, deleteChild, freshenParentAndChildIndexes, freshenParentAndChildIndexes, freshenParentAndChildIndexesDeeply, freshenParentAndChildIndexesDeeply, getAncestor, getAncestors, getChild, getChildCount, getChildren, getFirstChildWithType, hasAncestor, insertChild, replaceChildren, sanityCheckParentAndChildIndexes, sanityCheckParentAndChildIndexes, setChild, toStringTree
public Grammar g
public ATNState atnState
public String textOverride
public GrammarAST()
public GrammarAST(org.antlr.runtime.Token t)
public GrammarAST(GrammarAST node)
public GrammarAST(int type)
public GrammarAST(int type, org.antlr.runtime.Token t)
public GrammarAST(int type, org.antlr.runtime.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 GrammarAST getNodeWithTokenIndex(int index)
public AltAST getOutermostAltNode()
public String getAltLabel()
public boolean deleteChild(org.antlr.runtime.tree.Tree t)
public org.antlr.runtime.tree.CommonTree getFirstDescendantWithType(int type)
public org.antlr.runtime.tree.CommonTree getFirstDescendantWithType(org.antlr.runtime.BitSet types)
public void setType(int type)
public void setText(String text)
public GrammarAST dupNode()
dupNode
in interface org.antlr.runtime.tree.Tree
dupNode
in class org.antlr.runtime.tree.CommonTree
public GrammarAST dupTree()
public String toTokenString()
public Object visit(GrammarASTVisitor v)
Copyright © 1992–2020 ANTLR. All rights reserved.