aboutsummaryrefslogtreecommitdiffstats
path: root/src/n3.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-03-10 12:16:54 +0100
committerDavid Robillard <d@drobilla.net>2019-04-13 19:48:23 +0200
commitb568e02a8cb0ec81e297847f31e1f59ce0c7997a (patch)
tree4a1c1f990fb5f8dec58f118416887f7bd4c2645f /src/n3.c
parentfd342b299f2d46fd0bc79bc3068c5470d59e6a43 (diff)
downloadserd-b568e02a8cb0ec81e297847f31e1f59ce0c7997a.tar.gz
serd-b568e02a8cb0ec81e297847f31e1f59ce0c7997a.tar.bz2
serd-b568e02a8cb0ec81e297847f31e1f59ce0c7997a.zip
Support reading lone lists in lax mode
This allows parsing documents like "(42) ."
Diffstat (limited to 'src/n3.c')
-rw-r--r--src/n3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/n3.c b/src/n3.c
index ac217c18..356e139b 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -1446,7 +1446,7 @@ read_n3_statement(SerdReader* reader)
} else if ((st = read_triples(reader, ctx, &ate_dot))) {
if (st == SERD_FAILURE && s_type == '[') {
return SERD_SUCCESS;
- } else if (ate_dot) {
+ } else if (ate_dot && (reader->strict || (s_type != '('))) {
return r_err(reader, SERD_ERR_BAD_SYNTAX,
"unexpected end of statement\n");
} else {