C311 Fall 1996 -- Programming Languages

Assignment 3: Simple Interpreter

Due Friday, September 27, 5:00P

An interpreter that is equivalent to that of EOPL Section 5.1 is available in the file start3.ss . This is essentially the interpreter developed in class, with some consolidation and a few name changes.

Files such as start3.ss that are mentioned in assignments are available on UCS Unix machines in the directory /N/fs16/chaynes/Copper/Nfs/c311 and on IUCS machines in the directory /l/www/classes/c311.

Frequently assignments, such as this one, will have multiple parts involving interpreter modification. Unless otherwise noted, in such cases you are to hand in a single interpreter incorporating all of the modifications. It is good software development practice to add the modifications of one assignment part at a time and test each before proceeding.

Start with an interpreter in the style developed in class. This may be provided as part of the assignment, as in the file start3.ss mentioned above.

The assignments in the book uses a crufty Pascal-like syntax for the source language. For all assignments use instead a Scheme-like syntax consistent with the style of the class interpreters. This assignment is to do the following exercises with the above considerations in mind.

  1. EOPL Exercise 5.1.4
  2. EOPL Exercise 5.1.5
  3. EOPL Exercise 5.2.1
  4. EOPL Exercise 5.2.2
  5. EOPL Exercise 5.2.3

Test Cases

For a list of test cases, take a look at this sample scheme interaction output.

Submission

As before, but refer to "handin 3".


Chris Haynes / chaynes@indiana.edu