This is the programming exercise at the end of chapter 1 of Appel's book.This is
to implement a simple interpreter and analyser for SLP in Java. You can use the following files in this exercise:
- slp.java: this file contains the definition of the abstract syntax of the straight-line programming language as given in the book. You should edit this file to add methods to interpret the language and count the maximum number of arguments in any print statements.
- interp.java: this is the main program file. It interprets the given program and returns the maximum number of arguments in any print statements. You do not need to edit this file.
- prog.java: this file contains an example SLP program written in the abstract syntax defined in slp.java. This program should be used as the input to interp.java.