bug-bison
[Top][All Lists]
Advanced

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

Re: Useless conflict in bison 2.4.2, while 2.3 is happy


From: Wilson Snyder
Subject: Re: Useless conflict in bison 2.4.2, while 2.3 is happy
Date: Thu, 15 Jul 2010 08:38:34 -0400 (EDT)

>On Wed, 14 Jul 2010, Wilson Snyder wrote:
>
>> I have a grammar which was working (I thought) for bison
>> 2.3. Or, at least it is in production use, and has no bison
>> errors :).
>> 
>> When I compile this grammar with bison 2.4.2, I get the
>> following:
>> 
>>   Rules useless in parser due to conflicts
>>     560 senitemEdge: "posedge" expr "iff" expr
>>     562            | "negedge" expr "iff" expr
>>     564            | "edge" expr "iff" expr
>
>I haven't explored your grammar, but I can tell you that Bison 2.3b 
>introduced the removal of unreachable states, and that can uncover more 
>useless rules.  See the 2.3b entry in NEWS for a description of this 
>feature.  If you dislike it, you can add the following directive to your 
>grammar:
>
>  %define lr.keep-unreachable-states
>
>However, it's probably worth your time to figure out why those rules are 
>useless.

Thanks, yes 

 %define lr.keep_unreachable_states

works around the issue.  However, this source code is open
sourced, and runs against many versions of bison.  Presuming
for a moment I wanted to really use this define, how would I
prevent this define from causing a syntax error on earlier
versions?

More importantly, I still don't see why these rules are
useless.  Can you or someone please take a look at the
grammar?

Also, is there some way to get more verboseness in why a
rule is considered useless - what it overlaps against, for
example, in the way that reduce-reduce conflicts do?
Otherwise it's extremely hard to figure out what's wrong in
a grammar this size.

Thanks again



reply via email to

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