help-bison
[Top][All Lists]
Advanced

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

Re: Problem with shift/reduce conflict


From: Hans Aberg
Subject: Re: Problem with shift/reduce conflict
Date: Thu, 06 Jan 2005 19:27:34 +0100
User-agent: Microsoft-Outlook-Express-Macintosh-Edition/5.0.6

At 09:31 +0100 2005/01/06, address@hidden wrote:
>This is a multipart message in MIME format.
>--_---_next_part_--_1105000301==_
>Content-Type: text/plain; charset=iso-8859-1
>

 Please try to make the emails plain ASCII, for example by attaching
non-ASCII files as attachments, rather than including them in the text body.

>I am currently working on a grammar for simple Integer C (only allows data
>type integer and therefore selected operations) but my grammar produces
>S/R conflictsI 
>
>All conflicts appear when the non-terminal "Type_Specifier" is involved,
>so there must be something wrong there. I worked through it but can`t find
>any errors. 
>
>Please find attached the .output file that is created when running bison,

One way to try to avoid shift/reduce conflicts is by using operator
precedence (%right, etc.). Look into your .output file at the conflicting
rules, and check what tokens appear immediately after the "." and before
with possibly a grammar variable in between. Then set token precedences on
those tokens. The Bison manual has a calculator example using this.

  Hans Aberg






reply via email to

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