Re: Updating from bison 1.24 to 2.4.1

Hans Aberg <haberg-news@telia.com>
Sun, 25 Jul 2010 00:24:35 +0200

          From comp.compilers

Related articles
Updating from bison 1.24 to 2.4.1 soeren.zimmermann@sef.de (Tuggi) (2010-07-23)
Re: Updating from bison 1.24 to 2.4.1 haberg-news@telia.com (Hans Aberg) (2010-07-25)
Re: Updating from bison 1.24 to 2.4.1 gneuner2@comcast.net (George Neuner) (2010-07-26)
Re: Updating from bison 1.24 to 2.4.1 gene.ressler@gmail.com (Gene) (2010-07-27)
Re: Updating from bison 1.24 to 2.4.1 gneuner2@comcast.net (George Neuner) (2010-07-28)
Re: Updating from bison 1.24 to 2.4.1 joeldenny@joeldenny.org (Joel E. Denny) (2010-07-29)
| List of all articles for this month |

From: Hans Aberg <haberg-news@telia.com>
Newsgroups: comp.compilers
Date: Sun, 25 Jul 2010 00:24:35 +0200
Organization: A noiseless patient Spider
References: 10-07-029
Keywords: bison, debug
Posted-Date: 26 Jul 2010 13:01:24 EDT

On 2010/07/23 14:08, Tuggi wrote:
> I also want to mention that generating the c-file causes 1 shift/
> reduce and 2 reduce/reduce conflicts. I didn't find the reason yet,
> because I'm engaged in the flex/bison code for a short time. Despite
> of these warnings the c-file generated with the old bision (1.24)
> works.


Bison makes a choice, shift in the case of shift/reduce conflicts, and
the rule occurring first in the grammar for reduce/reduce.


For shift/reduce conflicts, this gives the correct result in the case of
the dangling "else". But one can try resolving it by looking at the
conflicting state in the .output file, and apply token precedences to
the tokens immediately before and after the parsing "." of the
conflicting rules. If there are no such tokens, the grammar must be
rewritten.


Reduce/reduce conflicts usually means a problem with the grammar, which
must rewritten or use GLR and then solve it at runtime.


      Hans


Post a followup to this message

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