
Parsing Techniques A Practical Guide
by Ceriel Jacobs · first published 2010
15mentions
7recommended by
10HN commenters
2009–2023first – last mentioned
70% recommend30% neutral
Why HN recommends it
Comprehensive survey of parsing algorithms and a reference for learning parsers and compilers. Well suited to language-design work and to compiler and language implementers.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.








By far my favorite survey book on the subject is "Parsing Techniques: A Practical Guide" by Grune and Jacobs. Here is my Amazon review of the book: https://www.amazon.com/gp/customer-reviews/R17E19PSPM2UO9
on “LL and LR Parsing Demystified (2013)” ↗…Essentials of Programming Languages [1st edition] James F. Gimpel, Algorithms in Snobol4 Paul Graham, On Lisp Philip Greenspun, Philip and Alex's Guide to Web Publishing Grune and Jacobs, Parsing Techniques: A Practical Guide Daniel Hillis, The Connection Machine Kernighan and Pike, The Practice of Programming Kernighan and Pike, The Unix Programming Environment Kernighan and Plauger, Software Tools in Pascal…
on “Which programming book you just couldn’t stop reading from start to end?” ↗…find an explanation (potentially dry, long, and complicated) of the algos you mention here? > In other words - how did you get to know them? My book recommendation: Dick Grune, Ceriel J.H. Jacobs - Parsing Techniques: A Practical Guide (Second Edition). Many people will also recommend the "dragon book" (Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman - Compilers: Principles, Techniques, and Tools (Second edition)), which…
on “LL and LR Parsing Demystified (2013)” ↗…greater detail, and I'd also recommend either for learning compilers in a heartbeat. (Appel's _Compiling with Continuations_ is also excellent, but doesn't cover parsing.) Following that, Dick Grune's _Parsing Techniques: A Practical Guide_ (http://www.few.vu.nl/~dick/PTAPG.html) is a good reference...and thorough. If you're reading it to learn the basics, it might seem a bit dry, but I think it's at a sweet spot between depth of coverage…
on “A quick intro to writing a parser with Treetop” ↗…(http://repository.readscheme.org/ftp/papers/ai-lab-pubs/AIM-...). Also, CiteSeer (http://citeseerx.ist.psu.edu/) is a gold mine. I haven't gotten _Hackers Delight_ yet, but it's on my list. * Recommended: Dick Grune's _Parsing Techniques, a Practical Guide_. Lots of deep content, but would still be worth it for the bibliography alone.
on “Which programming book you just couldn’t stop reading from start to end?” ↗I mean, I think you should read a book on parsing theory, just not that one. I like "Parsing Techniques: A Practical Guide" but there might be a newer better one. But clang and gcc both have handwritten recursive-descent parsers for C/C++. (C++ parsing of course is undecidable, or at least used to be.)
on “Lessons from Writing a Compiler” ↗Given that he provides a quite useful (for me, at least) link to Parsing Techniques - A Practical Guide, I don't know that "nothing" is entirely fair. I guess one could also raise the question of the context being discussed, and therefore which meanings of "parse" are being discussed. The post appears…
on “Let's parse” ↗When I started dabbling in programming languages design, Parsing Techniques - A Practical Guide was invaluable for me. I cannot recommend this book enough. First edition is available for free from one of co-authors site [0]. [0] https://dickgrune.com/Books/PTAPG_1st_Edition/ Edit: minor clarification.
on “Any resources for designing the syntax for a programming language?” ↗…compiler book and you shouldn't read it. I don't know why people recommend it (not saying you did.) It explains things poorly and gets far too into the weeds on things that don't matter. I recommend "Parsing Techniques: A Practical Guide" and Muchnick's compilers book - though there's probably something better by now.
on “Ask HN: How to learn proper systems programming?” ↗…the purple dragon and obviously, when you have the purple dragon, you MUST create your own programming language. Please read a better compiler book! The only good thing about that one is the cover. "Parsing Techniques: A Practical Guide" is much clearer even just for the frontend.
on “Why my projects keep failing” ↗…whether I should pick a book that is a bit less comprehensive first, then come back to this one later; - The Dragon Book (old version, 1986) - Engineering a Compiler, by Keith Cooper and Linda Torczon - Parsing Techniques - A Practical Guide, by Dick Grune; focuses on parsing though rather than the whole package So my question is, which of these books, or any others, do people recommend? (My main interests would be interpreters and languages…
on “Ask HN: Which compiler book to pick?” ↗According to "Parsing Techniques: A Practical Guide" [1], it is quite common for computer languages to have most of the grammar in the regular grammars class and some parts to be, actually, context-free. [1] https://dickgrune.com/Books/PTAPG_1st_Edition/BookBody.pdf…
on “Parsing Algorithms” ↗I was more thinking along the lines of, "Oh yeah, I've read them all. Wait, MIX? What's that?" I've seen several equally dense, informative CS books (such as Dick Grune's _Parsing Techniques: A Practical Guide_), but Knuth has a specific sort of cachet among xkcd-quoting geek hipsters, so people namedropping him, make a pretense of having read them all the way through, etc.
on “Art of Computer Programming, Volumes 1-4A Boxed Set” ↗…parsing, but is obsessed with the idea and spends 2/3 of the time talking about it, so you'll just be left thinking it's really difficult. The whole thing is extremely boring and lacks confidence. Try "Parsing Techniques: A Practical Guide" and then a more concise book like Muchnick.
on “Ask HN: What language-agnostic programming books should I read?” ↗You might want to checkout Parsing Techniques: A Practical Guide by Dick Grune et.al. Came across it on HN but I have not read it though.
on “The dragon compiler book (2nd edition) is a great book” ↗