Reject conflicts in parsing/parser.mly#598
Conversation
#599 fixes the conflicts in the grammar. The combination of that PR and this one restores the build to a working state and adds a check to avoid conflicts in the future. |
|
I think this is a great idea (and I would have been quite happy to have that when I made my parser patches). I would suggest we adopt menhir's flag for this, which is |
|
As the person who had introduced these reduce/reduce conflicts in the first place, I wholehearteadly agree. |
|
@yallop Please change the name of the option to |
|
This PR was discussed last week at the developers meeting, and everyone agreed it's a good idea and the option's name should be |
|
@damiendoligez: yes, I'll push the change shortly. |
|
Thanks, @gasche. I just realised that I didn't add a Changelog entry, which might be helpful since this is a change in the |
|
I pushed a Changes entry. Thanks! |
Reject conflicts in parsing/parser.mly
Co-authored-by: David Allsopp <david.allsopp@metastack.com>
In current ocaml
trunkthe grammar inparsing/parser.mlyhas a number of reduce/reduce conflicts:Unfortunately, it's currently quite easy to inadvertently introduce conflicts, since they're not treated as errors.
This pull request
-etoocamlyaccthat treats a conflict in a grammar as a fatal error, and-ewhen compilingparsing/parser.mly.Consequently, this PR intentionally breaks the build, which should now fail at the point where the parser is compiled.