Visitor to copy grammar nodes. This visitor makes deep copies of
grammars, modules, productions, and elements. Note that when
copying elements, this visitor must be invoked through the
Copier.copy(Element) method. Further note that, if the element to be
copied contains a generic node value or a generic recursion value,
the element must also contain all bindings referenced by that value
element. Otherwise, an IllegalArgumentException is
signalled.
author: Robert Grimm version: $Revision: 1.51 $
Copy the specified element.
Parameters: e - The element. A deep copy. throws: IllegalArgumentException - Signals that the specified element is incomplete.
Match the specified binding with its copy.
Parameters: b - The binding. The corresponding copy. throws: IllegalArgumentException - Signals that the specifiedbinding has no copy.
Patch the specified bindings. This method replaces the source
bindings in the specified list of bindings with the corresponding
copies, thus ensuring that the list contains previously copied
bindings.
Parameters: bindings - The bindings to patch.
Visit the specified element. This method provides the default
implementation for nonterminals, terminals (besides character
classes and switches), node markers, null literals, and value
elements (besides properlists, generic node, generic action, and
generic recursion values), which are immutable and not containers
for other elements.