[Top][All Lists]

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

Re: Different conflicts between byacc and bison

From: Domingo Alvarez Duarte
Subject: Re: Different conflicts between byacc and bison
Date: Fri, 5 Nov 2021 12:51:38 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

Hello Kaz !

Thanks for reply !

I just tested with bison 1.25 (1996) and the it gives the same conflicts as the latest bison 3.8.2 so the problem surfaced by CFRONT grammar is there since the beginning.

I'll look if the solution that you point out can somehow give any clue to try something similar, but ideally we should find the reason why that happens.

Cheers !

On 5/11/21 2:35, Kaz Kylheku wrote:
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:


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]