diff options
author | David Robillard <d@drobilla.net> | 2019-12-18 19:09:49 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-27 13:13:59 +0100 |
commit | 7f508b89230b339684a4013dbbad741d9e16e40a (patch) | |
tree | 1c366ec60c6fcac68f96e01df06e4dc3c142f1ab /serd | |
parent | b6b777a0c0145449bce9855bc3851ad1b5edf409 (diff) | |
download | serd-7f508b89230b339684a4013dbbad741d9e16e40a.tar.gz serd-7f508b89230b339684a4013dbbad741d9e16e40a.tar.bz2 serd-7f508b89230b339684a4013dbbad741d9e16e40a.zip |
Add support for parsing variables
This adds a reader flag and serdi option for extending a syntax with support
for SPARQL-like variables, for storing things like patterns or simple queries.
Diffstat (limited to 'serd')
-rw-r--r-- | serd/serd.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/serd/serd.h b/serd/serd.h index 2574a592..794fe285 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -188,7 +188,16 @@ typedef enum { is meaningful only within this serialisation. @see [RDF 1.1 Turtle](http://www.w3.org/TR/turtle/#grammar-production-BLANK_NODE_LABEL) */ - SERD_BLANK = 4 + SERD_BLANK = 4, + + /** + A variable node + + Value is a variable name without any syntactic prefix, like "name", + which is meaningful only within this serialisation. @see [SPARQL 1.1 + Query Language](https://www.w3.org/TR/sparql11-query/#rVar) + */ + SERD_VARIABLE = 5 } SerdNodeType; /// Flags indicating certain string properties relevant to serialisation @@ -258,7 +267,8 @@ typedef struct { /// Reader options typedef enum { - SERD_READ_LAX = 1 << 0 ///< Tolerate invalid input where possible + SERD_READ_LAX = 1 << 0, ///< Tolerate invalid input where possible + SERD_READ_VARIABLES = 1 << 1 ///< Support variable nodes } SerdReaderFlag; /// Bitwise OR of SerdReaderFlag values |