Course notes

Important

The notes of this course have been adapted from the notes of the course Compilers by Jordi Cortadella (UPC, Barcelona TECH), which in turn have been adapted from the notes of the course Programming Languages and Translators by Stephen Edwards (University of Columbia).

Lectures

Lecture

Notes (1,4,9 slides/page) (used in class)
Jordi Cortadella
Notes (1,2,4 slides/page) (complementary)
José Miguel Rivero

Introduction

intro.pdf

intro-4up.pdf

intro-9up.pdf

Lexical analysis

lexical.pdf

lexical-4up.pdf

lexical-9up.pdf

scanning-1up.pdf

scanning-2up.pdf

scanning-4up.pdf

Syntax analysis

parsing.pdf

parsing-4up.pdf

parsing-9up.pdf

Attribute grammars

attrGrams.pdf

attrGrams-4up.pdf

attrGrams-9up.pdf

Semantic analysis

semantic.pdf

semantic-4up.pdf

semantic-9up.pdf

Code generation

codegen.pdf

codegen-4up.pdf

codegen-9up.pdf

Code optimization

optimization.pdf dataflowAnalysis.pdf

optimization-4up.pdf

optimization-9up.pdf

Exercises

Here you can find a list of exercises classified by lecture:

Lecture

Exercises

Exercises with solutions

Lexical analysis

lexical_Problems.pdf

Syntax analysis

parsing_Problems.pdf

Attribute grammars

attrGrams_Problems.pdf

Semantic analysis

semantic_Problems.pdf

Code generation

codegen_Problems.pdf

Code optimization

optimization_Problems.pdf