Date of Award


Document Type

Thesis (Undergraduate)


Department of Computer Science

First Advisor

Jay Aslam


One of the major drawbacks in the field of computer software development has been the inability for applications to compile once and execute across many different platforms. With the emergence of the Internet and the networking of many different platforms, the Java programming language and the Java Platform was created by Sun Microsystems to address this "Write Once, Run Anywhere" problem. What sets a compiled Java program apart from programs compiled from other high level languages is the ability of a Java Virtual Machine to execute the compiled Java program on any platform, as long as the Java Virtual Machine is running on top of that platform. Java's cross platform capabilities can be extended to other high level languages such as C. The main objective of our project is to implement a compiler targeting the Java Platform for a subset of the C language. This will allow code written in that subset of C to be compiled into Java Virtual Machine instructions, also known as JVM bytecode, which can then be executed on a Java Virtual Machine running on any platform. The reader is assumed to be intimately familiar with compiler construction, the use of the flex scanner generator, the use of the GNU bison parser generator, and the structure and implementation of the Java Virtual Machine.


Originally posted in the Dartmouth College Computer Science Technical Report Series, number PCS-TR98-334.