Top Description Fields Constructors Methods
org.antlr.tool

public Class CompositeGrammarTree

extends Object
Class Inheritance
Imports
java.util.ArrayList, .List

A tree of grammars

Field Summary

Modifier and TypeField and Description
protected List<CompositeGrammarTree>
public Grammar
public CompositeGrammarTree
parent

Who is the parent node of this node; if null, implies node is root

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
_getPostOrderedGrammarList(List<Grammar> grammars)

work for getPostOrderedGrammarList

protected void
public void
public CompositeGrammarTree
public CompositeGrammarTree
findNode(String grammarName)

public Object
getOption(String key)

Find an option by looking up towards the root grammar rather than down

public List<Grammar>
getPostOrderedGrammarList()

Return a postorder list of grammars; root is last in list

public List<Grammar>
getPreOrderedGrammarList()

Return a preorder list of grammars; root is first in list

public Rule
getRule(String ruleName)

Find a rule by looking in current grammar then down towards the delegate grammars.

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

childrenback to summary
protected List<CompositeGrammarTree> children
grammarback to summary
public Grammar grammar
parentback to summary
public CompositeGrammarTree parent

Who is the parent node of this node; if null, implies node is root

Constructor Detail

CompositeGrammarTreeback to summary
public CompositeGrammarTree(Grammar g)

Method Detail

_getPostOrderedGrammarListback to summary
protected void _getPostOrderedGrammarList(List<Grammar> grammars)

work for getPostOrderedGrammarList

_getPreOrderedGrammarListback to summary
protected void _getPreOrderedGrammarList(List<Grammar> grammars)
addChildback to summary
public void addChild(CompositeGrammarTree t)
findNodeback to summary
public CompositeGrammarTree findNode(Grammar g)
findNodeback to summary
public CompositeGrammarTree findNode(String grammarName)
getOptionback to summary
public Object getOption(String key)

Find an option by looking up towards the root grammar rather than down

getPostOrderedGrammarListback to summary
public List<Grammar> getPostOrderedGrammarList()

Return a postorder list of grammars; root is last in list

getPreOrderedGrammarListback to summary
public List<Grammar> getPreOrderedGrammarList()

Return a preorder list of grammars; root is first in list

getRuleback to summary
public Rule getRule(String ruleName)

Find a rule by looking in current grammar then down towards the delegate grammars.

trimLexerImportsIntoCombinedback to summary
public void trimLexerImportsIntoCombined()