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

Minor grammar suggestion

From: XQuery <xquery@attbi.com>
Date: Mon, 20 Jan 2003 13:44:13 -0800
To: <public-qt-comments@w3.org>
Message-ID: <000001c2c0cd$1380c4f0$6401a8c0@brundage1>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:23 GMT