COMPILER DESIGN


Project 2
Due on October 24, 2005.

  1. You have to write a program that takes a java program and produces relavant document similar to that of javadoc. (Please look at the unix command javadoc to see what it does). This part of the project will enable you to have a better understanding of the parser.

  2. Modify your Lex program and yacc programs so that when a Java program is given as an input, the output will be an abstract syntax tree for that program. Store the identifiers, objects in a symbol table and refer to the symbol table offsets when you address an identifier or methods or variables. In the next project, you have to traverse this tree to produce Virtual Machine code.
  3. Study the java assembler in the Java Assembler and write two paragraphs report.