Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
Bit of a weird situation this one, since the rule is from NTriples but serd
doesn't actually use it in the NTriples parser (since it uses a stricter one
instead). Still, I think it makes sense here, and in practice, makes for a
more sensible inlining situation.
|
|
[WIP] Broken on 32-bit
This makes the reader stack manipulations stricter, to make the code more
regular and avoid redundant work and bad cache activity. Now, functions that
push node headers and their bodies are responsible for (more or less)
immediately pushing any trailing null bytes required for termination and
alignment.
This makes the writes to the node in the stack more local, ensures nodes are
terminated as early as possible (to reduce the risk of using non-terminated
strings), and avoids the need to calculate aligned stack allocations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
This reduces the stack space requirements for every type statement, at the cost
of adding a bit of constant bloat for the node in documents that do not contain
it.
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
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.
|
|
[WIP] Testing?
|
|
|
|
|
|
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.
|
|
Writing having side-effects seems questionable in general, and this prepares
things for expanding URIs in the reader.
|
|
|
|
This allows a precise location to be reported for errors within literals, by
adding the offset of the error in the literal to the caret. This will be used
to report nice errors for things like regular expressions and supported XSD
datatypes.
|
|
|
|
[WIP] Untested
|
|
[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.
|
|
This is more powerful, and reduces the number of command line options that
almost nobody needs to care about.
|
|
This separates the command-line tool code from the library implementation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is generally more convenient, and the node was just being copied anyway.
|
|
|