[Python-Dev] Parsing vs. lexing.
Wed, 21 Aug 2002 12:50:29 -0700
On Wed, Aug 21, 2002 at 03:28:51PM -0400, 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. :-)
You might be interested to know that over in GCC land we're changing
the C++ front end to use a hand-written recursive descent parser.
It's not done yet, but we expect it to be easier to maintain, faster,
and better at generating diagnostics than the existing yacc-based