[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why Bison prefer reduce to shift in dangling else?
From: |
Akim Demaille |
Subject: |
Re: Why Bison prefer reduce to shift in dangling else? |
Date: |
Wed, 26 Feb 2003 10:54:18 +0100 |
User-agent: |
Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2 |
Hans> At 19:19 +0100 2003/02/25, Akim Demaille wrote:
>>> I am swamped by the following dangling else problem. Bison prefers reduce
>>> to
>>> shift for the following gramma. Any suggestions to resolve this problem
>>> will
>>> be appreciated.
>>
>> If it does, that's a serious bug. I very much doubt it reduces here,
>> check your files again, it certainly shifts.
Hans> Bison prefers shift over reduce (as in the Bison manual
Hans> sec. 5.2). So this is probably a misunderstanding: So just
Hans> forgetting about it will give the right parsing.
Hans> But it is better to use %nonassoc, as the grammr then becomes
Hans> fully specified.
I think neither is right, one just want %prec, something that would
leave a conflict if associativity information appears to be needed at
bison time, vs. %nonassoc which is run time only.
Re: Why Bison prefer reduce to shift in dangling else?, Akim Demaille, 2003/02/25
RE: Why Bison prefer reduce to shift in dangling else?, Lunjin Lu, 2003/02/25