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 1448 - [XQuery] Grammar: Longest token vs delimiting terminal
Summary: [XQuery] Grammar: Longest token vs delimiting terminal
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 1.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows XP
: 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: 1390
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-14 01:24 UTC by Michael Rys
Modified: 2007-02-25 23:54 UTC (History)
0 users

See Also:


Attachments

Description Michael Rys 2005-05-14 01:24:36 UTC
The spec says: "When tokenizing, the longest possible match that is valid in 
the current context is preferred."

What does preferred mean? Can I take the non-preferred interpretation?

Also, since the longest token rule suffices for many grammar implementations, 
we would like the specification to make the impact of delimiting terminals non-
normative. If I have the expression 0+a-b, a parser can know that a-b is taken 
as the longest token, and that the expression (0+a)-b will be tokens 0 + a - b.
Comment 1 Scott Boag 2005-05-17 18:19:42 UTC
#1 in the webster's definition.  :-)

1 : to promote or advance to a rank or position

It works for me, but I think we could substitute the term "used".  XPath 1.0
says "the longest possible token is always returned."
Comment 2 Don Chamberlin 2005-06-11 03:40:30 UTC
On 5/19/05 the working group approved Scott's proposal to change "preferred" 
to "used". Scott, will you please make this change?
Comment 3 Scott Boag 2005-07-09 10:28:56 UTC
Done.
Comment 4 Jim Melton 2007-02-25 23:54:40 UTC
Closing bug because commenter has not objected to the resolution posted and more than two weeks have passed.