public class Copier extends Visitor
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.| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<Binding> |
source
The list of source bindings.
|
protected java.util.List<Binding> |
target
The list of target bindings.
|
| Constructor and Description |
|---|
Copier()
Create a new copier.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Element> |
copy(T e)
Copy the specified element.
|
protected Binding |
match(Binding b)
Match the specified binding with its copy.
|
protected void |
patch(java.util.List<Binding> bindings)
Patch the specified bindings.
|
Action |
visit(Action a)
Copy the specified action.
|
ActionBaseValue |
visit(ActionBaseValue v)
Copy the specified action base value.
|
AlternativeAddition |
visit(AlternativeAddition p)
Copy the specified alternative addition.
|
AlternativeRemoval |
visit(AlternativeRemoval p)
Copy the specified alternative removal.
|
Binding |
visit(Binding b)
Copy the specified binding.
|
BindingValue |
visit(BindingValue v)
Copy the specified binding value.
|
CharCase |
visit(CharCase c)
Copy the specified character case.
|
CharClass |
visit(CharClass c)
Copy the specified character class.
|
CharSwitch |
visit(CharSwitch s)
Copy the specified character switch.
|
Comment |
visit(Comment c)
Copy the specified comment.
|
Element |
visit(Element e)
Visit the specified element.
|
FollowedBy |
visit(FollowedBy p)
Copy the specified followed-by predicate.
|
FullProduction |
visit(FullProduction p)
Copy the specified full production.
|
GenericActionValue |
visit(GenericActionValue v)
Copy the specified generic action value.
|
GenericNodeValue |
visit(GenericNodeValue v)
Copy the specified generic node value.
|
GenericRecursionValue |
visit(GenericRecursionValue v)
Copy the specified generic recursion value.
|
Grammar |
visit(Grammar g)
Copy the specified grammar.
|
Module |
visit(Module m)
Copy the specified module.
|
ModuleImport |
visit(ModuleImport i)
Copy the specified module import declaration.
|
ModuleInstantiation |
visit(ModuleInstantiation i)
Copy the specified module instantiation declaration.
|
ModuleList |
visit(ModuleList l)
Copy the specified module list.
|
ModuleModification |
visit(ModuleModification m)
Copy the specified module modification.
|
NotFollowedBy |
visit(NotFollowedBy p)
Copy the specified not-followed-by predicate.
|
Option |
visit(Option o)
Copy the specified option.
|
OrderedChoice |
visit(OrderedChoice c)
Copy the specified ordered choice.
|
ParserAction |
visit(ParserAction pa)
Copy the specified parser action.
|
ParseTreeNode |
visit(ParseTreeNode n)
Copy the specified parse tree node.
|
ProductionOverride |
visit(ProductionOverride p)
Copy the specified production override.
|
ProperListValue |
visit(ProperListValue v)
Copy the specified proper list value.
|
Repetition |
visit(Repetition r)
Copy the specified repetition.
|
SemanticPredicate |
visit(SemanticPredicate p)
Copy the specified semantic predicate.
|
Sequence |
visit(Sequence s)
Copy the specified sequence.
|
StringMatch |
visit(StringMatch m)
Copy the specified string match.
|
VoidedElement |
visit(VoidedElement v)
Copy the specified voided element.
|
dispatch, equals, hashCode, iterate, map, mapInPlace, unableToVisit, visitprotected java.util.List<Binding> source
protected java.util.List<Binding> target
protected Binding match(Binding b)
b - The binding.java.lang.IllegalArgumentException - Signals that the specified
binding has no copy.protected void patch(java.util.List<Binding> bindings)
bindings - The bindings to patch.public <T extends Element> T copy(T e)
e - The element.java.lang.IllegalArgumentException - Signals that the specified element is incomplete.public ModuleImport visit(ModuleImport i)
public ModuleInstantiation visit(ModuleInstantiation i)
public ModuleModification visit(ModuleModification m)
public ModuleList visit(ModuleList l)
public FullProduction visit(FullProduction p)
public AlternativeAddition visit(AlternativeAddition p)
public AlternativeRemoval visit(AlternativeRemoval p)
public ProductionOverride visit(ProductionOverride p)
public OrderedChoice visit(OrderedChoice c)
public Repetition visit(Repetition r)
public FollowedBy visit(FollowedBy p)
public NotFollowedBy visit(NotFollowedBy p)
public SemanticPredicate visit(SemanticPredicate p)
public VoidedElement visit(VoidedElement v)
public StringMatch visit(StringMatch m)
public CharSwitch visit(CharSwitch s)
public ParserAction visit(ParserAction pa)
public ParseTreeNode visit(ParseTreeNode n)
public BindingValue visit(BindingValue v)
public ProperListValue visit(ProperListValue v)
public ActionBaseValue visit(ActionBaseValue v)
public GenericNodeValue visit(GenericNodeValue v)
public GenericActionValue visit(GenericActionValue v)
public GenericRecursionValue visit(GenericRecursionValue v)
public Element visit(Element e)
Copyright © 2014. All Rights Reserved.