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

Comments

Projects
None yet
2 participants
@vicuna
Copy link

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Author

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.

@vicuna vicuna closed this Dec 11, 2015

@vicuna vicuna added the camlp4 label Mar 14, 2019

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.