in the past, I’ve used menhir’s .conflicts
file to debug my grammars with excellent effect. Yesterday I was working with a grammar, and have 8 “productions are never reduced” conflicts, and the .conflicts
file is empty. I invoke menhir thus:
$ menhir --table --explain parser.mly
and file file parser.conflicts
is empty:
-rw-r--r-- 1 chet chet 0 Jun 29 11:44 parser.conflicts
If it’s relevant, this is a grammar I get by taking the official OCaml grammar and adding a whole bunch of antiquotations. I’ve done this successfully for OCaml grammar versions 4.10-5.1 (every major version) without problems. Also, in case it’s relevant, I do generate types for all the nonterminals (using the “mock” method) and that process produces an empty .conflicts file too.
Any advice appreciated.
ETA: Oh, hm. It looks like menhir only generates .conflicts file contents for shift/reduce conflicts? Not for “never reduced” warnings ?