Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2023-12-02 | Use ZixAllocator directly | David Robillard | 15 | -184/+56 | |
2023-12-02 | Use ZixStringView directly | David Robillard | 7 | -125/+44 | |
2023-12-02 | Use SerdNodes instead of manual memory management in tests | David Robillard | 1 | -0/+10 | |
2023-12-02 | Add "contextual" output option | David Robillard | 1 | -0/+9 | |
This is mainly for developer or power-user cases, where one wants to look at some data for investigation or debugging. In such cases, it's common for the set of prefixes to be implicitly known (because they are baked in to the application, for example), so printing them just produces a large amount of redundant noise. That said, it can also be useful programmatically, because it allows several snippets to be written independently and ultimately concatenated (with a header to define the prefixes) without redundancy. | |||||
2023-12-02 | Add SERD_READ_ORDERED to preserve blank node ordering in models | David Robillard | 1 | -0/+10 | |
2023-12-02 | Add model and serd-sort utility | David Robillard | 6 | -0/+515 | |
With all the new functionality, the complexity of the serd-pipe command-line interface is starting to push the limits of available flags. So, instead of grafting on further options to control a model, this commit adds a new tool, serd-sort, which acts somewhat like a stripped-down serd-pipe that stores statements in a model in memory. This keeps the complexity (including the user-facing complexity) of any one tool down, since other more focused tools can be used for streaming tasks in a pipeline. In other words, abandon Swissarmyknifeism, take a page from the Unix philosophy, and try to expose the model functionality to the command-line in a dedicated focused tool. The model implementation is tested by using this tool to run a subset of the usual test suites, and a special suite to test statement sorting. | |||||
2023-12-02 | Add statement filter sink and serd-filter tool | David Robillard | 3 | -0/+62 | |
2023-12-02 | Add "longhand" mode to write rdf:type predicates normally | David Robillard | 1 | -0/+7 | |
2023-12-02 | Add serd_node_from_syntax() and serd_node_to_syntax() | David Robillard | 2 | -0/+85 | |
2023-12-02 | Cache commonly used nodes in the world | David Robillard | 1 | -0/+11 | |
2023-12-02 | Add SerdNodes for storing a cache of interned nodes | David Robillard | 3 | -1/+100 | |
2023-12-02 | Make blank node prefixing automatic | David Robillard | 2 | -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-02 | Split SERD_READ_VERBATIM into two more precise flags | David Robillard | 1 | -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-02 | Add a reader flag to disable generated blank label avoidance | David Robillard | 1 | -0/+15 | |
2023-12-02 | [WIP] Add support for converting literals to canonical form | David Robillard | 2 | -0/+48 | |
2023-12-02 | [WIP] Generalize node construction API | David Robillard | 4 | -150/+419 | |
2023-12-02 | Add support for custom allocators | David Robillard | 9 | -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 flags | David Robillard | 2 | -9/+81 | |
[WIP] Testing? | |||||
2023-12-02 | [WIP] Remove SERD_CURIE node datatype entirely | David Robillard | 2 | -26/+29 | |
2023-12-02 | [WIP] Expand URIs in reader | David Robillard | 1 | -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 reader | David Robillard | 2 | -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 documents | David Robillard | 2 | -27/+22 | |
2023-12-02 | [WIP] Add extensible logging API | David Robillard | 4 | -58/+210 | |
2023-12-02 | [WIP] Preserve anonymous graph syntax in TriG | David Robillard | 1 | -6/+7 | |
[WIP] Untested | |||||
2023-12-02 | [WIP] Add support for reading and writing variables | David Robillard | 2 | -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-02 | Remove datatype arguments from integer and base64 constructors | David Robillard | 1 | -6/+2 | |
2023-12-02 | Simplify output stream API | David Robillard | 5 | -31/+108 | |
2023-12-02 | Simplify input stream API | David Robillard | 4 | -24/+136 | |
2023-12-02 | Rename SerdErrorFunc to SerdLogFunc | David Robillard | 2 | -6/+6 | |
2023-12-02 | Make serd_writer_set_root_uri() take a string view | David Robillard | 1 | -3/+2 | |
This is generally more convenient, and the node was just being copied anyway. | |||||
2023-12-02 | Make SerdBuffer an output stream | David Robillard | 1 | -14/+19 | |
2023-12-02 | Factor out and expose serd_write_file_uri() | David Robillard | 11 | -11/+27 | |
2023-12-02 | Separate Turtle and TriG reading code | David Robillard | 1 | -1/+1 | |
2023-12-02 | Use Zix attributes directly | David Robillard | 19 | -274/+288 | |
2023-12-02 | Add serd_env_copy() and serd_env_equals() | David Robillard | 1 | -0/+10 | |
2023-12-02 | Simplify SerdEnv API | David Robillard | 1 | -15/+13 | |
2023-12-02 | Make serd_uri_string_length() precise and add it to public API | David Robillard | 1 | -1/+14 | |
2023-12-02 | Replace serd_reader_set_strict() with SerdReaderFlags | David Robillard | 1 | -10/+9 | |
2023-12-02 | Add empty syntax type for suppressing output | David Robillard | 1 | -6/+9 | |
2023-12-02 | Use a simple type-safe stack in writer | David Robillard | 1 | -0/+1 | |
2023-12-02 | Add a set of limits to the world | David Robillard | 2 | -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-02 | Replace SERD_WRITE_STRICT flag with SERD_WRITE_LAX | David Robillard | 1 | -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-02 | Add support for writing terse output with minimal newlines | David Robillard | 2 | -0/+3 | |
2023-12-02 | Simplify statement flags | David Robillard | 1 | -8/+6 | |
2023-12-02 | Replace multiple stream callbacks with SerdEvent | David Robillard | 6 | -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-02 | Simplify writer style options and write UTF-8 by default | David Robillard | 1 | -6/+5 | |
2023-12-02 | Add SerdStatement | David Robillard | 2 | -6/+93 | |
2023-12-02 | Add SerdCaret | David Robillard | 4 | -9/+88 | |
2023-12-02 | Add SerdField to public API | David Robillard | 1 | -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-02 | Add serd_world_get_blank() | David Robillard | 1 | -0/+10 | |