aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-03-10 12:16:54 +0100
committerDavid Robillard <d@drobilla.net>2020-10-27 13:13:58 +0100
commitdf54e2c8de9be51cd16bdce927b0a03ca9ae3a31 (patch)
tree7978187c3a0f26dacf249f134846a4398c5fd369
parent1419387e8becd183273337a746086d4b6b339280 (diff)
downloadserd-df54e2c8de9be51cd16bdce927b0a03ca9ae3a31.tar.gz
serd-df54e2c8de9be51cd16bdce927b0a03ca9ae3a31.tar.bz2
serd-df54e2c8de9be51cd16bdce927b0a03ca9ae3a31.zip
Support reading lone lists in lax mode
This allows parsing documents like "(42) ."
-rw-r--r--src/n3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/n3.c b/src/n3.c
index 2094432b..8b3ab9d7 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -1496,7 +1496,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 {