Lecture 10: Mini Language Compiler

Background Material



This lecture shows how to write a compiler that translates Mini Language programs to programs that execute on a simpler model of computation, namely a bounded memory random access machine with a single accumulator. The compiler uses the same infrastructure for parsing that the Mini Language Interpreter used.


  1. Random Access Machine (RAM) model.
  2. Random Access Machine Assembly Language (RAL)
  3. Compiling Mini Language expressions and statements to RAL
  4. Symbol Table, Memory Model and Linking symbolic RAL programs.
  5. Simple optimizations
  6. Adding support for procedures
    1. Activation records and local variables
    2. Parameter passing
    3. return statement
    4. Call stack

Lecture Notes



Created: June 4, 2007 by jjohnson AT cs DOT drexel DOT edu