help-bison
[Top][All Lists]
Advanced

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

Re: problem compiling bison with gcc 3.0.5


From: Hans Aberg
Subject: Re: problem compiling bison with gcc 3.0.5
Date: Sat, 2 Mar 2002 12:35:50 +0100

At 10:39 +0100 2002/03/02, Martin Trautmann wrote:
[Replies, please cc help-bison.]
>BTW: if anyone likes to answer me some basic questions
>+ Why can't I %expect reduce/reduce conflicts?

If you only figure out an automated way to select which rule to reduce.
What do you prefer? (One can take say the longer rule, but what you do if
the rules are of the same length?)

>+ Why can't such a conflict be avoided with %prec precedences?

It has to do with the precedence algorithm used; see for example
  http://www.cs.vu.nl/~dick/PTAPG.html
and the "Modern Compiler Design" book by the same authors.

>+ Are there any real C++ versions of bison?

Yes, I made one. :-) There is something called bison++ too I think.

>    This would be nice:
>    * the whole parser in a class

I didn't do that part, but I figure the C++ support that Bison will have in
about in a month (unless the developers doing that part went on vacation
:-) ) will have that.

>    * passing some objects to the yyparse() function

Check YYPARSE_PARAM, Bison manual sec 4.2.4.

  Hans Aberg





reply via email to

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