aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.c
AgeCommit message (Collapse)AuthorFilesLines
2012-03-03Fix reading of empty files (e.g. /dev/null) test case.David Robillard1-7/+7
git-svn-id: http://svn.drobilla.net/serd/trunk@328 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-02-29Handle files and strings that start with a UTF-8 Byte Order Mark (fix #814).David Robillard1-1/+15
git-svn-id: http://svn.drobilla.net/serd/trunk@326 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-02-21Add prefix to generated node IDs as well, to avoid clashing when reading ↵David Robillard1-8/+13
multiple documents into one model. git-svn-id: http://svn.drobilla.net/serd/trunk@324 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-02-21Report read error if both "genid" and "docid" IDs are found in the same ↵David Robillard1-7/+13
document, to prevent silent merging of distinct blank nodes. git-svn-id: http://svn.drobilla.net/serd/trunk@320 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-02-21Make -p actually work as advertised.David Robillard1-17/+13
git-svn-id: http://svn.drobilla.net/serd/trunk@319 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-02-20Remove odd assertion.David Robillard1-2/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@312 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-02-20Trim some fat by taking advantage of ReadContext for statement emission.David Robillard1-16/+9
git-svn-id: http://svn.drobilla.net/serd/trunk@310 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-02-20Fix collection parsing code to not leak stack space.David Robillard1-178/+148
Collection parsing now truly uses O(1) memory. Trim some fat. git-svn-id: http://svn.drobilla.net/serd/trunk@309 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-02-20Use iterative algorithm for collection parsing.David Robillard1-59/+52
git-svn-id: http://svn.drobilla.net/serd/trunk@306 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-02-20Implement pretty-printing for collections.David Robillard1-50/+46
git-svn-id: http://svn.drobilla.net/serd/trunk@305 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-02-01Fix jumps past variable initialization.David Robillard1-4/+6
git-svn-id: http://svn.drobilla.net/serd/trunk@299 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-01-16Support compilation as C++ under MSVC++David Robillard1-5/+4
git-svn-id: http://svn.drobilla.net/serd/trunk@291 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-01-16Update copyright dates.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@285 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-01-14Lint.David Robillard1-4/+4
git-svn-id: http://svn.drobilla.net/serd/trunk@283 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-01-06Remove unused parameter.David Robillard1-7/+7
git-svn-id: http://svn.drobilla.net/serd/trunk@281 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-27Warn on invalid unicode character and replace (fix #796).David Robillard1-7/+13
git-svn-id: http://svn.drobilla.net/serd/trunk@279 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-25Near 100% branch coverage.David Robillard1-20/+18
git-svn-id: http://svn.drobilla.net/serd/trunk@277 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-25100% test coverage.David Robillard1-64/+32
git-svn-id: http://svn.drobilla.net/serd/trunk@276 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-16Remove debug print.David Robillard1-1/+0
git-svn-id: http://svn.drobilla.net/serd/trunk@259 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-15Remove peek_string, use exactly 1 page as a read buffer.David Robillard1-107/+83
git-svn-id: http://svn.drobilla.net/serd/trunk@256 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-12More parser micro-optimization.David Robillard1-47/+48
git-svn-id: http://svn.drobilla.net/serd/trunk@253 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-12Remove eat_byte correctness checks for known-correct bytes in optimized builds.David Robillard1-70/+77
git-svn-id: http://svn.drobilla.net/serd/trunk@252 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-12Remove branch for EOF detection in eat_byte.David Robillard1-9/+4
git-svn-id: http://svn.drobilla.net/serd/trunk@251 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-12Fix memory error introduced a few commits ago.David Robillard1-2/+5
git-svn-id: http://svn.drobilla.net/serd/trunk@247 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-11Fix debug build without --stack-check.David Robillard1-0/+2
git-svn-id: http://svn.drobilla.net/serd/trunk@245 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-11Move all #ifdef gunk to serd_internal.h.David Robillard1-18/+3
Centralise file open and buffer allocation to localize platform tweaks. git-svn-id: http://svn.drobilla.net/serd/trunk@244 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-11Use posix_fadvise to advise about sequential file access.David Robillard1-1/+8
git-svn-id: http://svn.drobilla.net/serd/trunk@243 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-11Add SerdBulkSink for writing bulk output and corresponding serdi -B option.David Robillard1-13/+10
git-svn-id: http://svn.drobilla.net/serd/trunk@242 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-11Fix string length calculation.David Robillard1-3/+2
git-svn-id: http://svn.drobilla.net/serd/trunk@241 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-11Align read buffer to page boundary if posix_memalign is available.David Robillard1-1/+8
git-svn-id: http://svn.drobilla.net/serd/trunk@240 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-11Shrink code.David Robillard1-5/+2
git-svn-id: http://svn.drobilla.net/serd/trunk@239 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-11Simply reader by using a stack of SerdNode rather than weird internal types.David Robillard1-250/+204
git-svn-id: http://svn.drobilla.net/serd/trunk@237 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-11Better invalid string character handling.David Robillard1-10/+40
git-svn-id: http://svn.drobilla.net/serd/trunk@236 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-10Tolerate invalid characters in string literals by replacing with theDavid Robillard1-5/+28
Unicode replacement character. git-svn-id: http://svn.drobilla.net/serd/trunk@232 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-09-29Tidy.David Robillard1-3/+6
git-svn-id: http://svn.drobilla.net/serd/trunk@218 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-08-21Gracefully handle NULL reader sinks.David Robillard1-11/+18
Add serd_strerror. Fix erroneously equal SERD_ERR_BAD_SYNTAX and SERD_ERR_BAD_ARG. git-svn-id: http://svn.drobilla.net/serd/trunk@211 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-08-20Avoid writing illegal Turtle names as a result of URI qualifying (fix #734).David Robillard1-3/+2
git-svn-id: http://svn.drobilla.net/serd/trunk@210 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-06-19Fix abbreviation flags for blank nodes within lists (fix ticket #719).David Robillard1-2/+2
git-svn-id: http://svn.drobilla.net/serd/trunk@206 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-05-24Add serd_uri_to_path to API.David Robillard1-26/+1
Remove unused SERD_ANON_END statement flag. git-svn-id: http://svn.drobilla.net/serd/trunk@191 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-05-24Don't call serd_strlen for append_string (which is only used on internal ↵David Robillard1-10/+7
ASCII strings) git-svn-id: http://svn.drobilla.net/serd/trunk@186 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-05-19Express inlining information via statement flags rather than node types.David Robillard1-39/+51
Correctly support inline blank subjects (e.g. "[ :a :b ] :c :d ."). git-svn-id: http://svn.drobilla.net/serd/trunk@184 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-05-18Add test to ensure blank node IDs don't clash with generated IDs.David Robillard1-29/+130
Add handle destructor parameter to serd_reader_new. Add serd_reader_get_handle. Rename serd_reader_set_blank_prefix to serd_reader_add_blank_prefix. Rename serd_reader_read_file to serd_reader_read_file_handle. Add new serd_reader_read_file that takes a path/URI parameter. Add serdi -i option to select input syntax. Add serdi -p and -c options to add/chop a prefix to/from blank IDs. Add optional base_uri parameter to serd_env_new. Add serd_writer_chop_blank_prefix. Bump version to 0.3.0. git-svn-id: http://svn.drobilla.net/serd/trunk@183 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-05-12Fix out of bounds array indexing.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@177 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-05-12Use conventional string lengths not including NULL terminatorDavid Robillard1-29/+29
git-svn-id: http://svn.drobilla.net/serd/trunk@174 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-05-11Create SerdNodeFlags typedef for flags.David Robillard1-11/+11
Expose serd_strlen. Make serd_node_copy tolerate a NULL parameter. git-svn-id: http://svn.drobilla.net/serd/trunk@168 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-05-11Record whether strings contains quotes or newlines for smart selection of ↵David Robillard1-36/+47
long strings vs short strings in writer output. git-svn-id: http://svn.drobilla.net/serd/trunk@167 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-05-06Merge SerdEnv and SerdReadState.David Robillard1-106/+0
git-svn-id: http://svn.drobilla.net/serd/trunk@163 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-05-05Tidy.David Robillard1-24/+25
git-svn-id: http://svn.drobilla.net/serd/trunk@161 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-05-05Remove datatype and lang from internal Node struct (use less stack space).David Robillard1-58/+76
git-svn-id: http://svn.drobilla.net/serd/trunk@160 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-05-05Replace strlen of string constants with sizeof.David Robillard1-3/+3
git-svn-id: http://svn.drobilla.net/serd/trunk@159 490d8e77-9747-427b-9fa3-0b8f29cee8a0