[Top][All Lists]
[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: |
Frank Heckenbach |
Subject: |
Re: Useless conflict in bison 2.4.2, while 2.3 is happy |
Date: |
Fri, 16 Jul 2010 02:32:26 +0200 |
User-agent: |
semail 20060101 |
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
>
> The grammar is 200KB, and shrinking it seems to make it work
> (sorry), so to reproduce this:
>
> wget http://www.veripool.org/ftp/VParseBison_pretmp.y
> bison --version
> bison (GNU Bison) 2.4.2
> bison -t -d -k -v --report=itemset --report=lookahead \
> -p VParseBison -b VParseBison_pretmp \
> -o VParseBison_pretmp.c VParseBison_pretmp.y
>
> In 2.4.2 the conflict seems to be against the rules
>
> 1060 ev_expr: senitemEdge
> 1061 | ev_expr "iff" expr
> However that doesn't make sense to me because while ev_expr
> has most of the rules present in expr, expr doesn't include
> the rules in ev_expr. Thus once "posedge" is parsed I'd
> expect the "iff" term should only be found under the
> senitemEdge rule, or other rules that shouldn't match
> either.
I don't really understand what you mean in the first sentence.
Anyway, you declare yIFF with a lower priority than yPOSEDGE, so
'"posedge" expr' before "iff" will reduce, so 560 never applies.
Frank
--
Dipl.-Math. Frank Heckenbach <address@hidden>
Systemprogrammierung, EDV-Beratung
Stubenlohstr. 6, 91052 Erlangen, Deutschland
Tel.: +49-9131-21359