These are sample codes for embedding various LISP interpreters to Kilo, with operations of last S-expression evaluating and parentheses matching.
The source code to compile Kilo is supposed to be from a tutorial site, Build Your Own Text Editor Step 130, which is copied as kilo-BYOTE130.c
in this repository.
Before compiling, you must install libraries of each LISP interpreter, except for no interpreter or jmc
. For example, sudo apt install gauche-dev
is needed to use Gauche on Debian package management system.
After install of the LISP interpreter libraries, just type the following in this repository to compile and use. Parentheses matching is done automatically, C-e is to eval-last-sexp, C-s is to save and C-q is to quit.
$ make <name-of-interpreter or blank>
$ ./kilo-lisp <filename>
Now the following LISP interpreters are supposed as a name-of-interpreter
, although most ones did not support many data types of a return value and/or eval error handling.
-
blank
: No interpreter- Just for parentheses matching and echo of last S-expression.
-
jmc
: McCarthy's Original Lisp- Implemented in C by ytaki0801 for McCarthy's 1960 paper definitions, derived from Paul Graham's Common Lisp implementation, without eval error handling. See
sample.jmc
for sample codes. - Docker image:
docker run --rm -it ytaki0801/kilo-jmclisp
- Implemented in C by ytaki0801 for McCarthy's 1960 paper definitions, derived from Paul Graham's Common Lisp implementation, without eval error handling. See
-
gauche
: Gauche - A Scheme Implementation >= 0.9.6- Mostly supported except some data types to eval, vector expression for example.
-
guile
: GNU Guile >= 3.0.4- Only supported for numbers as a return value and no eval error handling.
-
chibi
: Chibi-Scheme >= 0.9.1- Only supported for numbers as a return value.
-
ecl
: Embeddable Common Lisp >= 16.1.3- No eval error handling.
-
Source codes in this repository except Kilo: Public Domain by CC0, Creative Commons Zero v1.0 Universal
-
Gauche: https://github.com/shirok/Gauche/blob/master/COPYING
-
GNU Guile: GNU Lesser General Public Licence 3.0
-
Chibi-Scheme: https://github.com/ashinn/chibi-scheme/blob/master/COPYING
-
Embeddable Common Lisp: https://common-lisp.net/project/ecl/posts/ECL-license.html