Re: completed action A-640-02a: require space after colon in specs

just got reminded of this xqts test:

  declare union <union>for gibberish { for $for in for return 
<for>***div div</for> }</union>, if(if) then then else else- +-++-**-* 
instance of element(*)* * * **---++div- div -div

Clarity did not seem to have been so important in the past


On 05/02/2016 03:56 AM, Michael Dyck wrote:
> On 16-04-25 06:04 PM, Michael Dyck wrote:
>>> ACTION A-640-02a: Mdyck to implemented proposal in the appendix A of 
>>> the
>>> XPath and XQuery specs as described in 2b. See:
>> I've committed this change to the spec source. It'll show up in the 
>> rendered
>> docs next time Jonathan commits a build.
>> Specifically, I said that one or more 'symbol separators' are 
>> required when
>> the colon of a MapConstructorEntry is followed by a QName, an NCName, 
>> or "*".
> I just noticed an interesting effect of this rule.
> Consider the expressions:
>     map { "a": array }
>     map { "a": array{} }
> In the first, the 'array' token is the QName of a NameTest; in the 
> second, it's a keyword in an ArrayConstructor.
> Due to this distinction, they react differently to deleting the space 
> after the colon:
>     map { "a":array }
> is disallowed by the above rule, but
>     map { "a":array{} }
> is allowed.
> So, to enforce the rule, it's not enough for a lexer to detect that a 
> ":" token is immediately followed by an "array" token. You have to do 
> some parsing before you can say whether the "array" is a QName (or 
> NCName) and thus the expression is illegal.
> To make the rule easier to enforce, we might wish to generalize it so 
> that
>    map { "a":array{} }
> is also disallowed.
> -Michael

Received on Friday, 6 May 2016 00:20:59 UTC