Online Parsing book
“Parsing Techniques: a practical guide” is an excellent book on parsing for non-specialists: it doesn’t drown you in mathematical formalisms, and it doesn’t insult you with code samples, trivial or otherwise. The purpose of this book is simple: to make parsing understandable in laymen’s terms, as much as possible.
I had started reading it a while ago, and when I started to implement a parser for a Mathematica-like CAS and realized that the example in Programming Python couldn’t be simply extended to do what I need, I thought of picking it up again. Then I found out that the authors provided an online copy! I have the hard copy anyhow…
Really good book. Really.
On a related note, it would be nice if someone wrote a Python equivalent of Parse::RecDescent; when I was using Perl, I never had a reason to want to use this module, but now I sure do. Also— and this is something I may be able to do, if I complete the book— someone should write up a glossary of parser terms. I’ve seen a lot of parser generator toolkits describing themselves with the terms LL(k), LR(k), etc., while targeting themselves at non-specialists. But, if I may speak as a member of the target audience, we have no idea what those terms entail, in practice.
Possibly relevant posts:
- Joys of Python (5/16/2005)
- Mathematica-style parser (6/20/2005)
- REQ: Development book recommendations (7/29/2007)