Re: delimiters between tokens in turtle

On Thu, Feb 23, 2012 at 9:01 AM, Henry Story <henry.story@bblfish.net> 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.

It is valid Turtle as well. There is nothing ambiguous to the grammar
in there. Strange perhaps, but not ambiguous. Would make more sense
perhaps with an @base directive, but leaving out @base is fine.

>
> cwm even is able to parse
>
>   @prefix foaf: <http://xmlns.com/foaf/0.1> .
>   :me foaf:knows:her.

Again, also valid Turtle by GRAMMAR, nothing ambiguous. However, not
valid Turtle as : is not bound. (Turtle is not N3)

Perhaps there should be some text regarding the normal way of
outputting turtle with whitespace?
>
> Anyway, it's not so easy to implement some of this.

Exactly how the @pass directive in the EBNF is supposed to work is not
well documented I agree. (Heck, W3C EBNF is not well documented).
Basically it swallows white space that is not part of any token,
that's about it.

> For some context, I have been working on this in Scala, and writing up
> some thoughts here:
>
>   https://bitbucket.org/pchiusano/nomo/issue/6/complex-ebnf-rules
>
> Henry
>
> Social Web Architect
> http://bblfish.net/
>
>

Received on Thursday, 23 February 2012 21:15:28 UTC