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

RE: FW: XQuery: A.1.2 Lexical Rules

From: <scott_boag@us.ibm.com>
Date: Sun, 12 Jan 2003 13:21:33 -0500
To: <xquery@attbi.com>
Cc: "'Michael Dyck'" <jmdyck@ibiblio.org>, public-qt-comments@w3.org
Message-ID: <OF7C3A42BD.616BB258-ON85256CAC.00629FC5-85256CAC.0064D9A4@lotus.com>





"XQuery" <xquery@attbi.com> wrote on 01/11/2003 12:14:39 PM:
> I don't mean to be overly negative, but has the W3C ever published a
totally
> correct grammar for anything?

We're trying hard to make sure all grammar assertions are validated, that
it is a functional grammar without ambiguities, and that it can be
processed by traditional parser compilers.  We're building up a reasonable
test suite of expressions, and also add all expressions appearing in the
drafts, and regression test with every pub.

> I've followed every XQuery internal and public draft since the first "XML
> Query Algebra" paper (and implemented many of them), and the grammar of
> *every* one of them has contained numerous errors and design flaws (many
of
> which I've provided feedback on through the Microsoft reps or this list).
>
> I think the less the W3C attempts in the area of grammar specification,
the
> better.

It's an evolving process... we're not done.  The reason we that we provide
intermediate drafts is so we can get feedback, but we don't claim that any
intermediate draft is perfect.  Hopefully they are improving.

> For example, my personal implementation of the XQuery grammar uses
> only five lexical states, and the complete source code for my lexer
occupies
> less space on paper than the current lexical description in the W3C
draft.

I don't know how correct your implementation is, or what techniques you
used.  Our goal is to prove you can implement a LL(1) grammar.  Without
parse time lookahead, the states as shown are the best we could do in
JavaCC (though, like I said, there were production problems in the last
draft... so the tables are worse than the source).   If you have ideas for
simplification, please do be specific, though it might be better to wait
until the actual grammar has fully stabilized.

We don't mean to imply an implementation strategy... we just want to make
sure we're not missing necessary information.

> You might as well publish an actual program instead of pages of useless
> tables.

No, we need the information to be abstract.  If the tables don't contain
information above the grammar and basic lexical description, then, yes,
they should probably be removed.

-scott
Received on Sunday, 12 January 2003 13:22:53 GMT

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