Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lisp Interpreter in a C++ Program

Tags:

c++

lisp

I'm not sure I'm phrasing this right, but I'm pretty sure I'm looking for a LISP interpreter I can put in my C++ program.

The ideal situation I'm imagining is a function or something to which I can pass either a string, file, or filename containing the LISP code and then use the output from the LISP code in other parts.

To put it in terms of (print (eval (read))), I want read to be something I input to be what's read, and a string or something I can parse from print.

like image 311
Lucas Avatar asked May 29 '11 18:05

Lucas


1 Answers

There is also ECL ("Embeddable Common Lisp"). It has the advantage, that it provides the full Common Lisp standard. Unfortunately, the documentation with respect to embedding is... well... a little bit scarce.

I never used it myself, so I cannot really tell, whether this would actually be an easy thing to embed into your application. IMHO, the Guile interpreter would be a reasonable choice.

Another embeddable Lisp is Rep, which is, for example, the extension language used by the Sawfish window manager. It started as Emacs lisp clone, but became something different over time, and is nowadays closer to Scheme.

like image 170
Dirk Avatar answered Oct 05 '22 22:10

Dirk