Browse Source

Support digits at start of local names as per new grammar.

git-svn-id: http://svn.drobilla.net/serd/trunk@360 490d8e77-9747-427b-9fa3-0b8f29cee8a0
zrythm_meson
David Robillard 11 years ago
parent
commit
79dc6df5c5
  1. 1
      NEWS
  2. 2
      src/reader.c
  3. 1
      tests/test-digit-start-pname.out
  4. 3
      tests/test-digit-start-pname.ttl

1
NEWS

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
serd (9999) unstable;
* Support digits at start of local names as per new grammar
* Add incremental read interface suitable for reading from infinite streams
* Add -e option to serdi to use incremental reading
* Reset indent when finishing a write

2
src/reader.c

@ -685,7 +685,7 @@ static inline uchar @@ -685,7 +685,7 @@ static inline uchar
read_nameStartChar(SerdReader* reader)
{
const uint8_t c = peek_byte(reader);
if (c == '_' || is_alpha(c)) { // TODO: not strictly correct
if (c == '_' || is_alpha(c) || is_digit(c)) { // TODO: Not correct
return eat_byte_safe(reader, c);
}
return 0;

1
tests/test-digit-start-pname.out

@ -0,0 +1 @@ @@ -0,0 +1 @@
<http://example.org/1thing> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/Thing> .

3
tests/test-digit-start-pname.ttl

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
@prefix eg: <http://example.org/> .
eg:1thing a eg:Thing .
Loading…
Cancel
Save