drobilla / serd

A lightweight C library for RDF syntax
https://gitlab.com/drobilla/serd
ISC License
86 stars 15 forks source link

Error parsing 'a' without whitespace #24

Closed wouterbeek closed 5 years ago

wouterbeek commented 5 years ago

The following Turtle file is not parsed, possibly because the a appears with no whitespace surrounding it:

[a<>].
[a[]].
[a()].
<>a<>.
<>a[].
<>a().

This is the error message that I get:

$ serdi -i turtle shortest-triple.ttl 
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <> .
error: shortest-triple.ttl:2:2: bad verb
error: shortest-triplettl:2:2: expected `]', not `['
error: shortest-triple.ttl:2:2: bad verb
error: shortest-triple.ttl:2:4: bad verb
error: shortest-triple.ttl:2:4: bad subject
drobilla commented 5 years ago

Whoops. Ach, this grammar!

Fixed in 611094f, thanks.