Open andreasabel opened 3 years ago
There seems to be a use case for variants without coercions, see: https://github.com/BNFC/bnfc/blob/3a5980285494270531df9defa65524f23482217f/examples/define/test.cf#L32-L40 https://github.com/BNFC/bnfc/blob/3a5980285494270531df9defa65524f23482217f/examples/define/test.cf#L46-L46
The pragma e.g.
coercions Exp 3
should issue a warning if the grammar contains variants ofExp
outside of the range 1-3. This is more likely a mistake than intention. Often, there is confusion if the variant with the least precedence isExp
orExp0
. Also, a user might have added more higher precedences without updating thecoercions
pragma.