Skip to content

Kilo embedding LISP interpreter, with operations of last S-expression evaluating and parentheses matching

Notifications You must be signed in to change notification settings

ytaki0801/kilo-lisp

Repository files navigation

Kilo embedding LISP interpreter

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.

How to Compile and Use

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>

demo

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

  • 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.

License

About

Kilo embedding LISP interpreter, with operations of last S-expression evaluating and parentheses matching

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published