When encountering a shift/reduce conflict, Happy automatically chooses shift. This is the behavior I want. Is it possible to add an annotation on the rules that cause the conflict telling Happy "I know there is a conflict and that you will choose shift, that is fine, it is what I want". I don't want to disable shift/reduce warnings globally because that could hide actually mistakes in the future.
Are you me? I'm literally fixing shift conflicts in Happy right now :joy:
Anyway, there's %shift annotation you can put after offending rule - I would recommend you to read tutorial in GHC's parser, because it covers steps to locate offending rules
When encountering a shift/reduce conflict, Happy automatically chooses shift. This is the behavior I want. Is it possible to add an annotation on the rules that cause the conflict telling Happy "I know there is a conflict and that you will choose shift, that is fine, it is what I want". I don't want to disable shift/reduce warnings globally because that could hide actually mistakes in the future.
Here is the grammar in question:
(Also, if anyone knows a grammar with the same result but without the conflict, that would be nice.)
Are you me? I'm literally fixing shift conflicts in Happy right now :joy:
Anyway, there's
%shift
annotation you can put after offending rule - I would recommend you to read tutorial in GHC's parser, because it covers steps to locate offending rules