| java.lang.Object xtc.tree.Node xtc.parser.Grammar
Grammar | public class Grammar extends Node (Code) | | A grammar represented as a collection of modules.
author: Robert Grimm version: $Revision: 1.26 $ |
Method Summary | |
public void | remove(Module module) Remove the specified module from this grammar. | public void | replace(Module oldModule, Module newModule) Replace the specified module. |
modules | public List<Module> modules(Code) | | The list of
Module modules . The first module in this
list is the grammar's main module and the following modules are
all the dependent modules.
|
Grammar | public Grammar(List<Module> modules)(Code) | | Create a new grammar.
Parameters: modules - The list of modules. |
remove | public void remove(Module module)(Code) | | Remove the specified module from this grammar. This method uses
reference equality to locate the module to replace.
Parameters: module - The module. throws: IllegalArgumentException - Signals that the specified module is not part of this grammar. |
replace | public void replace(Module oldModule, Module newModule)(Code) | | Replace the specified module. This method uses reference
equality to locate the module to replace.
Parameters: oldModule - The old module. Parameters: newModule - The new module. throws: IllegalArgumentException - Signals that the specified old module is not part of this grammar. |
|
|