bug-bison
[Top][All Lists]
Advanced

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

Useless conflict in bison 2.4.2, while 2.3 is happy


From: Wilson Snyder
Subject: Useless conflict in bison 2.4.2, while 2.3 is happy
Date: Wed, 14 Jul 2010 22:30:43 -0400 (EDT)

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.

Comparing the .output files between versions, it looks like
2.3 has states 3404-3406, and 4015-4017, which are not
present in 2.4.2.  These states indeed are implement part of
expr, which indeed include the "iff" term.

Of course, it's possible that there was an error in the
original grammar that the new version now uncovers, but it
escapes me what it would be.

Thanks



reply via email to

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