org.antlr.tool
Class CompositeGrammarTree

java.lang.Object
  extended by org.antlr.tool.CompositeGrammarTree

public class CompositeGrammarTree
extends java.lang.Object

A tree of grammars


Field Summary
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
CompositeGrammarTree(Grammar g)
           
 
Method Summary
protected  void _getPostOrderedGrammarList(java.util.List<Grammar> grammars)
          work for getPostOrderedGrammarList
protected  void _getPreOrderedGrammarList(java.util.List<Grammar> grammars)
           
 void addChild(CompositeGrammarTree t)
           
 CompositeGrammarTree findNode(Grammar g)
           
 CompositeGrammarTree findNode(java.lang.String grammarName)
           
 java.lang.Object getOption(java.lang.String key)
          Find an option by looking up towards the root grammar rather than down
 java.util.List<Grammar> getPostOrderedGrammarList()
          Return a postorder list of grammars; root is last in list
 java.util.List<Grammar> getPreOrderedGrammarList()
          Return a postorder list of grammars; root is last in list
 Rule getRule(java.lang.String ruleName)
          Find a rule by looking in current grammar then down towards the delegate grammars.
 void trimLexerImportsIntoCombined()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 postorder list of grammars; root is last in list


_getPreOrderedGrammarList

protected void _getPreOrderedGrammarList(java.util.List<Grammar> grammars)

trimLexerImportsIntoCombined

public void trimLexerImportsIntoCombined()


Copyright © 2011. All Rights Reserved.