Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

camlp4o tuple versus if-then-else conditional precedence does not match the Yacc parser #4532

Closed
vicuna opened this issue Apr 11, 2008 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Apr 11, 2008

Original bug ID: 4532
Reporter: berke
Assigned to: ertai
Status: closed (set by @xavierleroy on 2010-04-29T12:31:31Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 3.10.1
Fixed in version: 3.11+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues

Bug description

The following two files, while equivalent under Ocaml's Yacc parser, are not
under camlp4o. This can cause type errors or undetected bugs.

File p1.ml:

let x =
[ "a", if true then 1 else 2;
"b", 3 ]

let x =
[ "a", (if true then 1 else 2);
"b", 3 ]

@vicuna
Copy link
Author

vicuna commented Oct 4, 2008

Comment author: ertai

Thanks for the report, this in now fixed in the CVS.

PS: However one should perhaps avoid to rely on this kind of precedence...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant