

Books About Parsing - mbrubeck
http://blog.reverberate.org/2009/06/26/books-about-parsing/

======
10ren
The "A Regular Expression Matcher" in _Beautiful Code_ is a command-line
wildcard matcher (from memory), and lacks parentheses and alternation. Useful,
and probably an ideal example for the book, but much less powerful even than a
mathematical regular expression.

See for yourself:
[http://books.google.com/books?id=gJrmszNHQV4C&lpg=PA1...](http://books.google.com/books?id=gJrmszNHQV4C&lpg=PA1&ots=rKS-
utWaqe&dq=patent%20kernighan&pg=PA1)

~~~
wooby
Still very cool though, thanks for the link.

------
febeling
I think you will learn much faster about parsing if you just read source code.
Once you have looked at more then two implementation of the same thing you
start to see similarities and differences and pick up the ideas in use.

~~~
10ren
Sounds like a theory rather than something you're tried. :-)

You might be right, but regular expressions (for example) are one of those
relatively rare tools in computer science that are both very practical and
very theoretical - difficult to grasp without understanding the concepts.
Personally, I did have a (brief) look some source code (for parsing particles
for the XML Schema in Xerces; and the perl-style regex library in Java), but
they really didn't make much sense until I went back to the Dragon book. Maybe
if I'd spent more time on the source code, and looked at many more examples,
and also mixed in some less sophisticated examples, it would have also become
clearer... but I really don't think so. You need the ideas that the code is
trying to implement, in addition to seeing the surface code. Regular
expressions, and implementations of Thompson's powerset algorithm are really
hard to understand even with the concepts.

But like I said, you could be right. Why not try out your approach, to test it
as a hypothesis, and let us know how you went, with a "Tell HN: learning
parsing by reading source code" submission?

