News for hackers. Stuff that matters.
Re:Books About Parsing by febeling on Monday June 29, 2009 @04:53PM (#679646)
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.
Re:Books About Parsing by 10ren on Monday June 29, 2009 @05:24PM (#679706)
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?

Re:Books About Parsing by michael_dorfman on Monday June 29, 2009 @05:00PM (#679661)
Possibly faster-- but will you learn as thoroughly? Are you really in so much of a hurry that reading Knuth's papers is a waste of time?
Re:Books About Parsing by utx00 on Monday June 29, 2009 @04:58PM (#679656)
or just use sexps ... and you are done.