aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.c
AgeCommit message (Collapse)AuthorFilesLines
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
2011-05-05Fix comments mangled by search/replace.David Robillard1-3/+3
git-svn-id: http://svn.drobilla.net/serd/trunk@158 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-05-05Make serd_read_state_get_base_uri return a pointer.David Robillard1-2/+2
git-svn-id: http://svn.drobilla.net/serd/trunk@157 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-04-30Use descriptive return codes instead of boolDavid Robillard1-36/+27
git-svn-id: http://svn.drobilla.net/serd/trunk@154 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-04-30Consistent error messagesDavid Robillard1-3/+3
git-svn-id: http://svn.drobilla.net/serd/trunk@152 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-04-27Don't hide pointers in typedefs.David Robillard1-87/+86
git-svn-id: http://svn.drobilla.net/serd/trunk@150 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-04-24Fix reader memory stack use and verify read_object fully clears its stack.David Robillard1-12/+10
Make abbreviation in writer not assume equivalent nodes have equivalent addresses (abbreviate more than on input if triples are sorted correctly, e.g. abbrevate ntriples) git-svn-id: http://svn.drobilla.net/serd/trunk@149 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-04-23Fix stack memory leak (unbounded memory increasing per read triple, oops).David Robillard1-3/+5
Parsing of arbitrarily large ntriples files now takes place in a single page of memory, provided the data for a single triple fits in a single page (e.g. any case but very large literal objects). git-svn-id: http://svn.drobilla.net/serd/trunk@148 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-04-23Improve node struct alignmentDavid Robillard1-3/+3
git-svn-id: http://svn.drobilla.net/serd/trunk@147 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-04-23Fix parsing of language tags with several hyphens.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@146 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-04-23Tidy.David Robillard1-1/+0
git-svn-id: http://svn.drobilla.net/serd/trunk@145 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-04-23Fix crazy define name.David Robillard1-5/+5
git-svn-id: http://svn.drobilla.net/serd/trunk@144 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-04-22Fix license header (awk oops).David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@143 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-04-22Switch to ISC license (legally equivalent to MIT license but with less ↵David Robillard1-20/+12
obnoxious lawyer noise). git-svn-id: http://svn.drobilla.net/serd/trunk@139 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-04-16Update copyright headersDavid Robillard1-1/+0
git-svn-id: http://svn.drobilla.net/serd/trunk@137 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-03-02Fix parsing several files/strings with the same parser.David Robillard1-0/+26
Add serd_read_state_expand. git-svn-id: http://svn.drobilla.net/serd/trunk@114 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-02-25Abstract common read state tracking code (SerdReadState) to make user code ↵David Robillard1-10/+92
less tedious. git-svn-id: http://svn.drobilla.net/serd/trunk@110 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-02-25Switch to 2-clause BSD license.David Robillard1-18/+24
git-svn-id: http://svn.drobilla.net/serd/trunk@105 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-02-04Fix parsing double with signs in their exponents (e.g. 1.234e+56).David Robillard1-0/+5
git-svn-id: http://svn.drobilla.net/serd/trunk@95 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-02-03Add ability to set blank node prefix for parsing several files without conflict.David Robillard1-2/+16
git-svn-id: http://svn.drobilla.net/serd/trunk@91 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-25Add `amalgamate' waf target for building single source file distribution.David Robillard1-0/+2
git-svn-id: http://svn.drobilla.net/serd/trunk@78 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-25Change source header tag line.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@72 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-25Fix/test reading empty files.David Robillard1-2/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@70 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-25Add serd_reader_read_string.David Robillard1-16/+36
git-svn-id: http://svn.drobilla.net/serd/trunk@69 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-25Fix memory leaks.David Robillard1-35/+36
Push builtin URIs (rdf:type, etc) on parser creation/deletion, rather than at each parse. git-svn-id: http://svn.drobilla.net/serd/trunk@67 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-25Fix handling of EOF in collections.David Robillard1-2/+2
git-svn-id: http://svn.drobilla.net/serd/trunk@65 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-25Localise use of fread.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@63 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-25fread returns size_t.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@62 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-25readahead => peek_string.David Robillard1-6/+6
git-svn-id: http://svn.drobilla.net/serd/trunk@61 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-25Remove odd/nonsensical/impossible else case.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@60 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-25Fix crash when parsing malformed numbers.David Robillard1-8/+9
Add bad test cases (reach 95% test coverage). git-svn-id: http://svn.drobilla.net/serd/trunk@59 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-25Remove unused character escape code.David Robillard1-8/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@58 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-25Fix parsing of numbers that begin with a `.'.David Robillard1-1/+1
Add number parsing test case. git-svn-id: http://svn.drobilla.net/serd/trunk@56 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-24Remove support for 5 and 6 byte UTF-8 characters.David Robillard1-16/+0
The UTF-8 spec supports this, but I can't even find real characters to test it with. There don't seem to be actual Unicode code points this high yet. If it can't be tested, it can't be useful. Gone. git-svn-id: http://svn.drobilla.net/serd/trunk@55 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-24Remove SerdString cruft.David Robillard1-0/+7
git-svn-id: http://svn.drobilla.net/serd/trunk@54 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-24Remove SerdString from public API in favour of more expressive (and not ↵David Robillard1-21/+47
necessarily inline with data payload) SerdNode. git-svn-id: http://svn.drobilla.net/serd/trunk@53 490d8e77-9747-427b-9fa3-0b8f29cee8a0