From d45a5b21de22438c004e1db96a8f154da09cdc0e Mon Sep 17 00:00:00 2001 From: Oskari Timperi Date: Wed, 14 May 2014 22:27:34 +0300 Subject: Initial commit - tokenizing, parsing and basic eval support - arithmetic (+, -, *, /) - quote - atom for checking if the arg is an atom (i.e. not a list) - eq for checking equality - > for checking order - if - some unit testing - simple repl - mem management needs improvement :-) --- parse.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 parse.h (limited to 'parse.h') diff --git a/parse.h b/parse.h new file mode 100644 index 0000000..94d6fa8 --- /dev/null +++ b/parse.h @@ -0,0 +1,12 @@ +#ifndef PARSER_H +#define PARSER_H + +struct atom; +struct list; + +int parse_next(const char *src, int *pos, struct atom **result); +struct list *parse(const char *src, int *pos); + +void print_list(struct list *list, int level); + +#endif -- cgit v1.2.3