Class AbstractBinder<MS, B extends E, E, O>
java.lang.Object
manifold.internal.javac.AbstractBinder<MS,B,E,O>
expression (velocity: length/time): 5 mi/hr
(bad) (good)
÷ ?
/ \ / \
? hr 5 ÷
/ \ / \
5 mi mi hr
A 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbind(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)
-
Constructor Details
-
AbstractBinder
public AbstractBinder()
-
-
Method Details
-
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
-