aboutsummaryrefslogtreecommitdiffstats
path: root/src/n3.c
AgeCommit message (Collapse)AuthorFilesLines
2023-12-02Improve reader error handlingDavid Robillard1-129/+152
2023-12-02Set flags directly when reading literal nodesDavid Robillard1-64/+43
2023-12-02Zero node padding before passing to reader sinksDavid Robillard1-1/+4
2023-12-02Remove datatype and language from reader contextDavid Robillard1-38/+32
2023-12-02Simplify stack management by popping in bulk at higher levelsDavid Robillard1-74/+37
Since all memory used by the reader is POD in the stack, there is no benefit to forcing code to explicitly pop everything pushed to the stack, since any function can record an offset and pop back down to it regardless of what its callers pushed if it knows that it does not need those items. This is slightly more efficient (due to avoiding many pop calls), but also more resilient since "leaks" at deeper levels of recursion get nuked by some caller regardless of what was pushed. This should help prevent future regressions like f6437f606 (Fix memory consumption when reading documents).
2023-12-02Use a fixed-size reader stackDavid Robillard1-116/+145
2023-12-02Add SerdSink interface and hide implementationsDavid Robillard1-11/+5
2023-12-02Merge datatype/language into nodeDavid Robillard1-14/+19
This moves closer to the sord API, and is more convenient in most cases.
2023-12-02Make nodes opaqueDavid Robillard1-16/+19
2023-12-02Use more human-readable status codesDavid Robillard1-81/+73
2023-12-02Split up public API headerDavid Robillard1-1/+5
2023-12-02Rename function types for consistencyDavid Robillard1-6/+6
2023-12-02Use char* for strings in public APIDavid Robillard1-7/+5
The constant casting just makes user code a mess, for no benefit.
2023-12-02Remove support for reading Turtle named inline nodes extensionDavid Robillard1-20/+0
2023-09-22Remove unused includeDavid Robillard1-1/+0
2023-05-08Avoid use of strtoul()David Robillard1-7/+7
This function is overkill for the simple cases actually needed here, and pretty slow anyway.
2023-05-03Make serd_reader_read_chunk() work with NQuadsDavid Robillard1-1/+1
2023-05-03Factor out read_nquads_statement()David Robillard1-42/+54
2023-04-16Gracefully handle errors when writing textDavid Robillard1-15/+14
2023-04-06Clean up error handling and use TRY macros more broadlyDavid Robillard1-29/+35
2023-04-06Improve pretty-printing of lists and inline subjectsDavid Robillard1-9/+14
2023-04-06Gracefully handle boolean subject and predicate errorsDavid Robillard1-0/+3
2023-04-05Improve writer error handlingDavid Robillard1-7/+1
2023-04-05Use conventional status variable nameDavid Robillard1-17/+17
2023-03-31Fix incorrect parsing of strange quote escape patternsDavid Robillard1-3/+9
2023-03-31Factor out read_string_escape()David Robillard1-11/+20
2022-12-20Avoid using ASCII grave as a quoteDavid Robillard1-15/+15
2022-12-09Add serd_reader_skip_until_byte() to public APIDavid Robillard1-4/+9
2022-11-25Always handle the return value of eat_byte_safe()David Robillard1-54/+40
2022-11-24Gracefully handle bad characters in Turtle blank node syntaxDavid Robillard1-1/+3
2022-11-24Gracefully handle bad characters in Turtle datatype syntaxDavid Robillard1-2/+5
2022-11-24Avoid redundant comparisonDavid Robillard1-1/+1
2022-11-24Simplify error handling logicDavid Robillard1-6/+5
2022-10-23Fix hang when skipping an error at EOF when lax parsingDavid Robillard1-1/+1
2022-10-23Use uppercase integer literal suffixesDavid Robillard1-3/+3
2022-08-31Adopt REUSE machine-readable licensing standardDavid Robillard1-15/+2
2022-06-10Fix memory consumption when reading documentsDavid Robillard1-1/+13
2021-05-31Make most function parameters constDavid Robillard1-69/+102
More const never hurts in general, but in particular this allows the compiler to make better nullability deductions, which reduces the amount of manual nullability casting required.
2021-05-31Remove "static inline" for functions in implementation filesDavid Robillard1-12/+12
This is just noise since these are static functions local to a C compilation unit.
2021-05-31Fix unannotated switch fallthroughsDavid Robillard1-4/+19
Unfortunately, clang does not support doing this with comments, requiring yet more preprocessor gunk.
2021-05-31Fix some conversion warningsDavid Robillard1-2/+2
2021-05-16Avoid else after breakDavid Robillard1-3/+3
2021-04-09Write statements with invalid URI characters in lax modeDavid Robillard1-9/+9
2021-01-02Use email address instead of website for attributionDavid Robillard1-1/+1
2020-12-31Format all code with clang-formatDavid Robillard1-1295/+1373
2020-12-31Avoid "else" after "break" and "return"David Robillard1-13/+33
2020-11-13Improve IRI reading performanceDavid Robillard1-10/+13
This allows the compiler to construct a jump table, and avoids a branch.
2020-11-13Remove use of C character class functions that may use localeDavid Robillard1-2/+1
Some of these cause warnings, and should never have been used in the first place since they depend on locale.
2020-08-16Fix handling of bad syntax that ends a collectionDavid Robillard1-1/+2
2020-08-16Fix EOF and null byte handlingDavid Robillard1-3/+6
This is a bit questionable, but the null byte support is needed for streaming over a socket where some delimiter is required. This caused a bug where serdi would hang forever on corrupt files that contain a null byte. Fix this by consuming the byte, but otherwise behaving as before.