<?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>1448</bug_id>
          
          <creation_ts>2005-05-14 01:24:36 +0000</creation_ts>
          <short_desc>[XQuery] Grammar: Longest token vs delimiting terminal</short_desc>
          <delta_ts>2007-02-25 23:54:51 +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>XQuery 1.0</component>
          <version>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>grammar</status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>1390</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Rys">mrys</reporter>
          <assigned_to name="Scott Boag">scott_boag</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>3244</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Rys">mrys</who>
    <bug_when>2005-05-14 01:24:36 +0000</bug_when>
    <thetext>The spec says: &quot;When tokenizing, the longest possible match that is valid in 
the current context is preferred.&quot;

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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3164</commentid>
    <comment_count>1</comment_count>
    <who name="Scott Boag">scott_boag</who>
    <bug_when>2005-05-17 18:19:42 +0000</bug_when>
    <thetext>#1 in the webster&apos;s definition.  :-)

1 : to promote or advance to a rank or position

It works for me, but I think we could substitute the term &quot;used&quot;.  XPath 1.0
says &quot;the longest possible token is always returned.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2742</commentid>
    <comment_count>2</comment_count>
    <who name="Don Chamberlin">chamberl</who>
    <bug_when>2005-06-11 03:40:30 +0000</bug_when>
    <thetext>On 5/19/05 the working group approved Scott&apos;s proposal to change &quot;preferred&quot; 
to &quot;used&quot;. Scott, will you please make this change?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4464</commentid>
    <comment_count>3</comment_count>
    <who name="Scott Boag">scott_boag</who>
    <bug_when>2005-07-09 10:28:56 +0000</bug_when>
    <thetext>Done.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14176</commentid>
    <comment_count>4</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2007-02-25 23:54:40 +0000</bug_when>
    <thetext>Closing bug because commenter has not objected to the resolution posted and more than two weeks have passed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>