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: "Joe Schmo" Newsgroups: comp.compilers Subject: Re: Good practical language and OS agnostic text? Date: Sat, 21 Apr 2012 02:53:46 -0600 Organization: Aioe.org NNTP Server Lines: 26 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <12-04-054@comp.compilers> References: <12-04-019@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: leila.iecc.com 1335042820 20759 64.57.183.58 (21 Apr 2012 21:13:40 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Sat, 21 Apr 2012 21:13:40 +0000 (UTC) Keywords: books Posted-Date: 21 Apr 2012 17:13:40 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:597 wrote in message news:12-04-019@comp.compilers... > Guys, I'm having a bear of a time finding a good practical language > and OS agnostic text on writing a compiler. I'm weak in math and not > interested in the theoretical details. I want to understand the hows > and whys of compiler writing. Everything I've found is either > gobbledygook equations or "let's use C/C++/Java on UNIX" or things > that are so trivial and focused they don't explain general cases and > can't be extended to anything useful. The first few chapters of "Programming Language Pragmatics" by Michael Scott for a good and fast overview. (The rest of the book is quite good also if you are designing your own language). "Writing Compilers & Interpreter - An Applied Approach" by Ronald Mak. Creates a Pascal compiler in C which emits x86 assembly language. The Fischer and LeBlanc authored book is good for the implementation details. I.e., their particular take on an implementation anyway. It sticks in my mind that this is a very good book (but I somehow lost the mini review I made for myself about it) that I will obtain again in the future. I think the whole "write a grammar and feed it through a tool to produce a lexer and parser" thing is something to avoid, at least at first (I'm avoiding it like the plague, FWIW). Surely that paradigm is part of the reason that programming languages are so complex. [COBOL managed to have arcane syntax and hundreds of reserved words before there were any compiler tools at all. That's not it. -John]