You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Testcase:
cat >test.ml <<EOF
let globalvalue = 4;;
EOF
camlp4r test.ml
File "test.ml", line 1, characters 18-19:
Parse error: "in" expected after [binding] (in [expr])
camlp4 -parser r -parser rp -printer a test.ml
let globalvalue = 4
cat >test2.ml <<EOF
value globalvalue = 4;
camlp4r test2.ml
let globalvalue = 4
camlp4 -parser r -parser rp -printer a test2.ml
(value globalvalue) = 4
Additional information
Looks like '-parser rp' loads the original syntax too:
$ camlp4 -parser r -parser rp -loaded-modules
Camlp4OCamlParser
Camlp4OCamlRevisedParser
Camlp4OCamlRevisedParserParser
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).
The text was updated successfully, but these errors were encountered:
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 https://github.com/ocaml/camlp4/issues
Related to: #5129 #5134
Monitored by: @ygrek
Bug description
The Camlp4 wiki (http://brion.inria.fr/gallium/index.php/Using_Camlp4) 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.
Testcase:
let globalvalue = 4;;
EOF
File "test.ml", line 1, characters 18-19:
Parse error: "in" expected after [binding] (in [expr])
let globalvalue = 4
value globalvalue = 4;
let globalvalue = 4
(value globalvalue) = 4
Additional information
Looks like '-parser rp' loads the original syntax too:
$ camlp4 -parser r -parser rp -loaded-modules
Camlp4OCamlParser
Camlp4OCamlRevisedParser
Camlp4OCamlRevisedParserParser
$ camlp4 -parser rp -loaded-modules
Camlp4OCamlParser
Camlp4OCamlRevisedParser
Camlp4OCamlRevisedParserParser
camlp4r doesn't load it:
$ camlp4r -loaded-modules
Camlp4.Printers.OCaml
Camlp4OCamlRevisedParser
Camlp4OCamlRevisedParserParser
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).
The text was updated successfully, but these errors were encountered: