next up previous


COMPILER DESIGN


Projects 3 and 4
Due on April 27, 1998.

  1. Modify your Lex program and yacc programs so that when a Java program is given as an input, the output will be a Byte code for that program. You will be using the assembler written by Jason Hunt (Washington University). Java Assembl er by Jason Hunt

    Your compiler should be able to handle data-types int, long, boolean and control structures if, while, function call, statements, system calls and applets.

    You will get extra 10 points, if your compiler can handle the inheritances.
    Sample Test programs can be found in Sample test .

  2. Find Basic Blocks in the byte codes and draw a directed graph of the control flow. You can use the Graph Draw in Java for drawing graphs. Find the def and use of all the variables and methods.


Moorthy
Thu Feb 15 10:33:10 EST 1996