Is it possible to suppress unused precedence warnings in menhir?
Background:
I have a core parser Lib.mly
with several rules and, separately, a host of additional parsers (A.mly
, B.mly
, ...) which use definitions from Lib.mly
. To support using a single lexer for all the languages, all tokens are defined in Lib.mly
and we use external_tokens(Lib)
annotations in _tags
and have extended myocamlbuild.ml
to suppress unused tokens warnings with --unused-tokens
which helps significantly. However, I still get many warnings of the form:
File "parsers/ParserLib.mly", line 126, characters 0-9:
Warning: the precedence level assigned to FIX is never useful.
These make it hard to see other warnings I actually want to address. Different subsets of the operators are used in various languages, so I need to have a single "global" precedence that orders them appropriately. Thanks for any tips!