Skip to content
/ lval Public

Lval provides minimalistic language interpretation support for Lisp

License

Notifications You must be signed in to change notification settings

akerdi/lval

Repository files navigation

Lval

Lval provides minimalistic language interpretation support for Lisp.

Recommand using CMake to add Lval as a submodule.

Supported Lisp Basic Script Usage, more usage please read lib.lsp.

Usage

Force lval to be a library:

CMake Option: LVAL_LIB_MODE

ON: Library Mode
OFF: Test Mode

Add Lval as submodule to your project:

git submodule add git@github.com:akerdi/lval.git lval --recursive

you can refer to CMakeLists.txt.demo

Start:

// foo.cpp
#include <lval.h>
Lval::quick_start();

use lib.lsp:

> load "lib.lsp"

Problem

When add Lval as a submodule, error(/lval/lval.h:6:10: fatal error: 'compiler.h' file not found) will happen, below is the right way to treat:

CMakeLists.txt add submodule(compiler) directory:

include_directories("${PROJECT_SOURCE_DIR}/lval/compiler")

Goal

  • Library
  • String/Load file
  • Order/Compare/If
  • Function
  • Env
  • Q-Express
  • S-Express
  • AST
  • REPL
  • init

TODO

  • aoto gc instead lval_delete
  • lval to be library
  • Lval.cell use deque instead

Contact me

Feel free to contact me if you have any trouble on this project:

Create an issue. Send mail to me, tianxiaoxin001gmail.com

Ref

original - BuildYourOwnLisp

gcc-buildyourownlisp

typescript-jslispy

About

Lval provides minimalistic language interpretation support for Lisp

Resources

License

Stars

Watchers

Forks