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 parsing issue for "let _" patterns #4312

Closed
vicuna opened this issue Jun 12, 2007 · 1 comment
Closed

camlp4o parsing issue for "let _" patterns #4312

vicuna opened this issue Jun 12, 2007 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Jun 12, 2007

Original bug ID: 4312
Reporter: alexbaretta
Assigned to: ertai
Status: closed (set by @xavierleroy on 2010-04-29T12:26:08Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.10.0
Fixed in version: 3.10+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues

Bug description

The following terminal session shows how camlp4o 3.10.0 fails to parse input that was accepted by 3.09.3.

let _ : int = 1

Notice how the campl4 parser remains in an inconsistent state and fails to parse the line following the one that causes the error.

It is interesting to notice that the yacc parser never accepted such input, which also seems strange.
andrea@alex:~$ /opt/ocaml/3.09.3/bin/ocaml
Objective Caml version 3.09.3

let _ : int = 1;;

Syntax error

#load "camlp4o.cma";;

    Camlp4 Parsing version 3.09.3

let _ : int = 1;;

  • : int = 1

Additional information

alex@alex:~/dev/ocaml_asxcaml$ ocaml
Objective Caml version 3.10.0

    Camlp4 Parsing version 3.10.0

let _ : int = 1;;

Parse error: "module" or [opt_rec] expected after "let" (in [str_item])

1;;

Unbound value int

alex@alex:~/dev/ocaml_asxcaml$ /opt/ocaml/3.09.3/bin/ocaml
Objective Caml version 3.09.3

    Camlp4 Parsing version 3.09.3

let _ : int = 1;;

  • : int = 1
@vicuna
Copy link
Author

vicuna commented Nov 27, 2007

Comment author: ertai

In the mean time the simplest solution was to make it works again.
One should consider if we'd better reject it later.

This is now fixed in the CVS (trunk and release310 branch).

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