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 dies on infix definition (or) #5495

Closed
vicuna opened this issue Jan 27, 2012 · 2 comments
Closed

camlp4o dies on infix definition (or) #5495

vicuna opened this issue Jan 27, 2012 · 2 comments
Assignees

Comments

@vicuna
Copy link

@vicuna vicuna commented Jan 27, 2012

Original bug ID: 5495
Reporter: Hendrik Tews
Assigned to: @diml
Status: closed (set by @xavierleroy on 2015-12-11T18:04:37Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 3.12.1
Fixed in version: 3.12.1+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Has duplicate: #5617
Monitored by: @diml @hcarty

Bug description

Camlp4 apparently has problems parsing infix definition that are keywords.
It dies on

let ( or ) l1 l2 = []

or

external (or) : bool -> bool -> bool = "%sequor"

with parse errors.

Note that the external line appears in pervasives.ml[i], which
means that camlp4o cannot parse pervasives.ml[i].

@vicuna
Copy link
Author

@vicuna vicuna commented Jan 27, 2012

Comment author: @gasche

I thought that the specification allowed uses of infix-keywords, but not their redefinition, and that the current behavior was a non-specified implementation choice. I was wrong: the grammar in the manual allows those special cases as part of the "infix-op" syntactic class, which can be used in a let-definition.

http://caml.inria.fr/pub/docs/manual-ocaml/manual011.html

@vicuna
Copy link
Author

@vicuna vicuna commented Feb 17, 2012

Comment author: @diml

"or" was missing to the list of infix keywords (transformed to lidents by a token filter). I added it.

Commits 12161 and 12162.

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

Successfully merging a pull request may close this issue.

None yet
2 participants