sdr 0.7

Package net.cscott.sdr.calls.transform

This package contains code to parse call lists and transform call abstract syntax in various ways.

See:
          Description

Class Summary
CallFileLoader This class contains the code to parse and load a call list.
Finish Transformation implementing C1List.FINISH.
Finish.PartSelectorCall Helper class to define concepts based on this class (and subclasses of it).
FirstPart Transformation implementing C4List._FIRST_PART (not on any list).
Fractional Transformation implementing BasicList._FRACTIONAL.
LikeA Transformation implementing C4List.LIKE_A.
PartsVisitor<T> Helper for transformations which treat separate parts of a call, like Fractional, Finish, and LikeA.
RemoveIn Push Ins down a call tree and adjust Prim timing where possible.
TransformVisitor<T> TransformVisitor is a superclass to eliminate common code when writing tree transformations.
ValueVisitor<RESULT,CLOSURE> ValueVisitor is a superclass to eliminate common code when writing tree transformations.
 

Package net.cscott.sdr.calls.transform Description

This package contains code to parse call lists and transform call abstract syntax in various ways.

Tests:
Square thru is "2 beats per hand", so square thru 1 1/2 takes 3 beats. Tests call evaluation, in removal, and fractionalization.
js> importPackage(net.cscott.sdr.util) // for Fraction
js> importPackage(net.cscott.sdr.calls) // for CallDB, DanceState
js> importPackage(net.cscott.sdr.calls.ast) // for Apply
js> ds = new DanceState(new DanceProgram(Program.BASIC), Formation.FOUR_SQUARE); undefined;
js> sqthr = CallDB.INSTANCE.lookup("square thru")
square thru[basic]
js> def = sqthr.getEvaluator(ds, java.util.Arrays.asList(Expr.literal("1 1/2"))).simpleExpansion(); undefined
js> new Evaluator.Standard(def).evaluateAll(ds); undefined;
js> ds.currentTime()
3/1

sdr 0.7

Copyright © 2006-2009 C. Scott Ananian