Isn't this rather complicated? 

In this case, has there been any progress on "single line" comments eg 

// some comment

? I think this was mentioned recently on the list. (I am also aware that // is verboten for some reason).

It seems to me that multiline comments are a poor design choice. Single line comments permit commenting arbitrary blocks (just prepend each line with "//"), and play well with nested comments (no problem if a line starts "// //" etc). Also, they are very simple to implement in the lexer.

Please can we have support for simple (ie from the token "//" to the end-of-line, no messing with string literals etc) single line comments?

Thanks



On 14 September 2016 at 13:38, David Allsopp <dra-news@metastack.com> wrote:
Tom Ridge wrote:
> My opam install of ocaml 4.03.1 seems to compile the following:
>
> (* " *)
> is this ml?
> (* " *)
>
> Presumably the parser thinks the comment extends from l.1 to l.3

Correct.

> Is this intended?

Yes - string literals are parsed in comments. Brackets, quotes, etc. need to match. Weird as that can seem at first encounter, it permits arbitrary commenting out of blocks of code, which is quite useful...


David