Course Materials

TC

Slides

The lecture slides for the current period (2012-2013) are posted here:

Date Lecture
2012-11-12 Introduction
2012-11-15 Grammars and Parsing
2012-11-19 Parser Combinators
2012-11-22 Parser Combinators and Grammar Transformations
2012-11-26 Grammar and Parser Design
2012-11-29 Compositionality
2012-12-03 Compositional Interpreters for Expressions
2012-12-06 Intermediate Summary
2012-12-10 Simple Stack Machine (animated) (SSM reference)
2012-12-17 Regular Languages
2012-12-20 Regular Expressions and Pumping Lemmas
2013-01-07 LL Parsing
2013-01-10 LR Parsing (part 1)
2013-01-14 LR Parsing (part 2)
2013-01-17 Advanced Parser Combinators
2013-01-21 Summary, Exam preparation
2013-01-24 Questions

Lecture Notes

In this course we will use the lecture notes on Languages and Compilers. The latest version posted here is from November 2011.

You can also buy a printed copy of the lecture notes from the OSZ for ¤13. Some of the printed versions may be from older editions, but the differences are minor.

Errata

Please reports any errors you find in the lecture notes. We will post them here.

Software

Basic Installation

We use Haskell for all labs. The easiest way to get all the tools you need is by installing the Haskell Platform. The lab computers should already be configured with the Haskell Platform.

If, for some reason, you need to configure a system without the Haskell Platform, then you will need to install the following tools:

  • GHC - the Glasgow Haskell Compiler
  • Alex - a lexical analyser generator
  • Happy - a parser generator

Installing Packages from Hackage

You may decide to install packages (such as alex or happy) from the open package repository called Hackage. You can do this using software called cabal-install, whose command-line tool is called cabal and is included with the Haskell Platform. See the guide on how to install a Cabal package for more on this procedure.

At the lab computers the cabal command is available from the special cabal command prompt which can be found under Start -> Standard Applications -> Informatica -> Haskell 2011.2.0.1 -> cabal. In short, to install a downloaded cabal package, unzip it and in the resulting directory do cabal install. To install a package which is available at Hackage, use the command cabal install packagename.

Parser Combinator Library

For the parser combinator labs in this course, we use our own Haskell package uu-tc. You can download one of the following files (tar.gz for Linux and Mac or zip for Windows), decompress it, and install it using cabal.

The documentation for the package is available here:

Simple Stack Machine

The SSM page has the reference for the Simple Stack Machine architecture and instruction set.

Old Exams

Year First Exam Second Exam Extra Exam
2003 exam (solutions) exam (solutions) exam (solutions)
2004 exam (solutions) exam (solutions) exam
2005 exam (solutions) exam (solutions)  
2006 exam (solutions) exam  
2007 exam (solutions)    
2008 exam (partial solutions)    
2009 exam (solutions) exam (solutions)  
2010 exam (solutions) exam (solutions)  
2011 exam (solutions) exam (solutions) exam (solutions)
2012 exam (solutions) exam (solutions)