This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Top level expression grammar of XQuery scripting extension is : Expr ::= ApplyExpr | ConcatExpr ApplyExpr ::= (ConcatExpr ";")+ ConcatExpr ::= ExprSingle ("," ExprSingle)* To distinguish between ApplyExpr and ConcatExpr alternatives in the rule for Expr an LL parser would need to look beyond a list of ExprSingle to see whether terminating ";" follows it. This can obviously not be done with fixed amount of lookahead. An LL(k) grammar for the same language is e.g. this : Expr ::= ExprSingle ((',' | ';') ExprSingle)* ';'? It does not match well semantics of the language, so possibly the choice to sacrifice LL(k) was conscious. If this is the case though then the fact probably deserves some comments in the specification since generally XQuery related grammars are LL(1) (with the exception of some explicitly defined extra-grammatical constraints).
Hi Nikolay, Thanks for your comments. The XQuery WG has already addressed this issue in an internal draft of the XQuery Scripting Extensions, so the next version will contain this decision. John
Hi John, Thank you for the information. I will be looking forward to the next draft. Any projections as to when it may come out? Regards Nikolay
Soon, I hope.
On the XQuery Working Group teleconference today, the working group confirmed comment #1 was correct, and that this grammar problem has already been fixed.