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 -parser r -parser rp" accept original syntax, not equivalent to camlp4r #5071

vicuna opened this issue Jun 14, 2010 · 0 comments


None yet
1 participant
Copy link

commented Jun 14, 2010

Original bug ID: 5071
Reporter: @edwintorok
Assigned to: @xclerc
Status: closed (set by @xavierleroy on 2012-09-25T18:06:17Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.11.2
Fixed in version: 3.12.1+dev
Category: -for Camlp4 use
Related to: #5129 #5134
Monitored by: @ygrek

Bug description

The Camlp4 wiki ( says that
camlp4r is equivalent to "camlp4 -parser r -parser rp -printer a".

However "camlp4 -parser r -parser rp -printer a" seems to accept original syntax, not the revised one!
It doesn't give error on original syntax only, while camlp4r gives error on original syntax.


  1. cat > <<EOF
    let globalvalue = 4;;
  2. camlp4r
    File "", line 1, characters 18-19:
    Parse error: "in" expected after [binding] (in [expr])
  3. camlp4 -parser r -parser rp -printer a
    let globalvalue = 4
  4. cat > <<EOF
    value globalvalue = 4;
  5. camlp4r
    let globalvalue = 4
  6. camlp4 -parser r -parser rp -printer a
    (value globalvalue) = 4

Additional information

Looks like '-parser rp' loads the original syntax too:
$ camlp4 -parser r -parser rp -loaded-modules

$ camlp4 -parser rp -loaded-modules
camlp4r doesn't load it:
$ camlp4r -loaded-modules

I think '-parser rp' is meant to load RevisedParserParser, but for some reason it loads the original syntax too (Camlp4OCamlParser), which makes the input language original syntax (not revised).

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.