aboutsummaryrefslogtreecommitdiffstats
path: root/src/n3.c
AgeCommit message (Collapse)AuthorFilesLines
2020-10-27Add support for parsing variablesDavid Robillard1-6/+68
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.
2020-10-27Avoid use of ctype.h macros entirelyDavid Robillard1-2/+1
Some of these cause warnings, and should never have been used in the first place since they depend on locale.
2020-10-27Move MIN macro to int_math.hDavid Robillard1-1/+1
2020-10-27Support reading lone lists in lax modeDavid Robillard1-1/+1
This allows parsing documents like "(42) ."
2020-10-27Fix various warnings and conversion issuesDavid Robillard1-2/+2
2020-10-27Handle read errors more preciselyDavid Robillard1-22/+17
2020-10-27Use public sink interface in readerDavid Robillard1-12/+9
2020-10-27Use simpler names for statement flagsDavid Robillard1-4/+4
2020-10-27Simplify 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-10-27Make SerdSink opaqueDavid Robillard1-0/+1
2020-10-27Improve reader error handlingDavid Robillard1-33/+38
2020-10-27Remove unnecessary parameterDavid Robillard1-8/+8
2020-10-27Set flags directly when reading literal nodesDavid Robillard1-51/+32
2020-10-27Zero node padding before passing to reader sinksDavid Robillard1-2/+5
2020-10-27Remove datatype and language from reader contextDavid Robillard1-24/+14
2020-10-27Simplify stack management by popping in bulk at higher levelsDavid Robillard1-54/+31
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-10-27Use a fixed-size reader stackDavid Robillard1-112/+125
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-10-27Add SerdSink interface and hide individual function implementationsDavid Robillard1-8/+8
2020-10-27Merge datatype and/or language into nodeDavid Robillard1-8/+18
This moves closer to the sord API, and is more convenient in most cases.
2020-10-27Simplify reader interfaceDavid Robillard1-2/+3
2020-10-27Use opaque node APIDavid Robillard1-11/+17
2020-10-27Use char* for strings in public APIDavid Robillard1-2/+2
The constant casting just makes user code a mess, for no benefit.
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.
2020-08-15Clean up reader error handlingDavid Robillard1-279/+319
2020-08-15Make read_String() return a statusDavid Robillard1-42/+47
2020-08-15Make read_IRIREF_scheme() return a statusDavid Robillard1-15/+11
2020-08-15Make r_err() return a statusDavid Robillard1-52/+74
2020-08-15Make read_PrefixedName() return a statusDavid Robillard1-12/+17
2020-08-15Make read_PERCENT() return a statusDavid Robillard1-8/+4
2020-08-15Make read_UCHAR() and read_ECHAR() return a statusDavid Robillard1-21/+21
2020-08-15Exploit push_byte return statusDavid Robillard1-2/+1
2020-08-15Harden prefixed name parsingDavid Robillard1-9/+39
2020-08-14Clean up and separate internal headersDavid Robillard1-1/+5
2020-07-06Fix spurious semicolon warningsDavid Robillard1-2/+2
2020-07-06Fix format conversion warningsDavid Robillard1-3/+6
2020-07-05Remove unreachable codeDavid Robillard1-3/+2
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