diff options
author | Keith Packard <keithp@keithp.com> | 2017-12-01 10:12:38 +0100 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-12-01 11:30:50 +0100 |
commit | cd0bd9791a77868c226d285bf4d57e8c321755d5 (patch) | |
tree | 50a96028f0bfd8584663f43d8b286c5bc559e82b /src/lisp/ao_lisp_read.h | |
parent | 00bf2ca86b60e6501880011897cea073865c5a03 (diff) |
altos/lisp: Add quasiquote
This adds read support for quasiquote syntax, and then adds a
quasiquote implementation in lisp
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp_read.h')
-rw-r--r-- | src/lisp/ao_lisp_read.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/lisp/ao_lisp_read.h b/src/lisp/ao_lisp_read.h index 20c9c18a..8f6bf130 100644 --- a/src/lisp/ao_lisp_read.h +++ b/src/lisp/ao_lisp_read.h @@ -19,23 +19,26 @@ * token classes */ -# define END 0 -# define NAME 1 -# define OPEN 2 -# define CLOSE 3 -# define QUOTE 4 -# define STRING 5 -# define NUM 6 -# define FLOAT 7 -# define DOT 8 -# define BOOL 9 +# define END 0 +# define NAME 1 +# define OPEN 2 +# define CLOSE 3 +# define QUOTE 4 +# define QUASIQUOTE 5 +# define UNQUOTE 6 +# define UNQUOTE_SPLICING 7 +# define STRING 8 +# define NUM 9 +# define FLOAT 10 +# define DOT 11 +# define BOOL 12 /* * character classes */ -# define PRINTABLE 0x0001 /* \t \n ' ' - '~' */ -# define SPECIAL 0x0002 /* ( [ { ) ] } ' */ +# define PRINTABLE 0x0001 /* \t \n ' ' - ~ */ +# define SPECIAL 0x0002 /* ( [ { ) ] } ' ` , */ # define DOTC 0x0004 /* . */ # define WHITE 0x0008 /* ' ' \t \n */ # define DIGIT 0x0010 /* [0-9] */ |