aboutsummaryrefslogtreecommitdiff
path: root/src/json-lex.l
AgeCommit message (Collapse)AuthorFiles
2022-01-12Update copyright yearsSergey Poznyakoff1
2021-01-06Update copyright yearsSergey Poznyakoff1
2018-06-04json: improve parser reentrabilitySergey Poznyakoff1
* include/grecs/json.h (jsonlex_cleanup): New proto. * src/json-lex.l (jsonlex_setup): Initialize parser state. Initialize json_current_locus_point.file to a non-NULL value. (jsonlex_cleanup): New function. * src/json-gram.y (json_parse_string): Call jsonlex_cleanup before returning. * src/diag.c (default_print_diag): Print the passed errcode argument, instead of errno.
2016-07-04Split declarations between several header files.Sergey Poznyakoff1
* Makefile.am (SUBDIRS): Add include * am/grecs.m4 (GRECS_INCLUDES): Update (GRECS_COND_BUILD_INSTALL) (GRECS_COND_BUILD_SHARED) (GRECS_COND_BUILD_STATIC): New conditions. Build include/Makefile and include/grecs/Makefile. * configure.ac: Use src/grecs-gram.y as a source validity marker * include/Makefile.a: New file. * src/grecs.hin: Remove. Split into include/*. See below. * include/grecs.h: New file. * include/grecs/.gitignore: New file. * include/grecs/Makefile.am: New file. * include/grecs/doc.h: New file. * include/grecs/error.h: New file. * include/grecs/format.h: New file. * include/grecs/lex.h: New file. * include/grecs/list.h: New file. * include/grecs/mem.h: New file. * include/grecs/node.h: New file. * include/grecs/parser.h: New file. * include/grecs/preproc.h: New file. * include/grecs/sockaddr.h: New file. * include/grecs/symtab.h: New file. * include/grecs/table.h: New file. * include/grecs/tree.h: New file. * include/grecs/txtacc.h: New file. * include/grecs/types.h.in: New file. * include/grecs/util.h: New file. * include/grecs/value.h: New file. * include/grecs/version.h: New file. * src/grecs-locus.h: Move to ... * include/grecs/locus.h: ... here * src/grecsopt.h: Move to ... * include/grecs/opt.h: ... here * src/json.h: Move to ... * include/grecs/json.h: ... here * src/wordsplit.h: Move to ... * include/wordsplit.h: ... here * src/Make-inst.am (include_HEADERS): Remove. * src/Make-shared.am (grecsinclude_HEADERS) (noinst_HEADERS): Remove. * src/Make-static.am (noinst_HEADERS): Remove. * src/Make.am: Remove header-related stuff * src/bind-gram.y: Fix includes. * src/bind-lex.l: Likewise. * src/cidr.c: Likewise. * src/dhcpd-gram.y: Likewise. * src/dhcpd-lex.l: Likewise. * src/diag.c: Likewise. * src/format.c: Likewise. * src/grecs-gram.y: Likewise. * src/grecs-lex.l: Likewise. * src/json-gram.y: Likewise. * src/json-lex.l: Likewise. * src/jsonfmt.c: Likewise. * src/lookup.c: Likewise. * src/meta1-gram.y: Likewise. * src/meta1-lex.l: Likewise. * src/opthelp.c: Likewise. * src/preproc.c: Likewise. * src/sockaddr.c: Likewise. * src/txtacc.c: Likewise. * src/version.c: Likewise. * tests/gcfenum.c: Likewise. * tests/gcffmt.c: Likewise. * tests/gcfpeek.c: Likewise. * tests/gcfset.c: Likewise. * tests/gcfver.c: Likewise. * tests/json.c: Likewise.
2016-07-04Update copyright yearsSergey Poznyakoff1
2015-12-25Cleanup json code.Sergey Poznyakoff1
* src/json-gram.y (json_new_string) (json_new_number,json_new_bool,json_new_null) (json_new_object),json_new_null) (json_new_object,json_new_array) (json_object_set,json_object_get) (json_array_size,json_array_flatten) (json_array_insert,json_array_append) (json_array_get): New functions. * src/json.h (json_array): New member ol. (json_unescape): Change signature. Add new prototypes. * src/json-lex.l: Return allocated string as T_STRING. (json_unescape): Change signature. * src/jsonfmt.c: Use new accessors. Don't escape / in strings.
2015-12-18Add basic JSON support functions.Sergey Poznyakoff1
* src/Make-inst.am: Add json.h * src/Make-shared.am: Likewise. * src/Make-static.am: Likewise. * src/Make.am: Likewise. * src/json-gram.y: New file. * src/json-lex.l: New file. * src/json.h: New file. * src/yytrans: Translate json prefixes. * src/.gitignore: Update. * tests/json.c: New file. * tests/json00.at: New file. * tests/json01.at: New file. * tests/Makefile.am: Add new tests; build json * tests/testsuite.at: Add new tests. * tests/.gitignore: Update. * am/grecs.m4: New flag "json" * configure.ac (GRECS_SETUP): Require json * src/Make-inst.am (include_HEADERS): Assign GRECS_HDR value. * src/Make-shared.a [GRECS_COND_INSTALLHEADERS] (grecsinclude_HEADERS) [!GRECS_COND_INSTALLHEADERS] (noinst_HEADERS): Likewise. * src/Make-static.am (noinst_HEADERS): Likewise. * src/Make.am [GRECS_COND_JSON]: Define GRECS_JSON and GRECS_EXTRA_JSON.

Return to:

Send suggestions and report system problems to the System administrator.