<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>7257</bug_id>
          
          <creation_ts>2009-08-10 21:57:29 +0000</creation_ts>
          <short_desc>LL parsing issues with outer for</short_desc>
          <delta_ts>2013-11-19 00:15:15 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XQueryX 3.0</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>6927</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nikolay Ognyanov">nikolay.ognyanov</reporter>
          <assigned_to name="Jim Melton">jim.melton</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>26364</commentid>
    <comment_count>0</comment_count>
    <who name="Nikolay Ognyanov">nikolay.ognyanov</who>
    <bug_when>2009-08-10 21:57:29 +0000</bug_when>
    <thetext>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 &apos;outer&apos; is relative path and in the second it is part of &quot;outer for&quot; 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 ::=  (&quot;for&quot; | &quot;outer&quot;    ) &quot;$&quot; VarName TypeDeclaration? PositionalVar? 
                &quot;in&quot; ExprSingle (&quot;,&quot; &quot;$&quot; VarName TypeDeclaration? PositionalVar? 

ForClause ::=  (&quot;for&quot; | &quot;outer-for&quot;) &quot;$&quot; VarName TypeDeclaration? PositionalVar? 
                &quot;in&quot; ExprSingle (&quot;,&quot; &quot;$&quot; VarName TypeDeclaration? PositionalVar? 

Thank you
Regards
Nikolay</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26365</commentid>
    <comment_count>1</comment_count>
    <who name="Nikolay Ognyanov">nikolay.ognyanov</who>
    <bug_when>2009-08-10 22:18:01 +0000</bug_when>
    <thetext>P.S. Sorry, this has already been reported.

*** This bug has been marked as a duplicate of bug 6927 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96482</commentid>
    <comment_count>2</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2013-11-19 00:15:15 +0000</bug_when>
    <thetext>This bug was resolved as a duplicate of bug 6927 over four years ago.  I am therefore marking it CLOSED.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>