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

Camlp4 accepts incorrect syntax #4513

Closed
vicuna opened this issue Feb 28, 2008 · 2 comments
Closed

Camlp4 accepts incorrect syntax #4513

vicuna opened this issue Feb 28, 2008 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Feb 28, 2008

Original bug ID: 4513
Reporter: @mmottl
Assigned to: ertai
Status: closed (set by ertai on 2008-10-03T15:13:50Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.10.1
Fixed in version: 3.11+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Has duplicate: #4551
Monitored by: BenediktGrundmann @mmottl

Bug description

The following demonstrates a weird preprocessing issue with invalid OCaml-code:

camlp4o -str "let () = if true then then () else ()"

The above will print the valid OCaml code one might expect. It's nice that the preprocessor attempts to transform the code into one that the user may have intended, though this raises the questions whether it always has the same notion of correctness as the user... ;-)

@vicuna
Copy link
Author

vicuna commented Apr 23, 2008

Comment author: @mmottl

Here is another instance of this problem with the keyword "in":

camlp4o -str "let x = 3 in in x"

@vicuna
Copy link
Author

vicuna commented Oct 3, 2008

Comment author: ertai

Thank for the report(s) this bug is now fixed in the CVS HEAD version.

NOTE: #4603, #4330, #4551, #4513 are all the same bug.

@vicuna vicuna closed this as completed Oct 3, 2008
@vicuna vicuna added the camlp4 label Mar 14, 2019
@vicuna vicuna added the bug label Mar 19, 2019
bobzhang added a commit to rescript-lang/ocaml that referenced this issue Sep 19, 2020
bobzhang added a commit to rescript-lang/ocaml that referenced this issue Sep 28, 2020
anmonteiro pushed a commit to melange-re/ocaml that referenced this issue Mar 9, 2021
bobzhang added a commit to rescript-lang/ocaml that referenced this issue Mar 15, 2021
bobzhang added a commit to rescript-lang/ocaml that referenced this issue Mar 25, 2021
bobzhang added a commit to rescript-lang/ocaml that referenced this issue Mar 30, 2021
bobzhang added a commit to rescript-lang/ocaml that referenced this issue Apr 2, 2021
bobzhang added a commit to rescript-lang/ocaml that referenced this issue Apr 2, 2021
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