W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2005

[Bug 1387] [XQuery] some editorial comments on A.2.3 Comments

From: <bugzilla@wiggum.w3.org>
Date: Sat, 09 Jul 2005 21:15:47 +0000
To: public-qt-comments@w3.org
Message-Id: <E1DrMfr-0000mQ-Cr@wiggum.w3.org>


------- Additional Comments From scott_boag@us.ibm.com  2005-07-09 21:15 -------
(In reply to comment #0)
> A.2.3 Comments
> (whole section)
>     I think the content of this section should be moved/merged either to A.1.1
>     grammar-note: comments, or 2.6 Comments.  It appears to be just talking
>     about ramifications of the Comment and CommentContents productions.  It
>     isn't specifying the lexical structure of the language.

Would be OK with me, but it should be decided by Don at the upcoming F2F.

> "Comments are allowed to nest, though the content of a comment must have
> balanced comment delimiters without regard to structure."
>     I'm not sure that "balanced delimiters without regard to structure" makes
>     any sense. Doesn't "balanced" induce a structure? Would "balanced delimiters
>     *with* regard to structure" or just "balanced delimiters" mean something
>     different?
>     And anyway, aren't balanced delimiters guaranteed by the fact that comments
>     nest? In which case, "though" should be "so".

<p>A comment can contain nested comments, as long as all "(:" and ":)" patterns
are balanced, no matter where they occur within the outer comment.</p>

> "It is a limitation of nested comments that literal content can cause unbalanced
> nesting of comments."
>     Comments don't have to nest to cause problems like this, they just have to
>     have visible delimiters (as opposed to line-end comments): if you have a
>     language with delimited comments, and you try to comment-out a chunk of
>     text, there's the possibility that the text might already contain characters
>     that are (or will become) a comment delimiter and screw things up.
>     E.g., in C (where comments are delimited but do not nest),
>         "this is just a string */"
>     is a legal expression. But
>         /* "this is just a string */" */
>     will cause a syntax error. Mind you,
>         /* "this is just a string /*" */
>     isn't an error (unlike the corresponding construct in XQuery), though it'll
>     probably get you a warning.

Sure, though I'll leave it as it stands.
Received on Saturday, 9 July 2005 21:15:49 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:25 UTC