drobilla / serd

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

Digits in URI scheme result in parsing errors #1

Closed wouterbeek closed 7 years ago

wouterbeek commented 7 years ago

The following is not parsed correctly by Serd 0.26.0 when run as serdi -i ntriples <FILE>:

<a:b> <a:b> <a2:b>

This gives the following error:

syntax does not support relative IRIs
Catch exception load: Error parsing input.

But there are no relative IRIs in the above content. Specifically, the digit (2) in the third IRI's scheme component causes the problem. According to URI/IRI grammars, non-initial characters of scheme components are allowed to be decimal digits.

The same content does parse correctly with serdi -i turtle <FILE>.

wouterbeek commented 7 years ago

Also opened as http://dev.drobilla.net/ticket/1173.

drobilla commented 7 years ago

Fixed in https://github.com/drobilla/serd/commit/195e4bcff3c4dfd3fe8bbf0df57d53ce89ca99e8