Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remaining shift/reduce conflicts #6

Open
aprell opened this issue Jun 20, 2020 · 0 comments
Open

Remaining shift/reduce conflicts #6

aprell opened this issue Jun 20, 2020 · 0 comments

Comments

@aprell
Copy link
Owner

aprell commented Jun 20, 2020

For reference:

$ menhir --explain parser.mly
Warning: one state has shift/reduce conflicts.
Warning: one shift/reduce conflict was arbitrarily resolved.

The problem:

utop # Parse.parse_prog ["return a"; "b := 1"];;
- : IR.stmt list =
[Three_address_code.IR.Return
  (Some (Three_address_code.IR.Ref (Three_address_code.IR.Var "a")));
 Three_address_code.IR.Move (Three_address_code.IR.Var "b",
  Three_address_code.IR.Const 1)]

utop # Parse.parse_prog ["return"; "b := 1"];;
Exception: Three_address_code.Parser.MenhirBasics.Error
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant