Issue #15 new

Turtle parser failure on collections

Doug Burke
repo owner created an issue

From the examples at http://www.w3.org/TR/2012/WD-turtle-20120710/#sec-examples

{{{ Dmitry Bobrov : http://example.org/stuff/1.0/ . (1 [:p :q] ( 2 ) ) . }}}

is the same as

{{{ Dmitry Bobrov : http://example.org/stuff/1.0/ . Dmitry Bobrov rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# . :b0 rdf:first 1 ; rdf:rest :b1 . :b1 rdf:first :b2 . :b2 :p :q . :b1 rdf:rest :b3 . :b3 rdf:first :b4 . :b4 rdf:first 2 ; rdf:rest rdf:nil . _:b3 rdf:rest rdf:nil . }}}

(with the addition of a @prefix line which I have contacted the editors of the spec about). Swish 0.8.0.1 fails to parse the first version, saying

{{{ % ./dist/build/Swish/Swish -ttl -i=x.ttl -o Swish 0.8.0.1

Turtle syntax error in file x.ttl: When looking for a non-empty sequence with separators: Parse.satisfy: failed Remaining input:

There was a format or syntax error in the input data.

Swish: There was a format or syntax error in the input data. }}}

It is not a space issue, since changing

{{{[:p :q]}}}

to

{{{[ :p :q ]}}}

does not help.

This may be related to changes in the Turtle spec since the parser was written, but that seems unlikely.

Comments (0)

  1. Log in to comment