summaryrefslogtreecommitdiff
path: root/src/yajl_parser.c
Commit message (Collapse)AuthorAgeFilesLines
* crash fix, handle the case where yajl_alloc() is followed by ↵Lloyd Hilaiel2011-04-261-1/+1
| | | | yajl_complete_parse() without a call to yajl_parse() in the middle. closes #27.
* yajl_tree to use same integer parsing routines as yajl's parser proper to ↵Lloyd Hilaiel2011-04-251-1/+1
| | | | avoid locale issues.
* fix a bug in overflow detection in integer parsing routine, add overflow ↵Lloyd Hilaiel2011-04-251-1/+4
| | | | tests (now that we always rep integers in 64bit entities regardless of arch word size)
* rework programmatic configuration of yajl. both generator and parser now ↵Lloyd Hilaiel2011-04-211-3/+5
| | | | have a yajl_XXX_config() function that accepts varargs so that configuration is simple, and new config options can be added in the future that preserve backwards binary compatibility. closes #23.
* add tests cases for partial value configLloyd Hilaiel2011-04-201-15/+15
|
* cosmetic, indentation and whitespaceLloyd Hilaiel2011-04-201-49/+47
|
* yajl 2 will be relicensed under the ISC license. same idea, fewer bytes.Lloyd Hilaiel2011-04-201-30/+14
|
* o closes #5 - replace strtol with own implementation, uses pascal strings.Greg Olszewski2011-04-201-21/+34
| | | | | | o issue #6 - check a few malloc error cases. Signed-off-by: Lloyd Hilaiel <lloyd@hilaiel.com>
* o rework yajl apiLloyd Hilaiel2011-04-201-9/+53
| | | | | | | | | | | | | | | | | | | | | | | | | - remove yajl_status_parse_incomplete, replace with three flag settings - yajl_allow_multiple_values - yajl_forbid_trailing_garbage - yajl_forbid_partial_values In the new model, callers must consistently call yajl_parse_complete and check it's return. Two new parse errors have been introduced: "premature EOF" and "trailing garbage". yajl_test.c demonstrates the simplifying effect on calling code. adds 3 flags to yajl_test -g forbids trailing garbage -p forbids partial values -m allows multiple values to be parsed. and complementary tests. lth: Addresses the majority of issue #24. gno is awesomesauce. Signed-off-by: Lloyd Hilaiel <lloyd@hilaiel.com>
* Merge branch 'master' into 2.xLloyd Hilaiel2011-04-201-3/+3
|\
| * LLVM warningsMirek Rusin2011-04-191-3/+3
| |
* | use size_t rather than unsigned int for representing buffer lengths for yajl 2.xLloyd Hilaiel2010-08-101-8/+8
| |
* | re-introduce long long type for integer representation now that we require C99Lloyd Hilaiel2010-08-101-2/+2
|/
* update all them dates.Lloyd Hilaiel2010-01-081-1/+1
|
* prune a now unused parameter (tanks' @agentdero)Lloyd Hilaiel2009-12-171-3/+3
|
* change yajl_get_error_offset() to yajl_get_bytes_consumed(), which will ↵Lloyd Trevor Hilaiel2009-12-131-4/+6
| | | | allow the client to determine how much input was consumed in non-error cases (and in turn, handle junk at end of input parse errors... that is, insure the entire input buffer is consumed)
* set error offset when client callback cancels parseLloyd Hilaiel2009-12-051-0/+1
|
* implement a more efficient custom state stack (rather than re-using ↵Lloyd Hilaiel2009-05-171-78/+40
| | | | buffers), for a ~10% perf improvement during parsing (more function call overhead savings)
* inline a couple state management routines for 12% lex perf improvement - ↵Lloyd Hilaiel2009-05-151-38/+46
| | | | also document a couple more opportunities
* * BREAKING API CHANGE: allow client to specify memory allocation routinesLloyd Hilaiel2009-04-011-6/+7
| | | | | | | | | * bump yajl version to 1.0.0 * update TODO list, removing completed tasks * update yajl_test to override allocation routines and count allocations/frees, providing an automated standalone way to validate we're not leaky * update all copyright dates * update all .gold files with new test output * update ChangeLog in preparation for 1.0.0 release
* integrate patches from Robert Varga to eliminate build warnings on 64bit ↵Lloyd Hilaiel2009-01-171-7/+5
| | | | linux w/ gcc 4.3.2 - test suite still needs a bit of fixing to handle 64bit platforms where long is 64 bit.
* introduction of yajl_number callback to allow clients to handle arbitraryllooyd2008-04-251-25/+52
| | | | | | | precision numbers in JSON data. git-svn-id: http://yajl-c.googlecode.com/svn/trunk@102 e775cfb5-b74b-0410-aad5-5bebe4a96390
* 1. doxygen docs now part of the buildlloydh2008-01-141-1/+1
| | | | | | | | | 2. many documentation updates 3. freebsd4 fixes 4. works with CMake pre-LOOSE_LOOP_CONSTRUCTS git-svn-id: http://yajl-c.googlecode.com/svn/yajl/trunk@90 e775cfb5-b74b-0410-aad5-5bebe4a96390
* return a reasonable error message when client cancels parse.lloydh2007-11-111-1/+8
| | | | git-svn-id: http://yajl-c.googlecode.com/svn/yajl/trunk@81 e775cfb5-b74b-0410-aad5-5bebe4a96390
* support client cancelation.lloydh2007-11-111-15/+21
| | | | git-svn-id: http://yajl-c.googlecode.com/svn/yajl/trunk@80 e775cfb5-b74b-0410-aad5-5bebe4a96390
* Add support for UTF8 validation during parsing, fiddle testing to lloydh2007-11-111-2/+8
| | | | | | | | constantly stress stream parsing (use a parse buffer ranging in size from 1 to 32 bytes) git-svn-id: http://yajl-c.googlecode.com/svn/yajl/trunk@77 e775cfb5-b74b-0410-aad5-5bebe4a96390
* move all files to trunk.lloydh2007-07-171-0/+430
git-svn-id: http://yajl-c.googlecode.com/svn/yajl/trunk@60 e775cfb5-b74b-0410-aad5-5bebe4a96390