Browse Source

Move test assets and default Lemon template around.

Stefano Cossu 4 years ago
parent
commit
1c0fef9dd5

+ 4 - 0
ext/lemon/README

@@ -0,0 +1,4 @@
+NOTE: The lempar.c file is not under version control. It is copied from the
+git repository at https://github.com/sqlite/sqlite/blob/master/tool/lempar.c
+Pinned at commit 5e5683ae466667c61aa4cd5127850f080508eab9 (Jan 31, 2021)
+https://github.com/sqlite/sqlite/blob/5e5683ae466667c61aa4cd5127850f080508eab9/tool/lempar.c

+ 0 - 0
src/codec/lempar.c → ext/lemon/lempar.c


+ 1 - 1
include/nt_parser.h

@@ -30,7 +30,7 @@ LSUP_nt_parse_term (const char *rep, const LSUP_NSMap *map, LSUP_Term **term);
  *  parsed. This may be more than the triples in the resulting graph.
  *
  * @return LSUP_OK on success, LSUP_VALUE_ERR if a parsing error was
- *  encountered. TODO Add line/char info for parsing error:w
+ *  encountered. TODO Add line/char info for parsing error
  */
 LSUP_rc
 LSUP_nt_parse_doc (FILE *stream, LSUP_Graph **gr, size_t *ct);

+ 1 - 1
src/codec/Makefile

@@ -12,5 +12,5 @@ $(parsers): %_parser.c: %_lexer.re %_grammar.c
 	$(LEXER) $< -o $@ -T --case-ranges
 
 %_grammar.c: %_grammar.y
-	$(PARSER) $< -c -Tlempar.c
+	$(PARSER) $< -c -T../../ext/lemon/lempar.c
 

+ 0 - 1
src/codec/test2.txt

@@ -1 +0,0 @@
-<http://example.org/show/218> <http://www.w3.org/2000/01/rdf-schema#label> "That Seventies Show"^^<http://www.w3.org/2001/XMLSchema#string> . # literal with XML Schema string datatype <http://example.org/show/218> <http://www.w3.org/2000/01/rdf-schema#label> "That Seventies Show" . # same as above <http://example.org/show/218> <http://example.org/show/localName> "That Seventies Show"@en . # literal with a language tag <http://example.org/show/218> <http://example.org/show/localName> "Cette Série des Années Septante"@fr-be .  # literal outside of ASCII range with a region subtag <http://example.org/#spiderman> <http://example.org/text> "This is a multi-line\nliteral with many quotes (\"\"\"\"\")\nand two apostrophes ('')." .  <http://en.wikipedia.org/wiki/Helium> <http://example.org/elements/atomicNumber> "2"^^<http://www.w3.org/2001/XMLSchema#integer> . # xsd:integer <http://en.wikipedia.org/wiki/Helium> <http://example.org/elements/specificGravity> "1.663E-4"^^<http://www.w3.org/2001/XMLSchema#double> .     #xsd:double # A comment.  # Another comment.

+ 0 - 0
src/codec/test2.nt → test/assets/test2.nt


+ 0 - 0
test/assets.h → test/assets/triples.h


+ 1 - 1
test/test_graph.c

@@ -1,6 +1,6 @@
 #include "test.h"
 #include "graph.h"
-#include "assets.h"
+#include "assets/triples.h"
 
 static int
 test_graph_mem_new ()

+ 1 - 1
test/test_store_ht.c

@@ -1,6 +1,6 @@
 #include "test.h"
 #include "store_htable.h"
-#include "assets.h"
+#include "assets/triples.h"
 
 /** @brief Test hash table store.
  */

+ 1 - 1
test/test_store_mdb.c

@@ -1,6 +1,6 @@
 #include "test.h"
 #include "store_mdb.h"
-#include "assets.h"
+#include "assets/triples.h"
 
 
 static char *path = "/tmp/testdb";