Literature and Other Resources
The course textbook is
Andrew W. Appel,
Modern Compiler Implementation in C,
Cambridge University Press, 1998, ISBN 0-521-58390-X
(reprinted with corrections, 1999; reissued, 2004).
It can be bought in the
university bookstore
for kr. 445.
Errata etc. can be found via the
book home page.
My supplement to the errata,
i.e., additional misprints not yet registered by the authors.
Supplementary literature and material (will be updated as needed)
-
If you do not already know the C programming language, you are
recommended to purchase the following book:
Brian W. Kernighan, Dennis Ritchie,
The C Programming Language, 2. eds.,
Prentice Hall, 1988.
As an alternative one can use
the WWW-book by Holmes.
-
Flex, version 2.5.35
- The Fast Lexical Analyzer.
-
GNU Make, version 3.81.
-
A first flex definition file - so you have one you know
should work! To run, carry out the following command line steps
(where your input to the resulting scanner is on the file INPUT):
- flex first.l
- gcc lex.yy.c
- a.out < INPUT
-
Bison
- The YACC-Compatible Parser Generator - which comes
with a quite informative
manual.
-
Examples of nested scope in
C
and Python
-
Karen Miller,
An Assembly Language Introduction to Computer Architecture -
using the Intel Pentium,
Oxford University Press, New York, 1999, kapitel 10
(hand-outs at the lecture).
-
Differences between Intel and ATT syntax.
-
GNU Assembler
Manual.
-
GNU Assembler Program Examples:
first.s,
testglobalvar.s,
myfactorial-annotated.s.
-
Handling division in GAS:
div.c, div.s.
-
Examples of code generation templates:
pdf,
ps.
-
A note on lattices and fixed points.
-
A complete stack frame layout: pdf,
ps.
-
Copies of lecture notes have been handed out for the following topics:
- Scanner (4 transparencies)
- Scanner & parser (18 transparencies)
- Abstract syntax trees (14 transparencies)
- Symbol tabels & scope (8 transparencies)
- Call conventions and stack layout (3 transparencies)
- Register allocation via liveness analyse (19 transparencies)
- Garbage collection (22 transparencies)
- Peep-hole optimization (4 transparencies)
Last modified: Wed Mar 6 09:12:47 CET 2013
Kim Skak Larsen
(kslarsen@imada.sdu.dk)