Class CompositeGrammarTree

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

public class CompositeGrammarTree extends Object
A tree of grammars
  • Field Details

  • Constructor Details

    • CompositeGrammarTree

      public CompositeGrammarTree(Grammar g)
  • Method Details

    • addChild

      public void addChild(CompositeGrammarTree t)
    • getRule

      public Rule getRule(String ruleName)
      Find a rule by looking in current grammar then down towards the delegate grammars.
    • getOption

      public Object getOption(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(String grammarName)
    • getPostOrderedGrammarList

      public List<Grammar> getPostOrderedGrammarList()
      Return a postorder list of grammars; root is last in list
    • _getPostOrderedGrammarList

      protected void _getPostOrderedGrammarList(List<Grammar> grammars)
      work for getPostOrderedGrammarList
    • getPreOrderedGrammarList

      public List<Grammar> getPreOrderedGrammarList()
      Return a preorder list of grammars; root is first in list
    • _getPreOrderedGrammarList

      protected void _getPreOrderedGrammarList(List<Grammar> grammars)
    • trimLexerImportsIntoCombined

      public void trimLexerImportsIntoCombined()