3 ms·
Engineering a Compiler by Cooper and Torczon is probably better these days than the dragon book. The dragon book is of primarily historical interest imo. (Unles
by jey 19y ago
Engineering a Compiler by Cooper and Torczon is probably better these days than the dragon book. The dragon book is of primarily historical interest imo. (Unless you really do need to write an LL(k) parser generator...)
I would say coding is more important than studying the books a lot.
- kirubakaran 19y agoThanks. Is "Engineering a Compiler by Cooper and Torczon" good for actually coding a compiler?
- jey 19y agoNo, no book is good for that. You just need to pick a project and start coding. Interpreters are a fun place to begin. I'd suggest getting a parser generator and reimplementing Lua or something. You'll want to look up stuff in the Cooper & Torczon book as you do this (like what an abstract syntax tree is), but I doubt it's useful to read it through or study it. Reading the code of existing compilers is also very helpful. (A word to the wise: Don't start with the source code of GCC or other industrial-strength compiler. :)) (This is my philosophy toward learning anything programming related, so maybe I'm just weird.)
- kirubakaran 19y agoThanks a lot.
- tx 19y agoI found source code of IronPython very easy to understand and modify. Check it out, it's written in clean C#.
- pchristensen 19y agoThis is curious. I haven't studied compilers at all, but I always hear the Dragon book is the default. Can anyone second these recommendations (Cooper/Torczon, the Gholoum paper)?
- mhartl 19y agoA new 2nd edition of the Dragon Book just came out last summer. Is that one still only of historical interest?
- jey 19y agoI don't know, I haven't looked at it. But you won't go wrong with Cooper & Torczon.