aboutsummaryrefslogtreecommitdiffstats
path: root/src/n3.c
AgeCommit message (Collapse)AuthorFilesLines
2020-06-21Add option for writing terse output without newlinesDavid Robillard1-1/+1
2020-06-21Support reading lone lists in lax modeDavid Robillard1-1/+1
This allows parsing documents like "(42) ."
2020-06-21Fix various warnings and conversion issuesDavid Robillard1-2/+2
2020-06-21Remove reader status and handle errors more preciselyDavid Robillard1-27/+23
2020-06-21Add Env to SinkDavid Robillard1-12/+8
This isn't technically necessary for any sink, but is a pattern common to every sink implementation in serd, so having it here reduces boilerplate and parameters in user code.
2020-06-21Use simpler names for statement flagsDavid Robillard1-4/+4
2020-06-21Simplify streaming API and improve pretty printingDavid Robillard1-15/+10
This removes the obligation from the caller to correctly maintain flags to describe the current anonymous context, instead making the writer handle this itself as much as possible. Flags remain for the cases the writer can not infer from context: the start of anonymous subject and object nodes.
2020-06-21Make reader return failure when no statement is readDavid Robillard1-1/+1
2020-06-21Fix warningsDavid Robillard1-3/+2
2020-06-21Make SerdSink opaqueDavid Robillard1-0/+1
2020-06-21Clean up reader error handlingDavid Robillard1-322/+349
2020-06-21Zero node padding before passing to reader sinksDavid Robillard1-3/+6
2020-06-21Remove datatype and language from reader contextDavid Robillard1-28/+17
2020-06-21Simplify stack management by popping in bulk at higher levelsDavid Robillard1-60/+50
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.
2020-06-21Use a fixed-size reader stackDavid Robillard1-154/+182
This improves performance, and makes the reader more suitable for embedded or network-facing applications, at the cost of requiring the user to specify a maximum stack size.
2020-06-21Add SerdSink interface and hide individual function implementationsDavid Robillard1-8/+8
2020-06-21Clean up and separate internal headersDavid Robillard1-1/+6
2020-06-21Merge datatype and/or language into nodeDavid Robillard1-8/+15
This moves closer to the sord API, and is more convenient in most cases.
2020-06-21Simplify reader interfaceDavid Robillard1-12/+16
2020-06-21Use opaque node APIDavid Robillard1-12/+16
2020-06-21Use char* for strings in public APIDavid Robillard1-2/+2
The constant casting just makes user code a mess, for no benefit.
2020-06-21Cleanup: Add missing default switch casesDavid Robillard1-0/+7
2020-06-21Cleanup: Fix uninitialised variablesDavid Robillard1-19/+19
2020-06-21Cleanup: Remove unnecessary storesDavid Robillard1-1/+1
2020-06-21Clean up includesDavid Robillard1-4/+5
2019-10-27Fix EOF handling while reading in bulk or from stringsDavid Robillard1-15/+23
2019-10-27Use int as internal character type so it can represent EOFDavid Robillard1-62/+69
2019-10-27Fix integer conversion warningsDavid Robillard1-8/+9
2019-10-27Fix lax handling of string errors and add separate lax test suiteDavid Robillard1-10/+13
2019-04-20Fix incorrect print format argumentsDavid Robillard1-2/+4
2019-03-30Fix parsing "a" abbreviation without padding whitespaceDavid Robillard1-13/+2
2019-03-17Fix bug parsing TriG graphs with several squashed trailing dotsDavid Robillard1-2/+2
2019-01-05Rewrite switch statements that are better written as ifsDavid Robillard1-18/+14
2019-01-05Fix potential use of uninitialised dataDavid Robillard1-1/+1
2019-01-05Fix unused parameter warningsDavid Robillard1-2/+2
2018-11-11Fix missing parse error messagesDavid Robillard1-1/+4
2018-10-03Fix colliding blank nodes when parsing TriGDavid Robillard1-1/+1
2018-09-16Use strtoul instead of sscanf for converting hexDavid Robillard1-2/+3
2018-09-04Fix fallthrough warnings with GCC8David Robillard1-0/+3
2018-05-25Fix reported error when reading statements with only a blank nodeDavid Robillard1-1/+1
2018-04-19Fix growing stack when parsing TriG files with many graphsDavid Robillard1-0/+3
2018-04-18Fix potential memory errors when the reader stack growsDavid Robillard1-2/+3
This fixes possible segfaults for inputs that push a lot to the stack, like files with deeply nested or very large nodes.
2018-03-08Fix parsing local names that end with escaped dotsDavid Robillard1-3/+5
2018-03-08Fix comment typoDavid Robillard1-1/+1
2018-02-04Factor out syntax-specific reader implementationDavid Robillard1-0/+1490