
On Wed, 21 Aug 2002, Guido van Rossum wrote:
I would note that for small languages (much smaller than Python), writing a recursive-descent parser by hand is actually one of the most effective ways of creating a parser. I recently had the pleasure to write a recursive-descent parser for a simple Boolean query language; there was absolutely no need to involve a big gun like a parser generator. OTOH I would not consider writing a recursive-descent parser by hand for Python's Grammar -- that's why I created pgen in the first place. :-)
As per Zach's comments, I think this is pretty funny. I have just spent more time trying to expose pgen to the interpreter than I took to write a R-D parser for Python 1.3 (granted, once Fred's parser module came around, I felt a bit silly). Considering the scope of my parser generator integration wishlist, having GCC move to a hand coded recursive descent parser is going to make my head explode. Even TenDRA (http://www.tendra.org/) used a LL(n) parser generator, despite its highly tweaked lookahead code. So now I'm going to have to extract grammars from call trees? As if the 500 languages problem isn't already intractable, there are going to be popular language implementations that don't even bother with an abstract syntax specificaiton!? (Stop me from further hyperbole if I am incorrect.) No wonder there are no killer software engineering apps. Maybe I should just start writing toy languages for kids... *smirk* -Jon