This library is intended to provide a minimal C/C++ API to efficiently create, manipulate, and parse LISP-style symbolic expressions. An interpreter for a very minimal, high-performance subset of LISP will eventually be included.
Be the first to post a text review of sexpr. Rate and review a project by clicking thumbs up or thumbs down in the right column.
===================== Revision information: Version 1.1 -> 1.2 ===================== - introduction of sexp_errors.h, corresponding sexp_errcode_t type, the library errno variable "sexp_errno" and the "error" field in the pcont_t structure. This is the biggest revision to the library. Instead of asserting or fprintf() and exiting, the library attempts to gracefully return to the caller providing error cause information via the sexp_errno and error fields. - Removed deprecated functions, removed testers for corresponding functions. Functions removed were cons, car and cdr. - event-based parsing is removed for now from the main source files. callbacks still exist, but the full parser based on events was removed. the original implementation essentially required a duplicate parse_sexp() function, which seemed like a recipe for version skew and disaster. this limits the ability to parse infinite streams of s-expressions, but I'd rather get it right than to have the suboptimal solution in the distribution. the code is still available in the src/event_temp.c file, but not in the main parser files. - Cleaned up makefiles - Updates to documentation. - Fixed memory management routines to properly cast return value of malloc, realloc, calloc for C++. These are not required for C (and are bad practice in C), but C++ needs them. - new_sexp_atom requires explicit type to avoid defaulting to SEXP_BASIC. - assertions and fprintf() calls removed to clean up how the library handles errors, especially when integrating with projects that would prefer a library call not to assert and die or spew fprintf messages. - patched a few places where NULL checks were not occurring to avoid crashes. - cleaned up read_one_sexp() function. - fixed bugs related to LIMITMEMORY mode. - fixed bug in sexp_destroy() where frees could occur on non-malloc'd fields. (credit: iproctor@facebook.com) - revised comments and documentation to reflect my new location at the University of Oregon, Computer Science Department after departing Los Alamos National Laboratory in September 2007. - new tester added to exercise some of the new error handling features. Note: Many thanks to Herb Maeder for contributions and comments related to error handling and various cleanup topics.
Be the first person to add a text review.
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use
Thanks for your rating!
Would you also like to write a review?