CSC394 Translator and Compiler Design.
Smith College. Fall 2002

Judy A. Franklin
Text: Programming Language Processors in JAVA
By David A. Watt and Deryck F. Brown


    1. Come to class all the time.
    2. Do all the homework.


  1. Programming Projects - working together in teams to write Java programs that are extensions of the three pass compiler that is provided with the text.
  2. Exercises from the Text to be done individually
  3. In-class participation in solving exercises from the text.
  4. Reading the textbook and being prepared to discuss it in class.
  5. 1 takehome exam, to be done individually


We will review concepts of high-level programming languages, and language grammars. We talk about translators, interpreters and portable compilers and then take a deeper look into compilers, decomposing them into syntactic analysis, contextual analysis, and code generation. Each of these can be accomplished by making a pass through the user program to be compiled. We spend time on each of these passes, from a theoretical/conceptual viewpoint and at the same time from examining and writing Java code. The language we will write the compiler for is called the Triangle language, and it is a subset of Pascal. Pascal is a procedural language, much like C. Throughout the course we will write small programs in the Triangle language to test our compiler.

Important Links


Listen to the compiler, compiling this triangle program.