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

[Bug 1882] New: comment syntax

From: <bugzilla@wiggum.w3.org>
Date: Tue, 23 Aug 2005 09:55:57 +0000
To: public-qt-comments@w3.org
Message-Id: <E1E7VVd-0004Ii-6n@wiggum.w3.org>


           Summary: comment syntax
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: davidc@nag.co.uk
         QAContact: public-qt-comments@w3.org

The Xquery Test file


Has what is apparently a malformed comment

(:  operand2 = empty sequence)

and the test parser applet and saxon both report a parse error on this file.
I was going to raise a bug under the test suite but the grammar for comments
[154] Comment         ::= "(:" (CommentContents | Comment)* ":)"
[155] CommentContents ::= (Char+ - (Char* ':)' Char*))

note that [155] is any string of characacters that don't include an
_end_ marker. As such it would appear that

  operand2 = empty sequence)

matches CommentContents  and so 

(:  operand2 = empty sequence)

is a valid (single) comment. It would appear that [155] is in error and should
forbid a comment start rather than a comment end:

[155] CommentContents ::= (Char+ - (Char* '(:' Char*))
which would then force a nested (: to be parsed as a nested Comment as allowed
by [154]. (And the test file would then be in error and require 

(:  operand2 = empty sequence)

changing to

(:  operand2 = empty sequence:)

Received on Tuesday, 23 August 2005 10:08:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:07 UTC