예제 #1
0
파일: analyzer.py 프로젝트: EvelynHf/basil
def analyzeSequence(exps):
    def sequentially(analyzedFirst, analyzedSecond):
        def c(env, cont):
            def c_first_exec(ignoredVal):
                return pogo.bounce(analyzedSecond, env, cont)
            return pogo.bounce(analyzedFirst, env, c_first_exec)
        return c
    if pair.isNull(exps):
        raise SchemeError, "Empty sequence -- ANALYZE"

    analyzedSeqs = analyze(expressions.firstExp(exps))
    exps = expressions.restExps(exps)
    while not pair.isNull(exps):
        analyzedSeqs = sequentially(analyzedSeqs,
                                    analyze(expressions.firstExp(exps)))
        exps = expressions.restExps(exps)
    return analyzedSeqs
예제 #2
0
파일: evaluator.py 프로젝트: EvelynHf/basil
 def c(val):
     return evalSequence(expressions.restExps(exps), env, cont)
예제 #3
0
 def c(val):
     return evalSequence(expressions.restExps(exps), env, cont)