Environment Passing Interpreters
Start with interp3-1.scm whichassgn4.scm must be loadable into Scheme and procedures must pass tests of correctness.Extending definitions of
- loads dj.scm
- loads sllgen.scm
- contains environment from pp 51-56
programandexpressiondata types from pp64-65- interpreter from Fib 3.1, p66
parse-andunparse-expression,program- the 3-1 grammar, specified on pp67-68
expression,primitive,parse-expressionand the grammar as necessary, do
- Ex 3.2.3, p70: Add the primitive
minus- Ex 3.2.4, p70: Add the primitive
- Ex 3.2.5, p70: Add list primitives
cons,car,cdr,list, and a variableemptylistwith value().- Ex 3.3.1, p72: Add and test the
ifform.- Ex 3.3.2, p72: Add numeric equality, zero-testing and order predicates
equal?,zero?,greater?andless?.- Ex 3.3.3, p72: Add the primitive
null?.- Ex 3.4.1, p75: Add and test the
letform (Fig 3.2, p74).- Ex 3.5.1, p80: Add and test the
procform (Fig 3.3, p 78).