Re: C++ parsing : what's new ?

"Peter H. Froehlich" <pfroehli@ics.uci.edu>
29 Dec 2001 16:13:42 -0500

          From comp.compilers

Related articles
C++ parsing : what's new ? gahide@ensm-douai.fr (Patrice Gahide) (2001-12-20)
Re: C++ parsing : what's new ? idbaxter@semdesigns.com (Ira D. Baxter) (2001-12-22)
Re: C++ parsing : what's new ? loewis@informatik.hu-berlin.de (Martin von Loewis) (2001-12-22)
Re: C++ parsing : what's new ? tnixon@avalanchesoftware.com (Travis Nixon) (2001-12-29)
Re: C++ parsing : what's new ? pfroehli@ics.uci.edu (Peter H. Froehlich) (2001-12-29)
Re: C++ parsing : what's new ? gwyn@thislove.dyndns.org (2002-01-03)
Re: C++ parsing : what's new ? dr_feriozi@prodigy.net (SLK Parsing) (2002-01-03)
Re: C++ parsing : what's new ? zackw@panix.com (Zack Weinberg) (2002-01-04)
Re: C++ parsing : what's new ? mrak@hons.cs.usyd.edu.au (2002-01-04)
Re: C++ parsing : what's new ? RLWatkins@CompuServe.Com (R. L. Watkins) (2002-01-05)
Re: C++ parsing : what's new ? thp@cs.ucr.edu (2002-01-28)
| List of all articles for this month |

From: "Peter H. Froehlich" <pfroehli@ics.uci.edu>
Newsgroups: comp.compilers
Date: 29 Dec 2001 16:13:42 -0500
Organization: Compilers Central
Keywords: C++, parse, comment
Posted-Date: 29 Dec 2001 16:13:42 EST

Hi!


On Saturday, December 29, 2001, at 10:30 , Travis Nixon wrote:


> "Martin von Loewis" <loewis@informatik.hu-berlin.de> wrote in message
>> The gcc grammar is currently being rewritten, from a bison-based one
>> to a hand-written recursive-descent parser.
>
> Is there a discussion online anywhere about the reasons for doing
> this?


As I recall the motivation is performance. The people doing the
rewrite expect the recursive descent parser to be way faster than
the table-driven one they have now. However, I sure would *not*
want to write a parser like that for a grammar as hairy as
C/C++. :-)


Peter
--
Peter H. Froehlich <<><>> http://www.ics.uci.edu/~pfroehli/
OpenPGP: D465 CBDD D9D2 0D77 C5AF 353E C86C 2AD9 A6E2 309E
[The syntax of C++ is ambiguous, so you have to do some rather gross hacks
to parse it at all with yacc or bison. An RD parser can handle the
ambiguity on the fly. -John]


Post a followup to this message

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