From: | Bakul Shah <usenet@bitblocks.com> |
Newsgroups: | comp.compilers |
Date: | Wed, 18 Apr 2012 21:15:09 -0700 |
Organization: | Sonic.Net |
References: | 12-04-019 |
Keywords: | books |
Posted-Date: | 19 Apr 2012 23:11:14 EDT |
Check out Nils M Holm's "Practical Compiler Construction", available
at lulu.com. It is a 365 page "tour" through a *complete* compiler for
a subset of C language. The compiler can compile itself and you can
download the code from author's site (www.t3x.org). It doesn't use
lex or yacc (just a hand-rolled scanner and a recursive descent
parser). The compiler is about 4300 lines of code. It describes all
the key concepts but given the simple design doesn't go into a lot of
details (beyond describing the code). The book describes a i386 code
generator. The code generator interface seems well enough abstracted.
When challenged, Nils put together a x86-64 backend in a day!
I have just skimmed the book so far but compared to the Fraser and
Hanson C compiler book this is a much simpler book, doesn't go in as
much depth but seems to be an easy read. So a good beginner book but
you'd do well to consult other books later.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.