Grammar that bison/byacc reports 35 reduce/reduce conflicts but happy none
- Dominant language
- Haskell
- Stars
- 322
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
While converting this grammar https://github.com/diku-dk/futhark/blob/master/src/Language/Futhark/Parser/Parser.y to use in https://mingodad.github.io/parsertl-playground/playground/ I found that bison/yacc/kmyacc reports 35 reduce/reduce conflicts but `happy` none.
Attached is the grammar converted using `happy` `-i` command line to get the expanded grammar and adding the missing parts manually (`%tokens`, `%prec`, ...):
```
happy -v
Happy Version 1.19.8 Copyright (c) 1993-1996 Andy Gill, Simon Marlow (c) 1997-2005 Simon Marlow
happy -i Parser.y
bison-nb -v Parser-yacc.y
Parser-yacc.y: warning: 35 reduce/reduce conflicts [-Wconflicts-rr]
Parser-yacc.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples
Parser-yacc.y:209.8-21: warning: rule useless in parser due to conflicts [-Wother]
209 | Exp2 : Atom ".." Exp2 ;
| ^~~~~~~~~~~~~~
```
[grammars.zip](https://github.com/haskell/happy/files/13378221/grammars.zip)
Contributor guide
Assessment
This issue has not been assessed yet.