bug-bison
[Top][All Lists]
Advanced

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

Re: Different conflicts between byacc and bison


From: Kaz Kylheku
Subject: Re: Different conflicts between byacc and bison
Date: Thu, 04 Nov 2021 18:35:39 -0700
User-agent: Roundcube Webmail/0.9.2

On 2021-11-04 01:57, Domingo Alvarez Duarte wrote:
Also tested with the latest byacc from https://invisible-island.net/byacc/:

====

./yacc -V
./yacc - 2.0 20210808

byacc-20210808/yacc gram.y
byacc-20210808/yacc: 21 shift/reduce conflicts, 3 reduce/reduce conflicts.

Now, I've not looked at that grammar at all, or where those conflicts are coming from, and which ones are different between Bison and Bycc. Zero analysis here.

Therefore, I don't intend to offer the the following remarks as being relevant
to what you are seeing. But, you never know.

I also use both Bison and Byacc, and have come across some differences.

In my particular case, it was a situation where I had to do some extra things
in the grammar to make Byacc happy that Bison didn't need:

https://www.kylheku.com/cgit/txr/commit/?id=899655aa3b256dab10e764889c8323a53a585a04

My comment in this 2015 commit records what I think I was able to learn
from the investigation:

| Bison doesn't need this because it has $default actions which reduce
| regardless of the lookahead token. BYacc insists on reducing only
| if it can match $end (end of input), and not other tokens, which
| constitute syntax errors.

Perhaps useful, perhaps not.

Cheers ...



reply via email to

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