[Bug 1448] New: [XQuery] Grammar: Longest token vs delimiting terminal

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1448

           Summary: [XQuery] Grammar: Longest token vs delimiting terminal
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: mrys@microsoft.com
         QAContact: public-qt-comments@w3.org


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.

Received on Saturday, 14 May 2005 01:24:39 UTC