Class AbstractBinder<MS,​B extends E,​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  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)))