The Compiler Course

Joseph Bergin - - Pace University, New York

Note that this page and the online syllabus need updating.

During the Spring of 2009, I will be teaching CS 605, which is a course in compiler construction. Students will build a complete compiler for a small language from a set of skeletons implementing a subset of the language. Students will work in teams of two students on this project, which will be the major determinant of the student's grade. This course is normally considered to be very challenging and to require a large amount of student time and a lot of Java programming. Course materials, including the skeletons of the project be found later on this page. The project will be built in Java. The project will be very Object-Oriented. You can get a copy of the Java Tutorial (2ed) by Campione and Walrath from Addison-Wesley.


You will need access to a recent version of a compiler for Java. For Java, version 1.5 or later will be REQUIRED, including inner classes. You will not be able to adapt an older compiler for this course. The Java Development Kit from Sun is free (visit, but is somewhat awkward to use without an IDE. Sun also provides Documentation and tutorials. Here is Sun's Java Tutorial The integrated environments set themselves up when you install them. For this course we will use Eclipse from It is very complete and is free, but takes some learning. You will need version 3. We need Eclipse Version 3 due to some integrated tools that work with it that we need.

The compiler will be built using an Attribute Grammar system called CoCo/R (Compiler-Compiler) from H. Mossenbock in Linz, Austria. Here is the home page of COCO. Note, however, that I have modified some of the files to be more compatible with what we shall do. The modidifed files are in the course materials (see below).

A Simple Language for a Compiler Project

The next link describes a language is suitable for a reasonable student compiler project. The language you will compile in this course is similar to this one, but NOT the same.

GCL: A Language For A Compiler Project

If you are planning to take this course, you will find the Languages Principles Course to be helpful. Some of the theoretical background of compilers is discussed there, as well as in the course on Computability and Automata.

Submitting Your Work

Throughout the term your work is to be submitted in a plain manila folder. This folder should have your name on it on the outside and on the tab. At the end of the term your work is to be submitted bound into an ACCOPress or equivalent binder. You should tape an envelope conataining the disk with all of your code to the inside of the binder. Do not use three ring binders to submit your work. There is more on submitting your work in the course notes.

Outline of Tasks -- ONLINE Syllabus

There are many things you need to do in this course to be successful. The online syllabus can help with this. It also contains a FAQ.

Obtaining the Software

The Project Skeletons

Students develop a compiler starting with skeleton framework for a simple language. The compiler will be developed in Java. There is also a pre-built sample compiler that you can test your own compiler against. You can ftp the course software by clicking below.


This software is now up to date. These links are to the 2009 versions.

IBM/PC Software. Zip archive.

PC Software

Linux Software. This is a zip archive.

Linux Software

Macintosh Software. Zip archive (OS 9 and now OS X).

Macintosh Software

Other Materials

Additional materials, including updates to some of the packaged files are occasionally made here. At this time there is nothing avaliable.

A number of the course lectures use supplementary visuals. These slide shows will be made available here as presentations. Some of these will be annotated with lecture material. This area will grow as the course progresses.

The Presentation Files in PDF format

Compiler Course Slides

The Compiler Builder Awards -- Spicy --

Click here to see who has built the award winning student compilers in recent years. Fame and fortune abound. (Not up to date)

If you have trouble with any of these files, send me EMAIL at Please inform me about typos and other errors.
Back to Joseph Bergin's Home Page


Last Updated: January 19, 2009