W3C home > Mailing lists > Public > public-rdf-comments@w3.org > February 2012

Re: delimiters between tokens in turtle

From: Alex Hall <alexhall@revelytix.com>
Date: Thu, 23 Feb 2012 15:50:29 -0500
Message-ID: <CAFq2biyJHGYZcrb+E0nXzd-DfvF1+1D7oFtz3K5orQH3fSFJFw@mail.gmail.com>
To: David Booth <david@dbooth.org>
Cc: Henry Story <henry.story@bblfish.net>, public-rdf-comments@w3.org
On Thu, Feb 23, 2012 at 2:31 PM, David Booth <david@dbooth.org> wrote:

> On Thu, 2012-02-23 at 18:01 +0100, Henry Story wrote:
> > I can't quite work out what the delimiters between tokens are.
> >
> > The following seems to be correct N3 (cwm parses it)
> >
> >   @prefix : <>.
> >   :me</knows>:her,:him.
> >
> > cwm even is able to parse
> >
> >    @prefix foaf: <http://xmlns.com/foaf/0.1> .
> >    :me foaf:knows:her.
>
> Ewwwww!  That's awful.  If the grammar really allows that then I
> certainly hope the grammar will be changed to require whitespace between
> tokens.  Note that a PrefixedName is not required to have a local name
> part, and I often take advantage of this fact in SPARQL as a way of
> defining a short name for a single long URI
>
> http://lists.w3.org/Archives/Public/public-rdf-dawg-comments/2011Sep/0004.html
> so any of the following would be legal statements given suitable prefix
> definitions:
>
>     :me  foaf:  knows:her .
>     :me  foaf:know  s:her .
>     :me  foaf:knows  :her .
>
>
This ambiguity is handled by the 'longest match wins' rule that is part of
the Turtle specification. So the line:

:me  foaf:knows:her

must be parsed as:

:me  foaf:knows  :her

Regards,
Alex



> --
> David Booth, Ph.D.
> http://dbooth.org/
>
> Opinions expressed herein are those of the author and do not necessarily
> reflect those of his employer.
>
>
>
Received on Thursday, 23 February 2012 20:51:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:59:30 UTC