Modern Compiler Implementation in ML

©1998 by Andrew W. Appel

Tiger compiler modules for programming exercises

Last updated November 10, 1997

This source code is compatible with Standard ML of New Jersey version 109.32. Older versions of the Tiger Compiler modules are compatible with SML/NJ 109.4 and compatible with SML/NJ 109.30.

Implementation notes for the Tiger compiler

  1. Introduction: slp.sml
  2. Lexical Analysis: driver.sml errormsg.sml sources.cm tiger.lex tokens.sig tokens.sml
  3. Parsing: errormsg.sml parsetest.sml sources.cm tiger.grm
  4. Abstract Syntax: absyn.sml errormsg.sml parse.sml prabsyn.sml sources.cm symbol.sml table.sig table.sml tiger.grm
  5. Type Checking: types.sml
  6. Activation Records:
  7. Translation to Intermediate Representation: printtree.sml temp.sig temp.sml tree.sml
  8. Canonical Trees: canon.sml
  9. Instruction Selection: assem.sml canon.sml flowgraph.sml graph.sig graph.sml main.sml runtime.c
  10. Dataflow Analysis: graph.sml
  11. Register Allocation:
    runtime.c
  12. Putting It All Together:
Or get the whole Tiger bundle as a tar file, or as a zip file (please preserve directory structure when unzipping).