[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#659002: ocaml-nox: ocaml-compiler with mysterious effects if somewhere a comment with open quotation, example (* 3" *)

Andreas Romeyke <andreas.romeyke@dzb.de> writes:

   I compiled it with ocamlopt

I don't believe that. Compiling your example with ocamlopt gives

   >     File "brackets.ml", line 3, characters 0-2:
   >     Error: Comment not terminated

while you reported a different error message.

   > Could it be that you had code such as
   >     let f = function 
   >      | A -> 0 (* " *)
   >      | B -> 1 (* " *)
   >      | C -> 2
   > where the B-case is in fact inside a string inside the _single_
   > comment in f? (Which you easily see because the compiler says
   > "pattern matching not exhaustive".)

   No, it will be not. (Checked with vim's bracket-matching)

I am not a vim expert, but when I try vim's bracket-matching is

   Could you fix/ask about the reported bug with quotation mark char?

Strings, characters and quotations (if you parse with camlp4)
must be properly terminated inside comments. We don't need to ask

If we could reproduce your error message, we could maybe file a
feature request for a more informative error message. The error
message of ocamlopt is good enough, I believe.



Reply to: