aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS6
-rw-r--r--meson.build2
-rw-r--r--src/n3.c2
-rw-r--r--src/serd_config.h2
-rw-r--r--test/extra/good/manifest.ttl12
-rw-r--r--test/extra/good/test-nq-syntax-dot-end.nq5
-rw-r--r--test/extra/good/test-nt-syntax-dot-end.nt5
7 files changed, 31 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 195a69df..ea0aaeba 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+serd (0.32.3) unstable; urgency=medium
+
+ * Fix parsing NQuads lines with no space before the final dot
+
+ -- David Robillard <d@drobilla.net> Fri, 09 Feb 2024 15:46:08 +0000
+
serd (0.32.2) stable; urgency=medium
* Enable clang nullability checks
diff --git a/meson.build b/meson.build
index 2f5c697b..33233234 100644
--- a/meson.build
+++ b/meson.build
@@ -12,7 +12,7 @@ project(
],
license: 'ISC',
meson_version: '>= 0.56.0',
- version: '0.32.2',
+ version: '0.32.3',
)
serd_src_root = meson.current_source_dir()
diff --git a/src/n3.c b/src/n3.c
index e713a828..4f7ddd47 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -1763,7 +1763,7 @@ read_nquads_statement(SerdReader* const reader)
// Terminating '.'
read_ws_star(reader);
- if (!eat_byte_check(reader, '.')) {
+ if (!ate_dot && !eat_byte_check(reader, '.')) {
return SERD_ERR_BAD_SYNTAX;
}
}
diff --git a/src/serd_config.h b/src/serd_config.h
index 745232b8..150ffb81 100644
--- a/src/serd_config.h
+++ b/src/serd_config.h
@@ -36,7 +36,7 @@
#define SERD_SRC_SERD_CONFIG_H
// Define version unconditionally so a warning will catch a mismatch
-#define SERD_VERSION "0.32.2"
+#define SERD_VERSION "0.32.3"
#if !defined(SERD_NO_DEFAULT_CONFIG)
diff --git a/test/extra/good/manifest.ttl b/test/extra/good/manifest.ttl
index 24b301e9..5f4e8761 100644
--- a/test/extra/good/manifest.ttl
+++ b/test/extra/good/manifest.ttl
@@ -31,6 +31,8 @@
<#test-long-utf8>
<#test-no-spaces>
<#test-non-curie-uri>
+ <#test-nq-syntax-dot-end>
+ <#test-nt-syntax-dot-end>
<#test-out-of-range-unicode>
<#test-prefix>
<#test-quote-escapes>
@@ -191,6 +193,16 @@
mf:name "test-non-curie-uri" ;
mf:result <test-non-curie-uri.nt> .
+<#test-nq-syntax-dot-end>
+ a rdft:TestNQuadsPositiveSyntax ;
+ mf:action <test-nq-syntax-dot-end.nq> ;
+ mf:name "test-nq-syntax-dot-end" .
+
+<#test-nt-syntax-dot-end>
+ a rdft:TestNQuadsPositiveSyntax ;
+ mf:action <test-nt-syntax-dot-end.nt> ;
+ mf:name "test-nt-syntax-dot-end" .
+
<#test-out-of-range-unicode>
a rdft:TestTurtleEval ;
mf:action <test-out-of-range-unicode.ttl> ;
diff --git a/test/extra/good/test-nq-syntax-dot-end.nq b/test/extra/good/test-nq-syntax-dot-end.nq
new file mode 100644
index 00000000..862e326c
--- /dev/null
+++ b/test/extra/good/test-nq-syntax-dot-end.nq
@@ -0,0 +1,5 @@
+<http://example/s> <http://example/p> _:o _:g .
+<http://example/s> <http://example/p> _:o _:g .
+<http://example/s> <http://example/p> _:o _:h.
+<http://example/s> <http://example/p> _:o _:h.
+<http://example/s> <http://example/p> _:o _:what.how. \ No newline at end of file
diff --git a/test/extra/good/test-nt-syntax-dot-end.nt b/test/extra/good/test-nt-syntax-dot-end.nt
new file mode 100644
index 00000000..f4e3b874
--- /dev/null
+++ b/test/extra/good/test-nt-syntax-dot-end.nt
@@ -0,0 +1,5 @@
+<http://example/s> <http://example/p> _:o .
+<http://example/s> <http://example/p> _:o .
+<http://example/s> <http://example/p> _:o.
+<http://example/s> <http://example/p> _:o.
+<http://example/s> <http://example/p> _:what.how. \ No newline at end of file