Related articles |
---|
shift/reduce problem csnews77@gmail.com (JohnSmith) (2010-12-02) |
Re: shift/reduce problem haberg-news@telia.com (Hans Aberg) (2010-12-03) |
Re: shift/reduce problem csnews77@gmail.com (JohnSmith) (2010-12-03) |
Re: shift/reduce problem haberg-news@telia.com (Hans Aberg) (2010-12-03) |
Re: shift/reduce problem gene.ressler@gmail.com (Gene) (2010-12-03) |
Re: shift/reduce problem chakaram@auth.gr (Chariton Karamitas) (2010-12-05) |
Re: shift/reduce problem seimarao@gmail.com (Seima) (2010-12-30) |
Re: shift/reduce problem kaz@kylheku.com (Kaz Kylheku) (2011-10-20) |
From: | Hans Aberg <haberg-news@telia.com> |
Newsgroups: | comp.compilers |
Date: | Fri, 03 Dec 2010 00:44:57 +0100 |
Organization: | A noiseless patient Spider |
References: | 10-12-004 |
Keywords: | parse, bison |
Posted-Date: | 03 Dec 2010 08:01:13 EST |
On 2010/12/02 21:29, JohnSmith wrote:
> I'm using bison and flex. Bison reports shift/reduce conflict:
> probably because cannot decide on "," when "input" coming (is this an
> error or should reduce). How to resolve this problem? Probably I have
> to use %left, %right, %prec but I dont know how.
Use the flags
bison --verbose --report=all
to get the .output file. Look for the state, and in it, the conflicting
rules, and in those, the two tokens immediately before and after the
parsing position ".". The token precedences %left, ..., set preferences
between those pairs.
Hans
Return to the
comp.compilers page.
Search the
comp.compilers archives again.