CSE P 501 Au05 - MiniJava

Overview

The course project is to implement the MiniJava language specified in the Appendix of Appel's Modern Compiler Implementation in Java, 2nd edition. MiniJava is a subset of Java and the meaning of a MiniJava program is given by its meaning as a Java program.

One simplification: You are not required to implement /* ... */ comments, or if you do, you do not need to have them nest.

We may simplify the requirements somewhat in later phases of the project to emphasize the most important points if we discover that it will be difficult to completely implement all of MiniJava by the end of the quarter. But for now, particularly in the scanner and parser, include the full language as specified in the book.

Extensions

The basic project requirements are small enough to be tractable in a course project, but include enough to cover the core ideas of compiling an object-oriented (as well as procedural) language. If you are feeling ambitous and have the time, you are invited to add additional parts of Java to the language. Here are a few suggestions.

Some Simple Ideas

Adding an additional numeric type like double would not be particularly interesting, since there is practically no difference in how the compiler handles ints and doubles. However, adding String literals and the concatenation (+) operator would be interesting.

More Sophisticated, but very interesting

Of the suggested extensions, adding instanceof, type casts, and super. are particularly instructive.

Some extra credit will be available for projects that go beyond the basic requirements.