Package org.antlr.tool
Class CompositeGrammarTree
- java.lang.Object
-
- org.antlr.tool.CompositeGrammarTree
-
public class CompositeGrammarTree extends java.lang.Object
A tree of grammars
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<CompositeGrammarTree>
children
Grammar
grammar
CompositeGrammarTree
parent
Who is the parent node of this node; if null, implies node is root
-
Constructor Summary
Constructors Constructor Description CompositeGrammarTree(Grammar g)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_getPostOrderedGrammarList(java.util.List<Grammar> grammars)
work for getPostOrderedGrammarListprotected void
_getPreOrderedGrammarList(java.util.List<Grammar> grammars)
void
addChild(CompositeGrammarTree t)
CompositeGrammarTree
findNode(java.lang.String grammarName)
CompositeGrammarTree
findNode(Grammar g)
java.lang.Object
getOption(java.lang.String key)
Find an option by looking up towards the root grammar rather than downjava.util.List<Grammar>
getPostOrderedGrammarList()
Return a postorder list of grammars; root is last in listjava.util.List<Grammar>
getPreOrderedGrammarList()
Return a preorder list of grammars; root is first in listRule
getRule(java.lang.String ruleName)
Find a rule by looking in current grammar then down towards the delegate grammars.void
trimLexerImportsIntoCombined()
-
-
-
Field Detail
-
children
protected java.util.List<CompositeGrammarTree> children
-
grammar
public Grammar grammar
-
parent
public CompositeGrammarTree parent
Who is the parent node of this node; if null, implies node is root
-
-
Constructor Detail
-
CompositeGrammarTree
public CompositeGrammarTree(Grammar g)
-
-
Method Detail
-
addChild
public void addChild(CompositeGrammarTree t)
-
getRule
public Rule getRule(java.lang.String ruleName)
Find a rule by looking in current grammar then down towards the delegate grammars.
-
getOption
public java.lang.Object getOption(java.lang.String key)
Find an option by looking up towards the root grammar rather than down
-
findNode
public CompositeGrammarTree findNode(Grammar g)
-
findNode
public CompositeGrammarTree findNode(java.lang.String grammarName)
-
getPostOrderedGrammarList
public java.util.List<Grammar> getPostOrderedGrammarList()
Return a postorder list of grammars; root is last in list
-
_getPostOrderedGrammarList
protected void _getPostOrderedGrammarList(java.util.List<Grammar> grammars)
work for getPostOrderedGrammarList
-
getPreOrderedGrammarList
public java.util.List<Grammar> getPreOrderedGrammarList()
Return a preorder list of grammars; root is first in list
-
_getPreOrderedGrammarList
protected void _getPreOrderedGrammarList(java.util.List<Grammar> grammars)
-
trimLexerImportsIntoCombined
public void trimLexerImportsIntoCombined()
-
-