Re: Different conflicts between byacc and bison
Domingo Alvarez Duarte <[email protected]> Fri, 5 Nov 2021 12:51:38 +0100
| Newsgroups | gmane.comp.parsers.bison.bugs |
|---|---|
| Message-ID | <[email protected]> |
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: > > 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 ...