- From: <bugzilla@wiggum.w3.org>
- Date: Thu, 04 Feb 2010 20:37:31 +0000
- To: public-qt-comments@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=8882 Summary: XQuery scripting extension grammar is not LL(k) Product: XPath / XQuery / XSLT Version: Working drafts Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Scripting Extensions AssignedTo: john.snelson@oracle.com ReportedBy: nikolay.ognyanov@gmail.com QAContact: public-qt-comments@w3.org 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). -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
Received on Thursday, 4 February 2010 20:37:32 UTC