Created
February 20, 2018 20:14
-
-
Save Leonidas-from-XIV/052bdb3277d90ccea8802a68764ed2f6 to your computer and use it in GitHub Desktop.
Shift-reduce conflict with arbitrary resolution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Warning: one state has shift/reduce conflicts. | |
Warning: one shift/reduce conflict was arbitrarily resolved. | |
File "src/variable/parser.mly", line 16, characters 3-3: | |
Warning: production value_sequence -> is never reduced. | |
Warning: in total, 1 productions are never reduced. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%start <Types.value list> prog | |
%% | |
prog: | |
| EOF | |
{ [] } | |
| v = value_sequence; EOF | |
{ v } | |
; | |
value_sequence: | |
| (* empty *) { [] } | |
| seq = rev_value_sequence | |
{ List.rev seq } | |
; | |
rev_value_sequence: | |
| v = value | |
{ [v] } | |
| seq = rev_value_sequence; v = value | |
{ v :: seq } | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment