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. 387.
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 - The Fast Lexical Analyzer:
manual.
IMADA runs version 2.5.35, but the differences are negligible.
-
GNU Make:
manual.
IMADA runs version 3.81, but the differences are negligible.
-
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
-
Kim S. Larsen,
Supplementary Notes for DM546,
February 11, 2015.
It comes in two versions. It's the same material, but font size,
and therefore number of pages, differ.
You can print as you always do as regular A4 in 11pt (19 pages)
or as an A5 booklet (24 logical / 12 physical pages).
The latter is in my opinion nicer, but
requires that you can print 2-sided and can staple in the middle
of an A4 page.
- A4 (pdf)
- Print as you normally do.
- A5 booklet (pdf)
- Use acroread, for example, print 2-sided, short-edge binding.
- A5 booklet (ps)
- For direct duplex postscript printing.
- A5 booklet (ps, recto-verso)
- For direct duplex postscript printing on a recto-verso printer.
-
Differences between Intel and ATT syntax.
-
GNU Assembler
Manual.
-
GNU Assembler Program Examples:
first.s,
testglobalvar.s,
myfactorial-annotated.s.
In first.s, everything has been done "correctly", saving all callee
and caller save registers at any call point. In myfactorial-annotated.s,
this part has been abbreviated to just saving one representative
every time.
-
Handling division in GAS:
div.c, div.s.
-
A note on lattices and fixed points.
-
A complete stack frame layout.
-
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)
-
Karen Miller,
An Assembly Language Introduction to Computer Architecture -
using the Intel Pentium,
Oxford University Press, New York, 1999, kapitel 10.
- Call conventions and stack layout (3 transparencies)
- Register allocation via liveness analyse (19 transparencies)
- Garbage collection (22 transparencies)
Last modified: Tue Mar 10 10:16:48 CET 2015
Kim Skak Larsen
(kslarsen@imada.sdu.dk)