summaryrefslogtreecommitdiff
path: root/src/lisp/ao_lisp_read.c
Commit message (Collapse)AuthorAge
* altos/lisp: Split out read debug, add memory validationKeith Packard2017-12-03
| | | | | | | | Split read debug into a separate #define to reduce debug noise Add some memory validation -- validate stash API, and validate cons_free calls. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: use strtof instead of atofKeith Packard2017-12-02
| | | | | | atof returns double, strtof returns float. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Add quasiquoteKeith Packard2017-12-01
| | | | | | | This adds read support for quasiquote syntax, and then adds a quasiquote implementation in lisp Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Add floatsKeith Packard2017-11-19
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Add 'big' ints -- 24 bits wideKeith Packard2017-11-18
| | | | | | | With the default ints being only 14 bits, having a larger type with more precision seems useful. This is not exposed to the application. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Add applyKeith Packard2017-11-17
| | | | | | And all of the library routines that use it, map, string-map and friends. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Character consts. String and assoc builtins.Keith Packard2017-11-17
| | | | | | Also add back escaped characters in strings. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Add scheme-style bools (#t and #f)Keith Packard2017-11-16
| | | | | | Cond and while compare against #f, just like scheme says to. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Add non-cons cdr supportKeith Packard2017-11-16
| | | | | | | The cdr of a cons can be any value; add support for lexing and printing them. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Cleanup some DBG definesKeith Packard2017-02-20
| | | | | | Get rid of the remaining duplicate defines. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Change GC to do moves in batches of 32Keith Packard2017-02-20
| | | | | | This should make it quite a bit faster than doing one at a time. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Make read() return eof atom on end of fileKeith Packard2017-02-20
| | | | | | Also make it an exception to hit eof in the middle of an sexpr. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Clean up OS integration bits, add defunKeith Packard2017-02-20
| | | | | | | Provide an abstraction for the OS interface so that it can build more cleanly on Linux and AltOS. Add defun macro. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Separate out values from atomsKeith Packard2017-02-20
| | | | | | | | | | | This enables changing values of atoms declared as constants, should enable lets, and with some work, even lexical scoping. this required changing the constant computation to run ao_lisp_collect() before dumping the block of constant data, and that uncovered some minor memory manager bugs. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: add set/setq and ' in readerKeith Packard2017-02-20
| | | | | | Along with other small fixes Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Change lisp objects to use ao_poly everywhere. Add constKeith Packard2017-02-20
| | | | | | | | | | | This makes all lisp objects use 16-bit ints for references so we can hold more stuff in small amounts of memory. Also adds a separate constant pool of lisp objects for builtins, initial atoms and constant lisp code. Now builds (and runs!) on the nucleo-32 boards. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add lisp readerKeith Packard2017-02-20