aboutsummaryrefslogtreecommitdiffstats
path: root/src/read_turtle.c
AgeCommit message (Collapse)AuthorFilesLines
2023-12-02[WIP] Tighten up reader node managementDavid Robillard1-49/+58
[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.
2023-12-02Use ZixStringView directlyDavid Robillard1-8/+8
2023-12-02Reuse the same rdf:type node for all "a" abbreviationsDavid Robillard1-3/+2
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.
2023-12-02Split SERD_READ_VERBATIM into two more precise flagsDavid Robillard1-1/+1
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[WIP] Generalize node construction APIDavid Robillard1-1/+1
2023-12-02[WIP] Simplify reader and writer flagsDavid Robillard1-1/+1
[WIP] Testing?
2023-12-02[WIP] Remove SERD_CURIE node datatype entirelyDavid Robillard1-4/+6
2023-12-02[WIP] Expand URIs in readerDavid Robillard1-13/+106
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 Robillard1-0/+7
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 Robillard1-1/+3
2023-12-02Leave statement caret at the start of literalsDavid Robillard1-1/+4
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.
2023-12-02[WIP] Add support for reading and writing variablesDavid Robillard1-2/+15
[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-02Simplify input stream APIDavid Robillard1-2/+2
2023-12-02Simplify reading code with TRY_LAX macroDavid Robillard1-14/+14
2023-12-02Separate Turtle and TriG reading codeDavid Robillard1-0/+1038