aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
AgeCommit message (Collapse)AuthorFilesLines
2020-10-27WIP: Add serd_node_from_syntax() and serd_node_to_syntax()David Robillard1-0/+8
2020-10-27WIP: Make Writer always write to a ByteSinkDavid Robillard1-16/+16
2020-10-27Refuse to write relative URIRefs to NTriplesDavid Robillard1-0/+15
2020-10-27Simplify abbreviated URI writing codeDavid Robillard1-15/+17
2020-10-27Use a manual type-safe stack in SerdWriterDavid Robillard1-27/+27
This fixes alignment issues on ARM. Since this stack is just for WriteContext which has a fixed size, using SerdStack here just made things more confusing anyway.
2020-10-27Add support for parsing variablesDavid Robillard1-0/+14
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-27Fix memory leak in writer when caller doesn't clean up the stackDavid Robillard1-0/+5
2020-10-27Improve writer packingDavid Robillard1-1/+1
2020-10-27Replace multiple stream callbacks with SerdEventDavid Robillard1-5/+23
This makes plumbing easier since everything goes through the same "stream" and only one callback is required to handling everything. It's also more easily extensible in case more event types need to be added in the future.
2020-10-27Move MIN macro to int_math.hDavid Robillard1-1/+1
2020-10-27Add empty syntax type for suppressing outputDavid Robillard1-3/+8
2020-10-27Improve add and chop prefix functions when given empty stringsDavid Robillard1-4/+5
2020-10-27Replace serd_reader_set_strict() with SerdReaderFlagsDavid Robillard1-3/+3
This makes reader options extensible and should hopefully prevent the need for grafting on more similar functions in the future.
2020-10-27Report writer errors and add strict write modeDavid Robillard1-172/+225
2020-10-27Align nodes with posix_memalign if possibleDavid Robillard1-1/+1
2020-10-27Add support for writing terse collectionsDavid Robillard1-12/+23
2020-10-27Tolerate lack of predicate when context is poppedDavid Robillard1-1/+2
2020-10-27Reset writer to empty when finished to avoid spurious blank linesDavid Robillard1-0/+1
2020-10-27Pass context flags to write_sep()David Robillard1-22/+24
2020-10-27Add initial flags to write contextDavid Robillard1-14/+22
2020-10-27Simplify internal writer context APIDavid Robillard1-21/+17
2020-10-27Strengthen writer statement preconditionsDavid Robillard1-1/+3
2020-10-27Add option for writing terse output without newlinesDavid Robillard1-4/+8
2020-10-27Factor out writing top level separatorDavid Robillard1-6/+10
2020-10-27Rename writer flags for consistency with enum typeDavid Robillard1-3/+3
2020-10-27Simplify writer statement validity checkingDavid Robillard1-3/+2
2020-10-27Fix various warnings and conversion issuesDavid Robillard1-4/+4
2020-10-27Use consistent naming for function typesDavid Robillard1-4/+4
2020-10-27Add extensible logging APIDavid Robillard1-10/+10
2020-10-27Use public sink interface in readerDavid Robillard1-0/+1
2020-10-27Rename SerdStyle to SerdWriterFlagsDavid Robillard1-28/+28
2020-10-27Use simpler names for statement flagsDavid Robillard1-17/+15
2020-10-27Simplify streaming API and improve pretty printingDavid Robillard1-143/+210
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-27Cache commonly used nodes in the worldDavid Robillard1-10/+8
2020-10-27Separate ByteSink from WriterDavid Robillard1-7/+6
2020-10-27Expose SerdByteSink in public APIDavid Robillard1-5/+4
2020-10-27Simplify writer style optionsDavid Robillard1-2/+4
2020-10-27Avoid writing invalid prefixed name prefixesDavid Robillard1-1/+2
2020-10-27Separate style enum from style flags typesDavid Robillard1-20/+20
2020-10-27Make SerdSink opaqueDavid Robillard1-0/+1
2020-10-27Simplify SerdEnv APIDavid Robillard1-4/+7
2020-10-27Make statement sink take a statement rather than nodesDavid Robillard1-6/+8
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.
2020-10-27Move SerdField to public APIDavid Robillard1-46/+40
2020-10-27Use a fixed-size reader stackDavid Robillard1-1/+5
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-27Clean up node construction APIDavid Robillard1-12/+6
2020-10-27Move error handling to worldDavid Robillard1-22/+7
2020-10-27Add SerdWorld for shared library stateDavid Robillard1-12/+6
2020-10-27Add SerdSink interface and hide individual function implementationsDavid Robillard1-2/+21
2020-10-27Bring read/write interface closer to C standardDavid Robillard1-14/+13
2020-10-27Merge datatype and/or language into nodeDavid Robillard1-28/+20
This moves closer to the sord API, and is more convenient in most cases.