W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2004

[XQuery] MS-XQ-LC1-146

From: Michael Rys <mrys@microsoft.com>
Date: Mon, 16 Feb 2004 23:19:01 -0800
Message-ID: <EB0A327048144442AFB15FCE18DC96C7020F7F63@RED-MSG-31.redmond.corp.microsoft.com>
To: <public-qt-comments@w3.org>

Appendix A.1 EBNF	

It looks like that we cannot parse an expression of the form: 
"1" cast as xs:integer = "1.0" cast as xs:integer. 

Which is semantically the same as xs:integer("1") = xs:integer("1.0").

Based on the precedence table, I would assume that cast as binds
stronger than =, and from a composability point of view, I would also
expect to be able to write the above. However, when following the
grammar, it looks like the grammar pops out without consuming the =. 

Here is the parse process:
"1" is consumed by

Which then pops back to CastExpr that consumes "cast as xs:integer"

Then we pop back to the top and realize that we have left overs and
raise a parse error.

This is also a problem for the related treat as, castable as etc.
Received on Tuesday, 17 February 2004 02:19:10 UTC

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