Course Unit Page

Academic Year 2018/2019

Learning outcomes

This course aims at teaching the techniques underlying the construction of compilers and interpreters. We will address the problems for designing high-level programming languages, as well as the tools used to perform syntax-directed translation and to implement execution environments of low-level codes. The techniques that will be described are nowadays used in several areas, whenever it is necessary a syntax-direct analysis of symbolic expressions, of (semi) structured documents, of domain-specific languages, and their translation into more low-level descriptions. Possible applications range from person-computer interaction to advanced techniques of software engineering, including also the analysis and verification of programs. Furthermore, discussing the issues related to tenvironments where high-level code is translated and executed, we will addressspecific aspects related to programming languages such as types and the object-oriented programming.

Course contents

Introduction (compilers and interpreters). ANTLR. Lesson Analysis. Syntactic Analysis (recursive descent parser, LL parser, LR). Semantic analysis (symbol table, type checking). Intermediate code generation. Virtual Machine and Interpreter.


  • Torben Morgensen: Basics of Compiler Design. 2010.

  • Terence Parr: Language Implementation Patterns. 2010
  • material on the e-learning website

Teaching methods

Lectures, computing laboratory

Assessment methods

Written examination and/or home project.

Teaching tools

Projector, blackboard, laptop, computing laboratory

Links to further information


Office hours

See the website of Cosimo Laneve