[Bug 1882] comment syntax

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1882





------- Additional Comments From davidc@nag.co.uk  2005-08-31 09:58 -------
Yes, I was going to send a follow on saying to catch (: and :).

However seing as most regex engines don't (I think) have this "subtraction"
syntax, and people might want to find comments with regex tools it might be
simpler to give an additive definition rather than a subtractive one.

Basically CommentContents is a run of 
any character other than : or (
or 
: followed by not-(
or
( followed by not-:

That is:

([^:\(]|\([^:]|:[^\)*

or in your EBNF syntax

(((Char - ":") - "(") | ("(" (Char - ":")) | (":" (Char - ")")))*

> (although i am not sure why the first token on the RHS is
> Char+ instead of Char*.

I noticed that, I suspect it's a hang over from the earlier draft's (:: pragma
syntax.

David

(I assume I don't need to open a bugzilla entry on the  test suite
generalexpression12.xq)

Received on Wednesday, 31 August 2005 09:58:48 UTC