Related articles |
---|
Recursive Descent Parser e8rasmus@etek.chalmers.se (Rasmus Anthin) (2000-01-09) |
Re: Recursive Descent Parser world!cfc@uunet.uu.net (Chris F Clark) (2000-01-12) |
Re: Recursive Descent Parser biocyn@erols.com (2000-01-25) |
Re: Recursive Descent Parser chstapfer@bluewin.ch (Christian Stapfer) (2000-02-10) |
Re: Recursive Descent Parser rhyde@shoe-size.com (Randall Hyde) (2000-02-12) |
Re: Recursive Descent Parser mklarson@gte.net (Michael Larson) (2000-02-22) |
Re: Recursive Descent Parser paulyg@clara.net (2000-02-22) |
Re: Recursive Descent Parser world!cfc@uunet.uu.net (Chris F Clark) (2000-02-22) |
Re: Recursive Descent Parser fjscipio@rochester.rr.com (Fred J. Scipione) (2000-02-23) |
Re: Recursive Descent Parser adrian@dcs.rhbnc.ac.uk (2000-02-27) |
[1 later articles] |
From: | "Christian Stapfer" <chstapfer@bluewin.ch> |
Newsgroups: | comp.compilers |
Date: | 10 Feb 2000 01:14:22 -0500 |
Organization: | Swisscom AG, the blue window |
References: | 00-01-027 00-01-032 |
Keywords: | parse, LL(1) |
Chris F Clark <world!cfc@uunet.uu.net> 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
comp.compilers page.
Search the
comp.compilers archives again.