Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.iecc.com!nerds-end From: Bakul Shah Newsgroups: comp.compilers Subject: Re: Good practical language and OS agnostic text? Date: Wed, 18 Apr 2012 21:15:09 -0700 Organization: Sonic.Net Lines: 16 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <12-04-030@comp.compilers> References: <12-04-019@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: leila.iecc.com 1334891474 81025 64.57.183.58 (20 Apr 2012 03:11:14 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Fri, 20 Apr 2012 03:11:14 +0000 (UTC) Keywords: books Posted-Date: 19 Apr 2012 23:11:14 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:573 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.