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 1376 - [XQuery] some editorial comments on A.1.1 grammar-note: parens
Summary: [XQuery] some editorial comments on A.1.1 grammar-note: parens
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 1.0 (show other bugs)
Version: Last Call drafts
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: Scott Boag
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard: grammar
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-11 07:30 UTC by Michael Dyck
Modified: 2007-02-25 23:51 UTC (History)
0 users

See Also:


Attachments

Description Michael Dyck 2005-05-11 07:30:29 UTC
A.1.1 grammar-note: parens

"A look-ahead of one character is required to distinguish function patterns"
    Change "function patterns" to "a FunctionCall".

"from a QName or keyword followed by a Pragma, or Comment"
    Delete comma.

"for (: whom the bell :) $tolls = 3 return $tolls"
    This example is illegal. Change "=" to "in" ?

(this note)
    What's so special about this particular case that it deserves to be pointed
    out? There are lots of other cases that require lookahead (in a lookahead-
    based parser), and more lookahead than just one character. I think this
    grammar-note should be dropped.
Comment 1 C. M. Sperberg-McQueen 2005-06-02 00:42:37 UTC
Quite correct.  The expression

  for (: whom the bell :) $tolls = 3 return $tolls

does appear to be illegal.  The suggested replacement
works fine.

I haven't analysed the grammar for lookahead requirements;
where do you believe longer lookahead to be required?
Are there any such places not now marked with angle
brackets?
Comment 2 C. M. Sperberg-McQueen 2005-07-07 00:54:42 UTC
Looking at this again, I think the text would do better to
describe the required lookahead not in terms of characters
but in terms of terminal symbols.  This unfortunately makes
the sentence clumsy:  "A look-ahead of one terminal symbol
is required ...".  So perhaps just say "Look-ahead is required ..."
Comment 3 Scott Boag 2005-07-09 03:36:08 UTC
(In reply to comment #0)
> A.1.1 grammar-note: parens
> 
> "A look-ahead of one character is required to distinguish function patterns"
>     Change "function patterns" to "a FunctionCall".

Done.

> 
> "from a QName or keyword followed by a Pragma, or Comment"
>     Delete comma.

Done.

> 
> "for (: whom the bell :) $tolls = 3 return $tolls"
>     This example is illegal. Change "=" to "in" ?

Done.

> 
> (this note)
>     What's so special about this particular case that it deserves to be pointed
>     out? There are lots of other cases that require lookahead (in a lookahead-
>     based parser), and more lookahead than just one character. I think this
>     grammar-note should be dropped.

Since, with nested comments, you can no longer match "foo(" with a regular
expression, this case is not different.  The original issue is "foo(:" vs.
"foo(".  But, I don't think this non-normative note is harmful, and I'll leave
it in unless someone wants to push on the matter.
Comment 4 Scott Boag 2005-07-09 03:36:38 UTC
(In reply to comment #2)
So perhaps just say "Look-ahead is required ..."

Done.
Comment 5 Scott Boag 2005-07-22 19:28:42 UTC
A joint meeting of the Query and XSLT working groups considered this comment on 
July 20, 2005.  

The WGs agreed to resolve these editorial issues as listed in my previous comment.

If you do not agree with this resolution, please add a comment explaining why.
If you wish to appeal the WG's decision to the Director, then change the Status
of the record to Reopened. If we do not hear from you in the next two weeks, we
will assume you agree with the WG decision.
Comment 6 Jim Melton 2007-02-25 23:51:44 UTC
Closing bug because commenter has not objected to the resolution posted and more than two weeks have passed.