[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Manual shift/reduce?
From: |
Hans Aberg |
Subject: |
Re: Manual shift/reduce? |
Date: |
Fri, 28 Oct 2005 12:54:17 +0200 |
On 28 Oct 2005, at 10:37, Evan Lavelle wrote:
Hi - is there any way to programatically force reduction of a rule,
bypassing the normal mechanism? This might be a useful way to
resolve some conflicts.
Please don't put essential info in the subject that is not appearing
in the body description, because the reasoning becomes hard to follow
(and cc all replies to Help-Bison). Specifically, shift/reduce
conflicts can sometimes be resolved using operator precedence, %left
etc.: see Bison manual. Look at the .output file to see which tokens
that appear immediately before the "." in the conflicting rules. In
general though there is no such method. I think Bison chooses shifts
over reduces, and the reduce that comes first in the grammar .y file.
Hans Aberg