On 2005/03/02 17:07, Derek M Jones at [EMAIL PROTECTED] 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




_______________________________________________
Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to