This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29989 - [XQ31] CurlyArrayConstructor does not use EnclosedExpr
Summary: [XQ31] CurlyArrayConstructor does not use EnclosedExpr
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3.1 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-07 06:52 UTC by Reece H. Dunn
Modified: 2016-11-11 14:32 UTC (History)
3 users (show)

See Also:


Attachments

Description Reece H. Dunn 2016-11-07 06:52:08 UTC
The XQuery 3.1 EBNF grammar contains:

[176]   	CurlyArrayConstructor	   ::=   	"array" "{" Expr? "}"

However, other constructs of this form have been converted to use EnclosedExpr. This construct should be converted to:

[176]   	CurlyArrayConstructor	   ::=   	"array" EnclosedExpr

Unless there was a reason for not using EnclosedExpr.
Comment 1 Michael Dyck 2016-11-07 17:53:12 UTC
Related history:

At meeting #621:
  https://lists.w3.org/Archives/Public/public-xsl-query/2015Oct/0071.html
I was given action item 621-03 "to update the grammar for empty expressions in braces" (as outlined in the accompanying decision).

In this message:
  https://lists.w3.org/Archives/Public/public-xsl-query/2015Nov/0001.html
I reported what I'd done to complete the action item, and (at the very bottom) said:
     Also, in
         CurlyArrayConstructor
     I did NOT change
         "{" Expr? "}"
     because it wasn't in the list of expressions to 'consider',
     despite that it presumably has the "{} means {()}" semantics.
     (I say "presumably" because I don't think the spec actually defines
     the meaning of "array {}".)

My message came up at meeting #622:
  https://lists.w3.org/Archives/Public/public-xsl-query/2015Nov/0011.html
but the minutes don't say (and I don't recall) whether we considered the point about CurlyArrayConstructor. (It looks like the quote above was the last time that CurlyArrayConstructor was mentioned in public-xsl-query.)
Comment 2 Josh Spiegel 2016-11-07 18:40:55 UTC
So, there are really two independent problems:

(1) Use EnclosedExpr in the CurlyArrayConstructor production (editorial?)
(2) Make explicit that array{} is the same as array{()}
Comment 3 Josh Spiegel 2016-11-07 18:49:24 UTC
Actually, doing (1) takes care of (2).
Comment 4 Andrew Coleman 2016-11-11 13:56:12 UTC
The WG decided to adopt the resolution described in comment #2.
Action A-660-08 raised to track this.
Comment 5 Michael Dyck 2016-11-11 14:32:58 UTC
I have change the grammars for XPath 3.1 and XQuery 3.1 as suggested in comment #0.