Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was taught from, and have since taught with, this book. I like that it's so concise, where I think e.g. the Dragon Book contains way too much irrelevant information (and also dubious and obsolete implementation advice, like global symbol tables). Of the books I have read, I think this one strikes the best balance between breadth and depth when it comes to the theory of compiler design. It gives you sufficient information about how to handle every part of a compiler, but doesn't necessarily show you a lot of options in each area.

The only weakness is that it takes a mature programmer to go from the high-level descriptions and pseudocode in the book, to a concrete implementation. It helps if you write in a functional language, since the pseudocode is essentially Standard ML. I think this book might be well served by a small companion guide on how to practically implement the designs and algorithms it covers.



The book's chapter 3 does not describe the current state of the art. I find it is useful only as a historic background up to a certain point in time (1969?).

However, from a practical standpoint, if one wants to want to implement a parser (for the purpose of a compiler) or attempt to use the book in order to try to save time deciding what is a good parser that does not suffer from algorithmic shortcomings, one is advised to look at more modern algorithms. Notably, anything with LR in its name, anything called PEG or packrat can be outright avoided if one values one's time.


???

Then which one? Pratt and top down by hand?




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: