Compilers and Interpreters: Assignment 2
September 12, 2005
Part A: Adding Loops
Extend the RoboLand language to handle loops.
The syntax and semantics are as illustrated below:
; make a square
You need only implement top-level loops, not nested loops.
Part B: Adding Batch Processing
Extend the RoboLand language to handle invocation
of scripts stored in files.
The syntax is as illustrated below:
; execute commands from a file
run c://usr/longpre/square.rbl 800
This will execute the commands from the specified file,
pausing 800 milliseconds between the execution of each statement.
Part C: Adding Nested Loops (Design Only)
Describe how you could extend your interpreter
to allow nested
Due Wednesday, September 24, at the start of class.
Hand in (or e-mail me before Wednesday class)
- a printout of your revised Interpret.java,
- screenshots showing how it works,
- a printout of your nested loop design explanation.
- any documentation you think I should have.