Package manifold.internal.javac
Class AbstractBinder<MS,B extends E,E,O>
- java.lang.Object
-
- manifold.internal.javac.AbstractBinder<MS,B,E,O>
-
public abstract class AbstractBinder<MS,B extends E,E,O> extends Object
expression (velocity: length/time): 5 mi/hr (bad) (good) ÷ ? / \ / \ ? hr 5 ÷ / \ / \ 5 mi mi hrA list of all the terminal operands maintains the operators in RHS operand nodes. The binding algorithm uses type information to test for operator compatibility and binding reactions between adjacent operands to recursively reduce the list to a single expression:
initial list ==> (? 5) -> (? mi) -> (/ hr) ==> (5) -> (? (mi/hr)) ==> ((5(mi/hr)))
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractBinder.Node<E,O>
-
Constructor Summary
Constructors Constructor Description AbstractBinder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Bbind(ArrayList<AbstractBinder.Node<E,O>> operands)protected abstract MSfindBinderMethod(AbstractBinder.Node<E,O> left, AbstractBinder.Node<E,O> right)protected abstract AbstractBinder.Node<E,O>makeBinaryExpression(AbstractBinder.Node<E,O> left, AbstractBinder.Node<E,O> right, MS binderMethod)
-
-
-
Method Detail
-
findBinderMethod
protected abstract MS findBinderMethod(AbstractBinder.Node<E,O> left, AbstractBinder.Node<E,O> right)
-
makeBinaryExpression
protected abstract AbstractBinder.Node<E,O> makeBinaryExpression(AbstractBinder.Node<E,O> left, AbstractBinder.Node<E,O> right, MS binderMethod)
-
bind
public B bind(ArrayList<AbstractBinder.Node<E,O>> operands)
-
-