aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.c
AgeCommit message (Collapse)AuthorFilesLines
2019-04-13Make reader tolerant of being started several timesDavid Robillard1-0/+4
2019-04-13Remove pointless switch statementDavid Robillard1-3/+1
2019-04-13Fix MSVC warnings about integer literal conversionsDavid Robillard1-1/+1
2019-04-13Fix integer conversion warningsDavid Robillard1-1/+2
2019-04-13Remove reader status and handle errors more preciselyDavid Robillard1-7/+6
2019-04-13Add Env to SinkDavid Robillard1-6/+3
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.
2019-04-13Rename SerdType to SerdNodeTypeDavid Robillard1-2/+5
The old name has become ambiguous with the expanded scope of serd.
2019-04-13Rename SerdError to SerdMessageDavid Robillard1-2/+4
Towards more general usage for all types of logging.
2019-04-13Simplify streaming API and improve pretty printingDavid Robillard1-1/+1
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.
2019-04-13Remove serd_reader_set_default_graph()David Robillard1-12/+0
2019-04-13Automatically finish reader on destructionDavid Robillard1-0/+1
2019-04-13Make SerdSink opaqueDavid Robillard1-0/+1
2019-04-13Add cursor to statementDavid Robillard1-1/+2
This allows the file and position of statements to be used in sinks, for example for more helpful error reporting outside the parser.
2019-04-13Add SerdCursor to public APIDavid Robillard1-7/+11
2019-04-13Make statement sink take a statement rather than nodesDavid Robillard1-2/+6
This makes the interface more extensible, towards associating more information with statements. The serd_sink_write_nodes wrapper remains so that user code does not need to allocate in order to write statement.
2019-04-13Clean up reader error handlingDavid Robillard1-11/+12
2019-04-13Zero node padding before passing to reader sinksDavid Robillard1-0/+5
2019-04-13Simplify stack management by popping in bulk at higher levelsDavid Robillard1-19/+8
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.
2019-04-13Use a fixed-size reader stackDavid Robillard1-27/+29
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.
2019-04-13Clean up includes and improve source file separationDavid Robillard1-6/+9
2019-04-13Move system utilities to separate source filesDavid Robillard1-0/+2
2019-04-13Hide fopen wrapper and use reader interface consistentlyDavid Robillard1-44/+26
2019-04-13Move error handling to worldDavid Robillard1-1/+1
2019-04-13Add SerdWorld for shared library stateDavid Robillard1-11/+3
2019-04-13Add SerdSink interface and hide individual function implementationsDavid Robillard1-31/+12
2019-04-13Bring read/write interface closer to C standardDavid Robillard1-2/+2
2019-04-13Clean up and separate internal headersDavid Robillard1-0/+2
2019-04-13Merge datatype and/or language into nodeDavid Robillard1-2/+2
This moves closer to the sord API, and is more convenient in most cases.
2019-04-13Simplify reader interfaceDavid Robillard1-79/+37
2019-04-13Make nodes opaqueDavid Robillard1-14/+8
2019-04-13Make serd_strtod API const-correctDavid Robillard1-1/+1
This is an API breakage, but a minor one (particularly since NULL is allowed) that avoids the flaw in the C API.
2019-04-13Use char* for strings in public APIDavid Robillard1-25/+25
The constant casting just makes user code a mess, for no benefit.
2019-04-13Remove useless character countingDavid Robillard1-2/+2
2019-01-05Fix unused parameter warningsDavid Robillard1-0/+3
2018-07-22Add serd_free for freeing memory allocated by serdDavid Robillard1-1/+1
2018-06-15Remove redundant SERD_API declarationsDavid Robillard1-15/+0
2018-06-10Fix byte source to never read past end of stringsDavid Robillard1-8/+4
2018-02-04Factor out syntax-specific reader implementationDavid Robillard1-1601/+37
2018-02-04Factor out is_xdigitDavid Robillard1-5/+4
2018-01-04Open files in binary mode to preserve line endings on WindowsDavid Robillard1-1/+1
2017-11-05Move cursor from reader to byte sourceDavid Robillard1-25/+3
2017-11-05Move EOF flag from reader to byte sourceDavid Robillard1-11/+8
2017-11-05Factor out namespace definesDavid Robillard1-3/+0
2017-11-05Remove unused typedefDavid Robillard1-2/+0
2017-11-05Reset status when skipping lines for lax parsingDavid Robillard1-1/+1
2017-11-05Make reader strict by defaultDavid Robillard1-0/+1
2017-09-24Don't smash error status when lax parsingDavid Robillard1-1/+4
2017-09-24Report error on unexpected object endDavid Robillard1-4/+2
2017-09-24Make serdi syntax options case-insensitiveDavid Robillard1-8/+1
2017-09-23Add basic error tolerant parsing for line-based formatsDavid Robillard1-1/+15