- From: <bugzilla@wiggum.w3.org>
- Date: Mon, 10 Aug 2009 21:57:29 +0000
- To: public-qt-comments@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=7257
Summary: LL parsing issues with outer for
Product: XPath / XQuery / XSLT
Version: Working drafts
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: XQueryX 1.1
AssignedTo: jim.melton@acm.org
ReportedBy: nikolay.ognyanov@gmail.com
QAContact: public-qt-comments@w3.org
Please consider the following 2 expressions:
for $a in outer for $b in c return d
for $a in outer for $b in c return d return e
Both are syntactically correct. In the first 'outer' is relative path and in
the second it is part of "outer for" clause. To distinguish between the 2 a
parser needs to look across c which is generally ExprSingle and hence -
recursive. This is of course a problem for LL parsers.
Feasibility of LL parsing is not necessarily a requirement for XQuery 1.1
grammar but it is certainly a nice feature, so I wonder whether you would you
consider the possibility of changing the syntax. Two options that I would
suggest are:
ForClause ::= ("for" | "outer" ) "$" VarName TypeDeclaration?
PositionalVar?
"in" ExprSingle ("," "$" VarName TypeDeclaration?
PositionalVar?
ForClause ::= ("for" | "outer-for") "$" VarName TypeDeclaration?
PositionalVar?
"in" ExprSingle ("," "$" VarName TypeDeclaration?
PositionalVar?
Thank you
Regards
Nikolay
--
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 Monday, 10 August 2009 21:57:40 UTC