aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/n3.c2
-rw-r--r--test/lax/manifest.ttl7
-rw-r--r--test/lax/test-lone-list.nt2
-rw-r--r--test/lax/test-lone-list.ttl1
4 files changed, 11 insertions, 1 deletions
diff --git a/src/n3.c b/src/n3.c
index 373edbe2..46fe281b 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -1652,7 +1652,7 @@ read_n3_statement(SerdReader* const reader)
return SERD_SUCCESS;
}
- if (ate_dot) {
+ if (ate_dot && (reader->strict || (s_type != '('))) {
return r_err(
reader, SERD_ERR_BAD_SYNTAX, "unexpected end of statement\n");
}
diff --git a/test/lax/manifest.ttl b/test/lax/manifest.ttl
index 0cfdb776..c3218a6b 100644
--- a/test/lax/manifest.ttl
+++ b/test/lax/manifest.ttl
@@ -10,6 +10,7 @@
<#test-bad-string>
<#test-bad-uri>
<#test-bad-utf8>
+ <#test-lone-list>
) .
<#test-bad-string>
@@ -30,3 +31,9 @@
mf:action <test-bad-utf8.ttl> ;
mf:result <test-bad-utf8.nt> .
+<#test-lone-list>
+ rdf:type rdft:TestTurtleNegativeSyntax ;
+ mf:name "test-lone-list" ;
+ mf:action <test-lone-list.ttl> ;
+ mf:result <test-lone-list.nt> .
+
diff --git a/test/lax/test-lone-list.nt b/test/lax/test-lone-list.nt
new file mode 100644
index 00000000..400c2aba
--- /dev/null
+++ b/test/lax/test-lone-list.nt
@@ -0,0 +1,2 @@
+_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "42"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
diff --git a/test/lax/test-lone-list.ttl b/test/lax/test-lone-list.ttl
new file mode 100644
index 00000000..e7b51ab7
--- /dev/null
+++ b/test/lax/test-lone-list.ttl
@@ -0,0 +1 @@
+(42) . \ No newline at end of file