
Parsing Techniques
by Dick Grune · first published 2007
80% recommend15% neutral5% critical
Why HN recommends it
Detailed survey of parsing approaches, covering most practical methods and ambiguity handling. A reference for readers who want depth beyond typical compiler textbooks and will reread it.
Summarised by Claude from recommending comments
"To provide readers with low-threshold access to the full field of parsing techniques, this book uses a two-tiered structure. The basic ideas behind the existing parsing techniques are explained in an intuitive and narrative style, starting from the first principles of data structures and algorithms; this provides breadth and accessibility. The hundreds of realizations and improvements of these basic ideas are explained in an extensive annotated bibliography, in a much terser, yet still informal, style; this provides depth. The reader should have an understanding of algorithmic thinking, espec
Affiliate links. As an Amazon Associate I earn from qualifying purchases.








Books I'll treasure forever: - Advanced Programming in the Unix Environment by Stevens - Operating Systems: Design and Implementation by Tanenbaum - The Art of Unix Programming by ESR - Parsing Techniques by Grune and Jacobs - Applied Cryptography by Schneier
on “Ask HN: What language-agnostic programming books should I read?” ↗…better off implementing a library that handles the same concepts and embeds into another language (which is really what happened with Tensorflow or MapReduce to think of two examples). (Grune's book "Parsing Techniques" is a great reference on parsing crap, but the secret is that if you design your grammar to be LL(1) you can parse your language using recursive descent: you only need a fancy parser if you designed a…
on “Ask HN: Resources for building a programming language?” ↗I think "Parsing Techniques" by Grune & Jacobs is the bible when it comes to parsing, it covers all subjects you mentioned and gives a detailed overview of most practical parsing approaches.
on “Ask HN: Best resources for learning about commercial “IDE grade” parsers” ↗Parsing Techniques by Dick Grune is THE bible for parsing.
on “Parsing: The Solved Problem That Isn't (2011)” ↗If you are interested in going deeper, may I recommend "Parsing Techniques" by Dick Grune et al [1]. I have read this book over five times and still find gems hidden that I must have failed to grasp in a prior reading. The author provides the PDF of the first edition on his…
on “What is the enlightenment I'm supposed to attain after studying finite automata?” ↗…"how". :-) The Ghost in the Atom [5] for explaining varied views on the nature of science, especially Quantum Mechanics, and what goes in the minds of the top-notch scientists working on these problems. Parsing Techniques by Dick Grune [6] for teaching me the fundamentals of computer science and helping me proceed with my deep interest in Artificial Intelligence. [1] https://www.amazon.com/Minds-Brains-Machines-Mind-Matters/dp...…
on “Ask HN: What book impacted your life the most and how?” ↗Also, for a very comprehensive survey on parsing techniques, I can recommend "Parsing Techniques" by Grune and Jacobs: https://dickgrune.com/Books/PTAPG_2nd_Edition/
on “Parsing: a timeline” ↗The Dragon Book is just not very good. The newer editions spend far too long on parsing, which is not a big problem, and just make it look scary. Grune's Parsing Techniques is a good book (IIRC when I read it ten years ago), and there are some other ones here. https://gcc.gnu.org/wiki/ListOfCompilerBooks
on “Resources for Amateur Compiler Writers” ↗After reading Parsing Techniques by Grune and Jacobs, I wanted to write a parser in Rust... I got it working in the end, but took me at least 6 months. Nobody uses it, not even me... but damn was I happy when all the tests passed for…
on “Ask HN: What is your “I don't care if this succeeds” project?” ↗…http://amzn.to/2qTuGJw Joy of Clojure, Fogus and Houser http://amzn.to/2qPL4qr Let over Lambda, Hoyte http://amzn.to/2rWljcp Operating Systems: Design and Implementation, Tanenbaum http://amzn.to/2rKudsw Parsing Techniques, Grune and Jacobs http://amzn.to/2rKNXfn Peopleware: Productive Projects and Teams, DeMarco and Lister http://amzn.to/2qTu86F Programming Pearls, Bentley http://amzn.to/2sIRPe9 Software Process Design:…
on “Ask HN: What language-agnostic programming books should I read?” ↗I have a couple of loosely connected points and links: You want to buy 'Parsing Techniques 2nd Ed' -- this book is fantastic and will give you the understanding and clarity you seek. It is wonderfully comprehensive. And schmitz' thesis is an excellent read on tools and techniques to deal with…
on “Parsing: the solved problem that isn't” ↗…tools for the LL(1) equivalent, FIRST/FOLLOW tables. And as the article shows, they aren't equivalent. Each has strengths but LALR has tools. Except for ANTLR. Which started out as recursive descent ... Parsing Techniques doesn't really have any competition. The compiler books, like the compiler classes, can only give a little attention to parsing. Given how strong the available tools are and how hard the remaining subjects…
on “LL and LR Parsing Demystified (2013)” ↗…are: - "Compilers: Principles, Techniques, and Tools" (v popular, generally referred to as the 'dragon book' on account of its cover): http://ce.sharif.edu/courses/94-95/1/ce414-2/resources/root/... - "Parsing Techniques": https://staff.polito.it/silvano.rivoira/LingTrad/ParsingTech... - Not quite about compilers, but the website 'Crafting Interpreters' touches on the pre-compilation parts of a compiler (scanning, lexing,…
on “Ask HN: I'm looking for a good book on the fundamentals of CS” ↗This might be what you’re looking for: https://www.amazon.com/Parsing-Techniques-Practical-Monograp... Not exactly cheap, but pretty good. There’s also https://www.amazon.com/Automata-Formal-Languages-Turing-Mach... which focuses more on the Chomsky hierarchy and automata, and doesn’t…
on “Ask HN: Book recommendations for grammar as it relates to computing?” ↗Yeah, _Automata, Formal Languages, and Turing Machines_ looks like a good topic match (it seems "formal language" is the keyword I was missing?) and Parsing Techniques sounds like an excellent book as well. Thanks for the recommendations!
on “Ask HN: Book recommendations for grammar as it relates to computing?” ↗