sdr 0.7

net.cscott.sdr.calls
Class Evaluator.EvaluatorChain

java.lang.Object
  extended by net.cscott.sdr.calls.Evaluator
      extended by net.cscott.sdr.calls.Evaluator.EvaluatorChain
Enclosing class:
Evaluator

public static class Evaluator.EvaluatorChain
extends Evaluator

Chains multiple evaluators together. Used to implement Seq.


Nested Class Summary
 
Nested classes/interfaces inherited from class net.cscott.sdr.calls.Evaluator
Evaluator.EvaluatorChain, Evaluator.Standard
 
Constructor Summary
Evaluator.EvaluatorChain(Evaluator head, Evaluator next)
           
 
Method Summary
 Evaluator evaluate(DanceState ds)
          Do "one part" of the continuation, and return an Evaluator which will do the remaining parts, or null if there are no additional parts to evaluate.
 boolean hasSimpleExpansion()
          Return true iff this Evaluator simply evaluates an Ast tree.
 Comp simpleExpansion()
          Returns the equivalent simple expansion of the call, if it has one.
 
Methods inherited from class net.cscott.sdr.calls.Evaluator
breathedEval, evaluateAll, parseAndEval, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Evaluator.EvaluatorChain

public Evaluator.EvaluatorChain(Evaluator head,
                                Evaluator next)
Method Detail

evaluate

public Evaluator evaluate(DanceState ds)
Description copied from class: Evaluator
Do "one part" of the continuation, and return an Evaluator which will do the remaining parts, or null if there are no additional parts to evaluate.

Specified by:
evaluate in class Evaluator
Parameters:
ds - The dynamic dance state. Accumulates dancer actions and movements and tracks static dance information like the level of the dance.
Returns:
An Evaluator for the remaining parts, or null.

hasSimpleExpansion

public boolean hasSimpleExpansion()
Description copied from class: Evaluator
Return true iff this Evaluator simply evaluates an Ast tree. That is, if we can "look inside" the definition of this call or concept by treating it as equivalent to its expansion.

Overrides:
hasSimpleExpansion in class Evaluator

simpleExpansion

public Comp simpleExpansion()
Description copied from class: Evaluator
Returns the equivalent simple expansion of the call, if it has one.

Overrides:
simpleExpansion in class Evaluator

sdr 0.7

Copyright © 2006-2009 C. Scott Ananian