Compilers


Spring 2018

Grace Hopper in 1952

Documents

Books

Projects and Labs

  • Consider embracing Computer Science scholarship and writing up your labs using LaTeX. ShareLaTeX is probably the easiest way to do this. I've written a lab write-up template you can use. There are more LaTeX resources below.
  • Most of the labs feed into the projects. Get started by looking at Our Language Grammar. Also have a look at the resources below to help get you started.
    • Lab 0: Development Tooling and Build Documentation (and getting started with LaTeX)
  • Project One - Build an interesting lexer.
    • Lab 1: Making tokens with your Lexer
    • Lab 2: More token making, now with Finite Automata
  • Project Two - Build an interesting parser and CST.
    • Lab 3: Turning tokens into sentences with your Parser
    • Lab 4: Analyzing Grammars
    • Lab 6: (partial) Building Syntax Trees both Concrete and Abstract
  • Project Three - Adding an AST and Semantic Analysis.
    • Lab 5: Symbol tables and you (and your compiler)
    • Lab 6: (partial) Building Syntax Trees both Concrete and Abstract
    • Lab 7: Semantic Analysis: Checking scope and type
  • Project Four - A full compiler, with 6502a code generation.

Examples

Resources

Wirth's original Pascal compiler on DEC tape

Articles

Past Project Hall of Fame

JavaScript or TypeScript projects only. There have been some fantastic projects in Scala, C++, Python, and other languages, but they (obviously) will not execute in a web browser.
I reserve the copyright for all parts of my courses. Commercial reproduction of any course material, including lecture notes taken by students, without my EXPRESS WRITTEN consent, is prohibited. Seriously.