GrammarASTErrorNode
, GrammarASTWithOptions
, NotAST
, OptionalBlockAST
, PlusBlockAST
, RangeAST
, SetAST
, StarBlockAST
public class GrammarAST
extends org.antlr.runtime.tree.CommonTree
Modifier and Type | Field | 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 | Description |
---|---|
GrammarAST() |
|
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) |
|
GrammarAST(GrammarAST node) |
Modifier and Type | Method | 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(int type) |
|
org.antlr.runtime.tree.CommonTree |
getFirstDescendantWithType(org.antlr.runtime.BitSet types) |
|
List<GrammarAST> |
getNodesWithType(int ttype) |
|
List<GrammarAST> |
getNodesWithType(IntervalSet types) |
|
List<GrammarAST> |
getNodesWithTypePreorderDFS(IntervalSet types) |
|
void |
getNodesWithTypePreorderDFS_(List<GrammarAST> nodes,
IntervalSet types) |
|
GrammarAST |
getNodeWithTokenIndex(int index) |
|
AltAST |
getOutermostAltNode() |
|
void |
setText(String text) |
|
void |
setType(int type) |
|
String |
toTokenString() |
|
Object |
visit(GrammarASTVisitor v) |
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 class org.antlr.runtime.tree.CommonTree
public GrammarAST dupTree()
public String toTokenString()
public Object visit(GrammarASTVisitor v)
Copyright © 1992–2019 ANTLR. All rights reserved.