new library proposition : lisp interpreter library

Hello, I want to suggest a new boost library, that could be used to parse and run lisp programs. I think of a way to create at compile time a language interpreter with list syntax, but with only the needed features. It could be used for people who need to run simple scripts from a C++ program, but who don't want to use python. Here is an naive example to illustrate what I mean (I hope it is clear enough by itself) using boost.lisp // we create the lisp interpreter with integer and math operation support lisp::lisp<lisp::with_int, lisp::with_math> mylisp; // we run the lisp program : (+ 10 20) lisp::result res = mylisp.run(lisp::word("+") >> 10 >> 20); std::cout << ret.as<int>() << std::endl; // same thing but from a string res = mylisp.run(lisp::parse("(+ 10 20)") ) It may then be possible to expose C++ functions and classes the same way it has been done for python by the boost.python library. What do you think of this idea ? Guillaume

Would it be robust enough to run the ol' NESL parser? Link: http://www.cs.cmu.edu/~scandal/nesl.html I just worry that it would not be sufficient to run existing LISP programs. LISP scripting has died off; I'd be more interested in using it for support of legacy code.
I want to suggest a new boost library, that could be used to parse and run lisp programs. I think of a way to create at compile time a language interpreter with list syntax, but with only the needed features. It could be used for people who need to run simple scripts from a C++ program, but who don't want to use python.

"Guillaume Chereau" wrote:
using boost.lisp // we create the lisp interpreter with integer and math operation support lisp::lisp<lisp::with_int, lisp::with_math> mylisp; // we run the lisp program : (+ 10 20) lisp::result res = mylisp.run(lisp::word("+") >> 10 >> 20);
Intelib library: http://www.intelib.org/ allows to execute List statements directly, w/o interpretation. /Pavel

Guillaume Chereau <charlie137@gmail.com> writes:
I want to suggest a new boost library, that could be used to parse and run lisp programs.
You could consider building atop ECL: http://ecls.sourceforge.net/ecl/Introduction.html#Introduction http://ecls.sourceforge.net/cgi-bin/view/Main/FAQ#2.1 -- Steven E. Harris
participants (4)
-
Brannon King
-
Guillaume Chereau
-
Pavel Vozenilek
-
Steven E. Harris