|Recursive Descent Parser firstname.lastname@example.org (Rasmus Anthin) (2000-01-09)|
|Re: Recursive Descent Parser email@example.com (Chris F Clark) (2000-01-12)|
|Re: Recursive Descent Parser firstname.lastname@example.org (2000-01-25)|
|Re: Recursive Descent Parser email@example.com (Christian Stapfer) (2000-02-10)|
|Re: Recursive Descent Parser firstname.lastname@example.org (Randall Hyde) (2000-02-12)|
|Re: Recursive Descent Parser email@example.com (Michael Larson) (2000-02-22)|
|Re: Recursive Descent Parser firstname.lastname@example.org (2000-02-22)|
|Re: Recursive Descent Parser email@example.com (Chris F Clark) (2000-02-22)|
|Re: Recursive Descent Parser firstname.lastname@example.org (Fred J. Scipione) (2000-02-23)|
|Re: Recursive Descent Parser email@example.com (2000-02-27)|
|[1 later articles]|
|From:||"Christian Stapfer" <firstname.lastname@example.org>|
|Date:||10 Feb 2000 01:14:22 -0500|
|Organization:||Swisscom AG, the blue window|
Chris F Clark <email@example.com> wrote
> The essential problem here is that the
> poster is trying to write their first parser by hand. This is a
> TERRIBLE idea. No one should learn how to parse by writing
> hand-written parsers.
Well, this reminds me of a story that Stroustrup tells in his book
"The Design and Evolution of C++". In 1982 when he first planned to
develop Cfront, he initially wanted to write a recursive descent
parser, because he had had experience writing and maintaining "such a
beast". But, still, he asked the "experts", Aho and Johnson, who told
him that writing a parser by hand would be most old-fashioned, would
be an inefficient use of his time, would almost certainly result in a
hard-to-understand and hard-to-maintain parser, and would be prone to
unsystematic and therefore unreliable error recovery. The right way,
they told him, was to use YACC.
Stroustrup, on looking back, assesses this approach as follows:
"For most projects, it would have been the right choice. For almost
every project writing an experimental language from scratch, it would
have been the right choice. For most people it would have been the
right choice. In retrospect, for me and C++ it was a bad mistake."
Makes me think...
Return to the
Search the comp.compilers archives again.