#ifndef _LIBSE_H #define _LIBSE_H #include typedef struct { void* ptr; int size; int alloced; int sexpr; } car_t; typedef struct cons { union { void* ptr; car_t car; }; struct cons* cdr; } list_t; #define SET_PARSE_NIL (1<<0) #define SET_PARSE_QUOTE (1<<1) #define SET_PARSE_ESCAPE (1<<2) #define SET_PARSE_INSENSITIVE (1<<3) #define SETP_DEFAULT (SET_PARSE_QUOTE | SET_PARSE_ESCAPE) #define SETP_LISP (SETP_DEFAULT | SET_PARSE_INSENSITIVE | SET_PARSE_NIL) list_t* se_parse(const char* sexpr, unsigned int flags); //Parse string into list. void se_free(list_t* list); //Free whole list. void se_print(FILE* fp, const list_t* list); //Print list to fp, if fp is NULL, print to stdout. #endif /* _LIBSE_H */