- From: XQuery <xquery@attbi.com>
- Date: Mon, 20 Jan 2003 13:44:13 -0800
- To: <public-qt-comments@w3.org>
If you disallow whitespace from appearing in the wildcard pattern NCName:*, then the lexer can be implemented with effectively one character of lookahead and the parser with two tokens of lookahead. Otherwise, the lexer needs two lookaheads (or an equivalent) to distinguish between the three cases NCName:NCName (no WS allowed), NCName:* (WS allowed) and NCName::* (WS allowed). (The only other patterns requiring lookahead in the parser are the terminator sequences -->, --}, and ]]>, but all three of these consume all characters until the terminator or EOF is found, so their lookahead is context-sensitive.) Cheers, Michael Brundage xquery@attbi.com
Received on Monday, 20 January 2003 16:44:51 UTC