aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2022-01-28Make blank node prefixing automaticDavid Robillard1-25/+0
Though potentially useful, I don't think the complexity cost of the old interface (both to the implementation and to the user) is worth it. A special tool to transform blank node labels (for example with regular expressions) would be a better approach to this if it's ever needed in the future.
2022-01-28Split SERD_READ_VERBATIM into two more precise flagsDavid Robillard1-11/+20
Although the "verbatim" idea is nice and simple, more fine-grained control is necessary since these features (relative URI preservation and blank node label clash avoidance) are useful in different situations.
2022-01-28Add a reader flag to disable generated blank label avoidanceDavid Robillard1-0/+15
2022-01-28Add a close function to SerdByteSinkDavid Robillard1-4/+8
This simplifies everything by replacing special cases with a more general close function. A type is no longer stored in the structure, so the other constructors are now essentially syntactic sugar for the universal serd_byte_sink_new_function().
2022-01-28Expose serd_strncasecmp in public APIDavid Robillard1-0/+12
2022-01-28Preserve anonymous graph syntax in TriGDavid Robillard1-6/+7
2022-01-28Add version constants to public headerDavid Robillard1-0/+23
2022-01-28Make serd_writer_set_root_uri() take a string viewDavid Robillard1-2/+1
This is generally more convenient, and the node was just being copied anyway.
2022-01-28Simplify reader and writer flagsDavid Robillard1-9/+84
2022-01-14Add statement filteringDavid Robillard1-0/+35
2022-01-14Add support for converting literals to canonical formDavid Robillard1-0/+27
2022-01-14Add modelDavid Robillard1-1/+408
2022-01-14Avoid dynamic allocation when fetching interned nodesDavid Robillard1-14/+79
This is more or less a total rewrite of SerdNodes and the underlying ZixHash to make efficient use of the new node construction API.
2022-01-14Make StringView buffer non-nullableDavid Robillard1-2/+2
2022-01-14Expose low-level node construction APIDavid Robillard1-65/+322
2022-01-14Rename serd_new_simple_node() to serd_new_token()David Robillard1-5/+10
Things get confusing without a term for this concept (which is roughly "nodes that are not annoying to construct"), so "token" it is.
2022-01-14Preserve long or short quoting from input documentsDavid Robillard1-50/+45
2022-01-14Factor out serd_write_file_uri()David Robillard1-2/+25
2022-01-14Add serd_statement_matches()David Robillard1-0/+14
2022-01-14Add serd_node_compare()David Robillard1-0/+15
2022-01-14Add serd_node_from_syntax() and serd_node_to_syntax()David Robillard1-0/+48
2022-01-14Remove SERD_CURIE node datatype entirelyDavid Robillard1-34/+36
2022-01-14Expand URIs in readerDavid Robillard1-0/+3
This expands relative and prefixed URIs in the reader on the stack, rather than passing them to the caller to be dealt with. This pushes these context-full forms to the edge of the system as much as possible to minimise the headaches they can cause. Towards having stricter guarantees about nodes and eliminating the CURIE node type altogether.
2022-01-14Move SerdEnv mutation from writer to readerDavid Robillard1-5/+6
Writing having side-effects seems questionable in general, and this prepares things for expanding URIs in the reader.
2022-01-14Add extensible logging APIDavid Robillard1-23/+193
2022-01-13Add SERD_READ_EXACT_BLANKS flagDavid Robillard1-2/+3
This allows suppressing the blank node ID clashing mechanism to read blank IDs exactly as they appear in the input, even if they match the scheme used to generate blank node IDs internally.
2022-01-13Add support for parsing variablesDavid Robillard1-3/+14
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.
2022-01-13Make Reader always read from a ByteSourceDavid Robillard1-35/+86
2022-01-13Add serd_canonical_path()David Robillard1-0/+13
2022-01-13Make serd_uri_string_length() precise and add it to public APIDavid Robillard1-1/+15
2022-01-13Replace serd_reader_set_strict() with SerdReaderFlagsDavid Robillard1-11/+9
2022-01-13Handle read errors more preciselyDavid Robillard1-0/+1
2022-01-13Add serd_env_copy() and serd_env_equals()David Robillard1-0/+10
2022-01-13Make Writer always write to a ByteSinkDavid Robillard1-46/+72
2022-01-13Move I/O function prototypes to their own sectionDavid Robillard1-4/+10
2022-01-13Add empty syntax type for suppressing outputDavid Robillard1-8/+14
2022-01-13Replace SERD_WRITE_STRICT flag with SERD_WRITE_LAXDavid Robillard1-1/+1
The unset value for flags should represent the best default, which in this case is strict parsing. Lax parsing is the riskier opt-in option.
2022-01-13Improve writer error handlingDavid Robillard1-1/+4
2022-01-13Add support for writing terse collectionsDavid Robillard1-1/+3
2022-01-13Add option for writing terse output without newlinesDavid Robillard1-1/+2
2022-01-13Simplify streaming API and improve pretty printingDavid Robillard1-8/+5
This removes the obligation from the caller to correctly maintain flags to describe the current anonymous context, instead making the writer handle this itself as much as possible. Flags remain for the cases the writer can not infer from context: the start of anonymous subject and object nodes.
2022-01-13Simplify SerdEnv APIDavid Robillard1-18/+8
2022-01-13Separate ByteSink from writerDavid Robillard1-4/+3
2022-01-13Expose SerdByteSink in public APIDavid Robillard1-0/+38
2022-01-13Simplify writer style optionsDavid Robillard1-5/+4
2022-01-13Replace multiple stream callbacks with SerdEventDavid Robillard1-52/+67
This makes plumbing easier since everything goes through the same "stream" and only one callback is required to handling everything. It's also more easily extensible in case more event types need to be added in the future.
2022-01-13Cache commonly used nodes in the worldDavid Robillard1-0/+11
2022-01-13Add SerdNodes for storing a cache of interned nodesDavid Robillard1-0/+139
2022-01-13Add SerdStatementDavid Robillard1-6/+89
2022-01-13Add SerdCaretDavid Robillard1-9/+70