[Issue 16603] New: [Lexical] comment definition is incorrrect
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Oct 7 20:49:16 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16603
Issue ID: 16603
Summary: [Lexical] comment definition is incorrrect
Product: D
Version: D2
Hardware: All
URL: http://dlang.org/
OS: All
Status: NEW
Severity: blocker
Priority: P3
Component: dlang.org
Assignee: nobody at puremagic.com
Reporter: kevin at brogan.ca
Both of the block comment definitions are incorrect.
BlockComment:
/* Characters */
Character:
any Unicode character
The ending comment tags are included in the definition of "any unicode
character", which would make the block comment in quotes "/* abc */ */" a
single comment instead of a comment followed by an invalid sequence, if you
follow the maximal munch technique.
The nesting block comment suffers from the same definition.
The c++ spec handles this by describing comments in a non technical manner. See
[lex.comment] in the spec.
A solution could be perhaps, to mention that comments take a minimum munch in
the exceptions note.
--
More information about the Digitalmars-d-bugs
mailing list