aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd
AgeCommit message (Collapse)AuthorFilesLines
2023-12-02Make blank node prefixing automaticDavid Robillard2-23/+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.
2023-12-02Split SERD_READ_VERBATIM into two more precise flagsDavid Robillard1-10/+19
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.
2023-12-02Add a reader flag to disable generated blank label avoidanceDavid Robillard1-0/+15
2023-12-02[WIP] Add support for converting literals to canonical formDavid Robillard2-0/+48
2023-12-02[WIP] Generalize node construction APIDavid Robillard4-150/+419
2023-12-02Add support for custom allocatorsDavid Robillard9-38/+182
This makes it explicit in the API where memory is allocated, and allows the user to provide a custom allocator to avoid the use of the default system allocator for whatever reason.
2023-12-02[WIP] Simplify reader and writer flagsDavid Robillard2-9/+81
[WIP] Testing?
2023-12-02[WIP] Remove SERD_CURIE node datatype entirelyDavid Robillard2-26/+29
2023-12-02[WIP] Expand URIs in readerDavid Robillard1-0/+2
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.
2023-12-02[WIP] Move SerdEnv mutation from writer to readerDavid Robillard2-1/+3
Writing having side-effects seems questionable in general, and this prepares things for expanding URIs in the reader.
2023-12-02[WIP] Preserve long or short quoting from input documentsDavid Robillard2-27/+22
2023-12-02[WIP] Add extensible logging APIDavid Robillard4-58/+210
2023-12-02[WIP] Preserve anonymous graph syntax in TriGDavid Robillard1-6/+7
[WIP] Untested
2023-12-02[WIP] Add support for reading and writing variablesDavid Robillard2-4/+23
[WIP] Command line option, move later? 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.
2023-12-02Remove datatype arguments from integer and base64 constructorsDavid Robillard1-6/+2
2023-12-02Simplify output stream APIDavid Robillard5-31/+108
2023-12-02Simplify input stream APIDavid Robillard4-24/+136
2023-12-02Rename SerdErrorFunc to SerdLogFuncDavid Robillard2-6/+6
2023-12-02Make serd_writer_set_root_uri() take a string viewDavid Robillard1-3/+2
This is generally more convenient, and the node was just being copied anyway.
2023-12-02Make SerdBuffer an output streamDavid Robillard1-14/+19
2023-12-02Factor out and expose serd_write_file_uri()David Robillard11-11/+27
2023-12-02Separate Turtle and TriG reading codeDavid Robillard1-1/+1
2023-12-02Use Zix attributes directlyDavid Robillard19-274/+288
2023-12-02Add serd_env_copy() and serd_env_equals()David Robillard1-0/+10
2023-12-02Simplify SerdEnv APIDavid Robillard1-15/+13
2023-12-02Make serd_uri_string_length() precise and add it to public APIDavid Robillard1-1/+14
2023-12-02Replace serd_reader_set_strict() with SerdReaderFlagsDavid Robillard1-10/+9
2023-12-02Add empty syntax type for suppressing outputDavid Robillard1-6/+9
2023-12-02Use a simple type-safe stack in writerDavid Robillard1-0/+1
2023-12-02Add a set of limits to the worldDavid Robillard2-2/+30
The idea here is to remove the burden of passing things around like stack sizes (where most users don't care and will be happy with a reasonably large default) and keeping the call sites to things like serd_reader_new() clean. The cost is a bit more state, so it's both more powerful and more potentially flaky, since changing the limits has action at a distance that isn't clear from the call site. I think it's worth it for the cleaner API in the common case, and the much better forward compatibility.
2023-12-02Replace 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.
2023-12-02Add support for writing terse output with minimal newlinesDavid Robillard2-0/+3
2023-12-02Simplify statement flagsDavid Robillard1-8/+6
2023-12-02Replace multiple stream callbacks with SerdEventDavid Robillard6-37/+113
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.
2023-12-02Simplify writer style options and write UTF-8 by defaultDavid Robillard1-6/+5
2023-12-02Add SerdStatementDavid Robillard2-6/+93
2023-12-02Add SerdCaretDavid Robillard4-9/+88
2023-12-02Add SerdField to public APIDavid Robillard1-0/+8
A statement field enum was previously only used by the writer internally, but will be used in the public API (without a sentinel value) in following commits.
2023-12-02Add serd_world_get_blank()David Robillard1-0/+10
2023-12-02Remove serd_reader_set_default_graph()David Robillard1-12/+0
2023-12-02Add SerdWorld for shared library stateDavid Robillard5-26/+61
2023-12-02Add serd_node_compare()David Robillard1-0/+13
2023-12-02Clean up base64 node construction and access APIDavid Robillard3-0/+83
2023-12-02Clean up numeric node construction and access APIDavid Robillard2-11/+69
2023-12-02[WIP] Use exess for reading and writing numeric and binary literalsDavid Robillard2-26/+21
2023-12-02Move syntax name/extension utilities to public APIDavid Robillard1-5/+33
2023-12-02Use a fixed-size reader stackDavid Robillard1-1/+3
2023-12-02Simplify reader interfaceDavid Robillard1-45/+35
2023-12-02Add SerdSink interface and hide implementationsDavid Robillard3-47/+73
2023-12-02Bring read/write interface closer to the C standardDavid Robillard5-38/+39