COMPILER DESIGN
Project 2
Due on March 10th, 1997.
- You have to write a Java Beautifier program that takes a java program and
produces a pretty output with indentation. (Please look at the unix command cb to see what is
does). (Instead of Java Beautifier, you can choose to write java2html which takes a java program
and produces a html document with appropriate links). This part of the project will enable you to have a
better understanding of the parser.
- Modify your Lex program and yacc programs so that when a Java program is given as an
input, the output will be a syntax tree for that program.
Store the identifiers in a symbol table and refer to the symbol table offsets when you address an identifier. In the next project, you have
to traverse this tree to produce Virtual Machine code.
Moorthy
Thu Feb 15 10:33:10 EST 1996