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
Original bug ID: 1322 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
I have the following experience with OCAML from cvs, updated in the last hour.
Put this text in foo.ml:
let yuck = 7;;
(*
[<'"asdf">];;
*)
Then give the command
ocamldep -pp camlp4o foo.ml
This gives the error
File "foo.ml", line 3, characters 0-23:
Lexing error: string not terminated
Preprocessing error
If I leave out the "-pp camlp4o", no error happens. If I omit the
single quote from foo.ml, no error happens.
I don't think a compiler should complain about the text in my
comments.
--
Tim Freeman tim@fungible.com
GPG public key fingerprint ECDF 46F8 3B80 BB9E 575D 7180 76DF FE00 34B1 5C78
The text was updated successfully, but these errors were encountered:
Put this text in foo.ml:
let yuck = 7;;
(*
[<'"asdf">];;
*)
Then give the command
ocamldep -pp camlp4o foo.ml
This gives the error
File "foo.ml", line 3, characters 0-23:
Lexing error: string not terminated
Preprocessing error
If I leave out the "-pp camlp4o", no error happens. If I omit the
single quote from foo.ml, no error happens.
I don't think a compiler should complain about the text in my
comments.
Well, the compiler must do some amount of lexical analysis on your
comments, otherwise a ) inside a string literal inside a comment
would incorrectly terminate the comment. Consider: ( "*)" *)
You've found a case where the Camlp4 lexer behaves differently than
the default lexer. This will have to be fixed at some point.
It should be possible to work around the problem by putting a space
between ' and the string literal.
Original bug ID: 1322
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
I have the following experience with OCAML from cvs, updated in the last hour.
Put this text in foo.ml:
let yuck = 7;;
(*
[<'"asdf">];;
*)
Then give the command
ocamldep -pp camlp4o foo.ml
This gives the error
File "foo.ml", line 3, characters 0-23:
Lexing error: string not terminated
Preprocessing error
If I leave out the "-pp camlp4o", no error happens. If I omit the
single quote from foo.ml, no error happens.
I don't think a compiler should complain about the text in my
comments.
--
Tim Freeman
tim@fungible.com
GPG public key fingerprint ECDF 46F8 3B80 BB9E 575D 7180 76DF FE00 34B1 5C78
The text was updated successfully, but these errors were encountered: