Minor Comments on Polishing ExprComment

The ExprComment production [1] of XQuery also matches that of Pragma and
MUExtension. Since these can occur in the same lexical context (state) as
one another, I suggest that one of the following routes be taken:

* ExprComment be re-written to explicitly disallow Pragma and MUExtension.
(Moreover, since Pragma and MUExtension seem to follow a common idiom, and
one which may well be extended in future versions of XQuery, perhaps it'd
be wiser to group them under a common Extension production.)
* A note added that parsers must look ahead when matching ExprComment's
opening terminal, so that they don't pick up a Pragma or MUExtension
production instance.

Here is a possibility for re-written comment and extension productions,
should that route be taken:

ExprComment ::= "(:" ExprCommentContent ":)"
Extension ::= "(::" QName QName ExtensionContent "::)"
ExprCommentContent ::= (Char - ":") (Char* - ":)")
ExtensionContent ::= ((Char - ':') | (':' (Char - ':')))*

Colophon, from #rdfig on Freenode:

<darobin> bah, python has bindings to libxslt, what more do you need ? :)
<sbp`> that's odd. I'm starting to see smileys as XQuery comments

Cheers,

[1] http://www.w3.org/TR/2003/WD-xquery-20030822/#comments
- W3C Working Draft 22 August 2003

-- 
Sean B. Palmer, <http://purl.org/net/sbp/>
"phenomicity by the bucketful" - http://miscoranda.com/

Received on Wednesday, 10 September 2003 10:20:19 UTC