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
for kr. 479.
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, 2.5.37 (pdf),
(IMADA runs version 2.6.0, 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
./a.out < INPUT
- The YACC-Compatible Parser Generator:
(IMADA runs version 4.1).
Kim S. Larsen,
Supplementary Notes for DM546,
February 13, 2018.
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 (20 pages)
or just read it electronically.
Alternatively, if you like print, you can get it
as an A5 booklet (25 logical / 14 physical pages / 7 duplex 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.
Manual and the
In case you use other sources for assembler, you may come across the
Intel syntax - here are the primary differences between
Intel and ATT syntax
(the page is for 32 bit, where we use 64 - this just means that
you should read registers such as
and operators such as
Copies of lecture notes have been handed out for the following topics
(there are 4 slides per piece of paper, single-sided):
- Scanner (4 slides)
- Scanner & parser (18 slides)
- Abstract syntax trees (14 slides)
- Symbol tabels & scope (8 slides)