COMPILER DESIGN

Project 1

Due on February 10th,1997.

  1. Read the language reference manual for Java. This is a huge document but well worth reading it. LALR grammar and the lexical units are specified in the language refernce manual. (There is an Addison Wesley Book called the Java LAnguage Specification by James Gosling, Bill Joy and Guy Steele.) An earlier version is in the compiler design course home page LRM In Postscript (local copy).

    Language Refernce Manual and other useful material is in LRM

  2. Write five sample Java programs which utilizes different features of the language.

  3. Write a Lex program and yacc program that takes any Java program and parses it. The output is either the Java program is syntactically correct or it is not. You need not consider the unicode for lexical units.
.