public class EquivalenceTester extends Visitor
areEquivalent(Production,Production)
and areEquivalent(Element,Element) methods.| Modifier and Type | Field and Description |
|---|---|
protected Element |
e2
The element to compare to.
|
protected java.util.Map<java.lang.String,java.lang.String> |
nts
The mapping between equivalent nonterminals.
|
protected java.util.Map<java.lang.String,java.lang.String> |
vars
The mapping between equivalent variables.
|
| Constructor and Description |
|---|
EquivalenceTester()
Create a new equivalence tester.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
areEquivalent(Element e1,
Element e2)
Determine whether the specified elements are equivalent.
|
protected boolean |
areEquivalent(GenericValue v1,
GenericValue v2)
Determine whether the specified generic values are equivalent.
|
protected boolean |
areEquivalent(java.util.List<Binding> l1,
java.util.List<Binding> l2)
Determine whether the specified lists of bindings are equivalent.
|
boolean |
areEquivalent(Production p1,
Production p2)
Determine whether the specified productions are equivalent.
|
java.lang.Boolean |
visit(ActionBaseValue v1)
Visit the specified action base value.
|
java.lang.Boolean |
visit(Binding b1)
Visit the specified binding.
|
java.lang.Boolean |
visit(BindingValue v1)
Visit the specified binding value.
|
java.lang.Boolean |
visit(CharSwitch s1)
Visit the specified character switch.
|
java.lang.Boolean |
visit(Element e1)
Visit the specified element.
|
java.lang.Boolean |
visit(GenericActionValue v1)
Visit the specified generic action value.
|
java.lang.Boolean |
visit(GenericNodeValue v1)
Visit the specified generic node value.
|
java.lang.Boolean |
visit(GenericRecursionValue v1)
Visit the specified generic recursion value.
|
java.lang.Boolean |
visit(NonTerminal nt1)
Visit the specified nonterminal.
|
java.lang.Boolean |
visit(OrderedChoice c1)
Visit the specified ordered choice.
|
java.lang.Boolean |
visit(ParseTreeNode n1)
Visit the specified parse tree node.
|
java.lang.Boolean |
visit(ProperListValue v1)
Visit the specified proper list value.
|
java.lang.Boolean |
visit(Repetition r1)
Visit the specified repetition.
|
java.lang.Boolean |
visit(Sequence s1)
Visit the specified sequence.
|
java.lang.Boolean |
visit(StringMatch m1)
Visit the specified string match.
|
java.lang.Boolean |
visit(UnaryOperator op1)
Visit the specified unary operator.
|
dispatch, equals, hashCode, iterate, map, mapInPlace, unableToVisit, visitprotected java.util.Map<java.lang.String,java.lang.String> nts
protected java.util.Map<java.lang.String,java.lang.String> vars
protected Element e2
public boolean areEquivalent(Production p1, Production p2)
p1 - The first production.p2 - The second production.true if the two productions are equivalent.public boolean areEquivalent(Element e1, Element e2)
e1 - The first element.e2 - The second element.true if the two elements are equivalent.protected boolean areEquivalent(java.util.List<Binding> l1, java.util.List<Binding> l2)
l1 - The first list.l2 - The second list.true if the two lists are equivalent.protected boolean areEquivalent(GenericValue v1, GenericValue v2)
v1 - The first value.v2 - The second value.true if the two values are equivalent.public java.lang.Boolean visit(OrderedChoice c1)
public java.lang.Boolean visit(Repetition r1)
public java.lang.Boolean visit(Sequence s1)
public java.lang.Boolean visit(Binding b1)
public java.lang.Boolean visit(StringMatch m1)
public java.lang.Boolean visit(NonTerminal nt1)
public java.lang.Boolean visit(CharSwitch s1)
public java.lang.Boolean visit(ParseTreeNode n1)
public java.lang.Boolean visit(ProperListValue v1)
public java.lang.Boolean visit(BindingValue v1)
public java.lang.Boolean visit(ActionBaseValue v1)
public java.lang.Boolean visit(GenericNodeValue v1)
public java.lang.Boolean visit(GenericActionValue v1)
public java.lang.Boolean visit(GenericRecursionValue v1)
public java.lang.Boolean visit(UnaryOperator op1)
public java.lang.Boolean visit(Element e1)
Copyright © 2014. All Rights Reserved.