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

> 
> 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 UTC