This problem requires Lecture 34 and book section 5.1-5.4.1.
Part A - Exercise 5.11, p.199 - (30 minutes)
The book omits the BNF:
| The BNF for <expression> (with instanceof) |
|---|
|
Part B - Exercise 5.20, p.200 - (30 minutes)
In our interpreters, the class object is a special case because it is not explicitly represented in the class environment. What procedures must be aware of this special case? Eliminate these special cases by placing a class whose name is object into the intial class environment. Give the class object an initialize method, so that it is possible to create an object of class object, and so that there is a default initialize method.
Implement both of these in the same interpreter and submit it as a single file.
Base your implementation on the simple implementation of an object-oriented interpreter.
Instructions on submitting homework is here
Last updated at 10:32 am on Wednesday, April 05, 2006.