
Basics of Compiler Design - cygwin98
http://www.diku.dk/hjemmesider/ansatte/torbenm/Basics/
======
cygwin98
As I've been working on my pet compiler project recently, I began to collect
some compiler-related online resources, this book is one of the hidden gems.
The author (Torben Mogensen) has been so generous to give it out for free,
that's why I think it needs more exposure.

It's heavy on the compiler theory part, so I mainly use it as a reference
book. It also has a "companion" book (my take) -- Programming Language
Concepts for Software Developers [1] by Peter Sestoft. The PLCSD book, also
free, is more on hand-on projects, where you can implement a Micro-C compiler.

[1] <http://www.itu.dk/courses/BPRD/E2010/plcsd-0_50.pdf>

~~~
singular
Perfect. The two together act to provide theory + practice (especially cool
that PLCfSD uses F# :-)

What other resources have you found, and how do they compare? Have you read
the Dragon Book? I hear it isn't actually all that wonderful in reality,
though there seems to be differing opinions on that.

I have both a pet compiler project which has never really got off the ground
and am attempting to contribute (albeit slowly!) to the go programming
language so have a special interest :)

~~~
cygwin98
The intriguing part of PLCSD to me is that it uses F#, which is the language I
use as the tool for my project, :)

I took compiler course during my university days, so the theory part is not a
big issue to me. That's why this free book comes so handy as a reference book.
I'm aware of the dragon book, tiger book, as well as, the whale book and had a
quick read in bookstore. They all are good books, but I don't find my need to
keep them on my bookshelf. So I don't think I am in the position to comment on
them. YMMV.

~~~
abecedarius
I hadn't heard of a whale book -- that turns out to mean Muchnick's.

------
TroelsHenriksen
Nifty, I actually worked a TA under Torben Mogensen recently, teaching out of
this book. It's a really succinct description of the fundamental theory,
although a little light on the practice.

~~~
cygwin98
Out of curiosity, what projects the students have to implement for the course?

~~~
TroelsHenriksen
They are given a functioning compiler (written in Standard ML) for a small
subset of a relatively simple artificial language (a new one every year), and
they have to extend the compiler to support the full language. This involves
changing every level (lexing, parsing, type-checking and code generation). For
the final exam, they have to add a new feature to the language.

