RE: C++ intermediate representation.

Quinn Tyler Jackson <quinn-j@shaw.ca>
14 May 2005 12:10:42 -0400

          From comp.compilers

Related articles
Re: C++ intermediate representation. henry@spsystems.net (2005-05-14)
RE: C++ intermediate representation. quinn-j@shaw.ca (Quinn Tyler Jackson) (2005-05-14)
RE: C++ intermediate representation. quinn-j@shaw.ca (Quinn Tyler Jackson) (2005-05-14)
Re: C++ intermediate representation. ralphpboland@yahoo.com (Ralph Boland) (2005-05-14)
RE: C++ intermediate representation. quinn-j@shaw.ca (Quinn Tyler Jackson) (2005-05-14)
RE: C++ intermediate representation. quinn-j@shaw.ca (Quinn Tyler Jackson) (2005-05-15)
Re: C++ intermediate representation. comeau@panix.com (2005-05-15)
RE: C++ intermediate representation. quinn-j@shaw.ca (Quinn Tyler Jackson) (2005-05-15)
[1 later articles]
| List of all articles for this month |

From: Quinn Tyler Jackson <quinn-j@shaw.ca>
Newsgroups: comp.compilers
Date: 14 May 2005 12:10:42 -0400
Organization: Compilers Central
References: 05-05-078
Keywords: C++, parse
Posted-Date: 14 May 2005 12:10:42 EDT



> Aaron Gray <angray@beeb.net> wrote:
> >Parsing C++ properly is no mean feat. C++'s grammar is ambiguous...
> >The new GCC's 3.4.x and 4.0 both use recursive descent with
> >backtracking parser technology rather than LALR(1) or Generalized LR.


To which Henry Spencer replied:


> In his "The Design and Evolution of C++", Stroustrup says that he let
> Aho and Johnson talk him out of writing his own recursive-descent
> parser for C++... and he now thinks that was a big mistake.


In 2003 (9 years after the D&E statement), I asked if he still believed
that, and he most certainly stood behind his statement.


(Stroustrup states recently that "today, most production C++ compilers have
hard-coded recursive descent parsers. Note that part of the reason for that
is compactness, speed, and quality of error messages." [Stroustrup 2003])


(The formal citation because I include that comment in a paper that has a
section on C++ parsing.)


As someone who has attempted to write a complete formal grammar
specification for C++ without jimmying and ad hockery -- I attest to the
fact that it's one nasty language to parse -- but a great test of a grammar
formalism!


--
Chev. Quinn Tyler Jackson
Computer Scientist, Novelist, Poet


http://members.shaw.ca/qjackson/


[Stroustrup 2003] Bjarne Stroustrup, personal email correspondence, 29 Sept.
2003.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.