help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Forcing multiple parse stacks to 'reduce'


From: Hans Aberg
Subject: Re: Forcing multiple parse stacks to 'reduce'
Date: Wed, 02 Mar 2005 19:50:22 +0100
User-agent: Microsoft-Outlook-Express-Macintosh-Edition/5.0.6

On 2005/03/02 17:07, Derek M Jones at address@hidden wrote:

>> I have some vague memory that somebody found (fairly late, in the 90'ies) a
>> grammar transformation to make C becoming LALR(1) (modulo the usual context
>> tweaks for "typedef", etc.) Then you would not need using the %glr option.
>> You might check the newsgroup comp.compilers and its FAQ, published there
>> monthly.
> 
> I have a lalr(1) grammar for C (who doesn't?).  The first edition
> of Harbison&Steele list the output from such a tool for C.

There is nothing such in my Harbison&Steele (4th ed.). The comment I recall
was that I think it was Paul Hilfinger who asked Bjarne Stroustrup (in
cmop.compilers) why certain C++ ambiguities where in that language, and the
latter replied it had to do with the fact that they had not a C LALR(1)
grammar at the time the designed those C++ features. But my memory could be
wrong.

  Hans Aberg






reply via email to

[Prev in Thread] Current Thread [Next in Thread]