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

RE: [XQuery] A.2.2 Lexical Rules: pattern conflicts

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Thu, 29 Jan 2004 18:41:41 +0100
Message-ID: <37B64F4BA60E9E4FB9F60929E059802428781F@DAEMSG03.eur.ad.sag>
To: "Michael Dyck" <jmdyck@ibiblio.org>, <public-qt-comments@w3.org>

> 
> What? Then how does it handle something like this?
> 
>     validate strict context type(po:Address) { <zip>90952</zip> }
> 
> After "validate strict", the lexer is in KINDTEST. If you 
> don't have a transition on "context", the lexer will have to 
> read "context" as a QName, which will lead to a (bogus) syntax error.

I really think we need to distinguish specifying the language from
writing a parser. The BNF here is absolutely clear, and it's up to the
implementor whether a keyword like "context" is recognized by the lexer
because it's in some special state, or whether the lexer simply returns
a QName to the parser, which checks to see if the QName represents the
string "context". 

I would love to see us get rid of lexical states entirely from the
specification of the language, and reduce them to an appendix on
"implementation hints".

Michael Kay
Received on Thursday, 29 January 2004 12:42:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:04 GMT