diff options
author | Keith Packard <keithp@keithp.com> | 2016-10-31 18:53:09 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2016-11-17 22:18:39 -0800 |
commit | 75f07353a4fad170ac1cc6af98ed1aad7d1c0c88 (patch) | |
tree | f31757c2f2f1f100b35b2cad43bccf2128413839 /src/test/ao_lisp_test.c | |
parent | eabd97e4b1a9d34416455b0fceb14a9a480c63a4 (diff) |
altos: Add lisp reader
Diffstat (limited to 'src/test/ao_lisp_test.c')
-rw-r--r-- | src/test/ao_lisp_test.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ao_lisp_test.c b/src/test/ao_lisp_test.c index bbadfa75..96f1fd72 100644 --- a/src/test/ao_lisp_test.c +++ b/src/test/ao_lisp_test.c @@ -23,6 +23,7 @@ main (int argc, char **argv) { int i, j; struct ao_lisp_atom *atom; + ao_lisp_poly poly; ao_lisp_root_add(&ao_lisp_cons_type, (void **) &list); ao_lisp_root_add(&ao_lisp_string_type, (void **) &string); @@ -55,4 +56,12 @@ main (int argc, char **argv) printf ("\n"); ao_lisp_poly_print(ao_lisp_eval(ao_lisp_cons_poly(list))); printf ("\n"); + + while ((poly = ao_lisp_read())) { + poly = ao_lisp_eval(poly); + ao_lisp_poly_print(poly); + putchar ('\n'); + fflush(stdout); + } + } |