Package org.antlr.v4.tool.ast
Class GrammarRootAST
- java.lang.Object
-
- org.antlr.runtime.tree.BaseTree
-
- org.antlr.runtime.tree.CommonTree
-
- org.antlr.v4.tool.ast.GrammarAST
-
- org.antlr.v4.tool.ast.GrammarASTWithOptions
-
- org.antlr.v4.tool.ast.GrammarRootAST
-
- All Implemented Interfaces:
org.antlr.runtime.tree.Tree
public class GrammarRootAST extends GrammarASTWithOptions
-
-
Field Summary
Fields Modifier and Type Field Description Map<String,String>
cmdLineOptions
static Map<String,String>
defaultOptions
String
fileName
int
grammarType
boolean
hasErrors
org.antlr.runtime.TokenStream
tokenStream
Track stream used to create this tree-
Fields inherited from class org.antlr.v4.tool.ast.GrammarASTWithOptions
options
-
Fields inherited from class org.antlr.v4.tool.ast.GrammarAST
atnState, g, textOverride
-
-
Constructor Summary
Constructors Constructor Description GrammarRootAST(int type, org.antlr.runtime.Token t, String text, org.antlr.runtime.TokenStream tokenStream)
GrammarRootAST(int type, org.antlr.runtime.Token t, org.antlr.runtime.TokenStream tokenStream)
GrammarRootAST(org.antlr.runtime.Token t, org.antlr.runtime.TokenStream tokenStream)
GrammarRootAST(GrammarRootAST node)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GrammarRootAST
dupNode()
String
getGrammarName()
String
getOptionString(String key)
Object
visit(GrammarASTVisitor v)
-
Methods inherited from class org.antlr.v4.tool.ast.GrammarASTWithOptions
getNumberOfOptions, getOptionAST, getOptions, setOption
-
Methods inherited from class org.antlr.v4.tool.ast.GrammarAST
deleteChild, dupTree, getAllChildrenWithType, getAltLabel, getChildrenAsArray, getFirstDescendantWithType, getFirstDescendantWithType, getNodesWithType, getNodesWithType, getNodesWithTypePreorderDFS, getNodesWithTypePreorderDFS_, getNodeWithTokenIndex, getOutermostAltNode, setText, setType, toTokenString
-
Methods inherited from class org.antlr.runtime.tree.CommonTree
getCharPositionInLine, getChildIndex, getLine, getParent, getText, getToken, getTokenStartIndex, getTokenStopIndex, getType, isNil, setChildIndex, setParent, setTokenStartIndex, setTokenStopIndex, setUnknownTokenBoundaries, toString
-
Methods inherited from class org.antlr.runtime.tree.BaseTree
addChild, addChildren, createChildrenList, deleteChild, freshenParentAndChildIndexes, freshenParentAndChildIndexes, freshenParentAndChildIndexesDeeply, freshenParentAndChildIndexesDeeply, getAncestor, getAncestors, getChild, getChildCount, getChildren, getFirstChildWithType, hasAncestor, insertChild, replaceChildren, sanityCheckParentAndChildIndexes, sanityCheckParentAndChildIndexes, setChild, toStringTree
-
-
-
-
Field Detail
-
grammarType
public int grammarType
-
hasErrors
public boolean hasErrors
-
tokenStream
public final org.antlr.runtime.TokenStream tokenStream
Track stream used to create this tree
-
fileName
public String fileName
-
-
Constructor Detail
-
GrammarRootAST
public GrammarRootAST(GrammarRootAST node)
-
GrammarRootAST
public GrammarRootAST(org.antlr.runtime.Token t, org.antlr.runtime.TokenStream tokenStream)
-
GrammarRootAST
public GrammarRootAST(int type, org.antlr.runtime.Token t, org.antlr.runtime.TokenStream tokenStream)
-
GrammarRootAST
public GrammarRootAST(int type, org.antlr.runtime.Token t, String text, org.antlr.runtime.TokenStream tokenStream)
-
-
Method Detail
-
getGrammarName
public String getGrammarName()
-
getOptionString
public String getOptionString(String key)
- Overrides:
getOptionString
in classGrammarASTWithOptions
-
visit
public Object visit(GrammarASTVisitor v)
- Overrides:
visit
in classGrammarAST
-
dupNode
public GrammarRootAST dupNode()
- Specified by:
dupNode
in interfaceorg.antlr.runtime.tree.Tree
- Specified by:
dupNode
in classGrammarASTWithOptions
-
-