[tracker/wip/carlosg/ttl-parser-improvements: 1/6] libtracker-data: Parse STRING_LITERAL_LONG before STRING_LITERAL in turtle
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/ttl-parser-improvements: 1/6] libtracker-data: Parse STRING_LITERAL_LONG before STRING_LITERAL in turtle
- Date: Sat, 10 Oct 2020 09:02:38 +0000 (UTC)
commit 8a67edd0df8c586740ad8ffaf80b0c0398a92022
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Oct 6 20:59:09 2020 +0200
libtracker-data: Parse STRING_LITERAL_LONG before STRING_LITERAL in turtle
The STRING_LITERAL terminal may mistakenly match STRING_LITERAL_LONG strings.
Invert the order here, so we correctly trimp quotes around.
src/libtracker-data/tracker-turtle-reader.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-data/tracker-turtle-reader.c b/src/libtracker-data/tracker-turtle-reader.c
index 545d95475..ccea29d27 100644
--- a/src/libtracker-data/tracker-turtle-reader.c
+++ b/src/libtracker-data/tracker-turtle-reader.c
@@ -585,14 +585,14 @@ tracker_turtle_reader_iterate_next (TrackerTurtleReader *reader,
reader->object = generate_bnode (reader, str);
reader->object_is_uri = TRUE;
g_free (str);
- } else if (parse_terminal (reader, terminal_STRING_LITERAL1, 1, &str) ||
- parse_terminal (reader, terminal_STRING_LITERAL2, 1, &str)) {
+ } else if (parse_terminal (reader, terminal_STRING_LITERAL_LONG1, 3, &str) ||
+ parse_terminal (reader, terminal_STRING_LITERAL_LONG2, 3, &str)) {
reader->object = g_strcompress (str);
g_free (str);
if (!handle_type_cast (reader, error))
return FALSE;
- } else if (parse_terminal (reader, terminal_STRING_LITERAL_LONG1, 3, &str) ||
- parse_terminal (reader, terminal_STRING_LITERAL_LONG2, 3, &str)) {
+ } else if (parse_terminal (reader, terminal_STRING_LITERAL1, 1, &str) ||
+ parse_terminal (reader, terminal_STRING_LITERAL2, 1, &str)) {
reader->object = g_strcompress (str);
g_free (str);
if (!handle_type_cast (reader, error))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]