Package org.antlr.v4.tool.ast
Class GrammarASTWithOptions
- 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
-
- All Implemented Interfaces:
org.antlr.runtime.tree.Tree
- Direct Known Subclasses:
ActionAST
,AltAST
,BlockAST
,GrammarRootAST
,RuleAST
,RuleRefAST
,TerminalAST
public abstract class GrammarASTWithOptions extends GrammarAST
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,GrammarAST>
options
-
Fields inherited from class org.antlr.v4.tool.ast.GrammarAST
atnState, g, textOverride
-
-
Constructor Summary
Constructors Constructor Description GrammarASTWithOptions(int type)
GrammarASTWithOptions(int type, org.antlr.runtime.Token t)
GrammarASTWithOptions(int type, org.antlr.runtime.Token t, String text)
GrammarASTWithOptions(org.antlr.runtime.Token t)
GrammarASTWithOptions(GrammarASTWithOptions node)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract GrammarASTWithOptions
dupNode()
int
getNumberOfOptions()
GrammarAST
getOptionAST(String key)
Gets AST node holding value for option key; ignores default options and command-line forced options.Map<String,GrammarAST>
getOptions()
String
getOptionString(String key)
void
setOption(String key, GrammarAST node)
-
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, visit
-
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
-
options
protected Map<String,GrammarAST> options
-
-
Constructor Detail
-
GrammarASTWithOptions
public GrammarASTWithOptions(GrammarASTWithOptions node)
-
GrammarASTWithOptions
public GrammarASTWithOptions(org.antlr.runtime.Token t)
-
GrammarASTWithOptions
public GrammarASTWithOptions(int type)
-
GrammarASTWithOptions
public GrammarASTWithOptions(int type, org.antlr.runtime.Token t)
-
GrammarASTWithOptions
public GrammarASTWithOptions(int type, org.antlr.runtime.Token t, String text)
-
-
Method Detail
-
setOption
public void setOption(String key, GrammarAST node)
-
getOptionAST
public GrammarAST getOptionAST(String key)
Gets AST node holding value for option key; ignores default options and command-line forced options.
-
getNumberOfOptions
public int getNumberOfOptions()
-
dupNode
public abstract GrammarASTWithOptions dupNode()
- Specified by:
dupNode
in interfaceorg.antlr.runtime.tree.Tree
- Overrides:
dupNode
in classGrammarAST
-
getOptions
public Map<String,GrammarAST> getOptions()
-
-