| Home | Trees | Index | Help |
|---|
| Package tp :: Package client :: Package pyscheme :: Module evaluator |
|
A evaluator based on CPS form and trampolining.
FIXME: add a lot more documentation here about how this all works.
The core forms that the evaluator recognizes is the following:
self evaluating expressions
variable references
QUOTE
SET!
DEFINE
IF
LAMBDA
BEGIN
function application
Other special forms are handled by derivation: the expander module translates
the derived forms into these core forms.
FIXME: quasiquotation hasn't been pushed off into the expander yet.
| Function Summary | |
|---|---|
Applies a procedure on a list of arguments. | |
applyContinuationProcedure(proc,
args)
| |
applyPrimitiveProcedure(proc,
args,
env,
cont)
| |
eval(exp,
env)
| |
evalApplication(exp,
env,
cont)
| |
evalAssignment(exp,
env,
cont)
| |
evalDefinition(exp,
env,
cont)
| |
evalIf(exp,
env,
cont)
| |
Returns a quoted expression, using deepQuotedEval to look for UNQUOTE. | |
Given a list of expressions, returns a new list containing the values of evaluating each on of them. | |
evalSequence(exps,
env,
cont)
| |
The identity function. | |
Evaluates an expression 'exp' in an environment 'env'. | |
| Variable Summary | |
|---|---|
str |
__license__ = 'MIT License'
|
| Function Details |
|---|
apply(procedure, arguments, env, cont)Applies a procedure on a list of arguments. |
evalQuoted(exp, env, cont)Returns a quoted expression, using deepQuotedEval to look for UNQUOTE. Consequently, quoted elements are properly turned into cons pairs. |
evalRands(exps, env, cont)Given a list of expressions, returns a new list containing the values of evaluating each on of them. If the continuation is given, then calls cont() on the evaluated operands instead. |
identity(val)The identity function. |
teval(exp, env, cont)Evaluates an expression 'exp' in an environment 'env'. Exercise 4.3 asks us to rewrite this in a more natural data-directed manner. Pychecker, also, doesn't like seeing so many 'return' statements in one function. *grin* |
| Variable Details |
|---|
__license__
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Fri Jan 1 08:00:27 2010 | http://epydoc.sf.net |