Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

small & readable scheme interpreter in C++?

Tags:

Anyone know of a good / small scheme interpreter in C++? Perferably something < 2000 LOC, with a simple garbage collectro (either compacting or mark & sweep), no need to support all of R5RS, just basics of if/lambda/set!/cons/car/cdr and some basic operations.

Thanks!

like image 445
anon Avatar asked Apr 09 '10 20:04

anon


People also ask

What is a better word for small?

Some common synonyms of small are diminutive, little, miniature, minute, and tiny.

What is adjective of small?

Adjective. small, little, diminutive, minute, tiny, miniature mean noticeably below average in size.

What type of noun is small?

Small is an adjective that describes something as little or not of large size. Small can also describe something as being low in number or amount.

How small is too small meaning?

1 comparatively little; limited in size, number, importance, etc.


1 Answers

Well, there's a veeery tiny lisp by Gary Knott. Not even close to R5RS, but it's small, and comes with a book describing the internals! However, it's C, not C++, and as far as I can remember there's no GC (but I could be wrong).

There's also Mini Scheme by Nils Holm, but it's also C, and a bit larger than what you asked (2404 lines of C plus 1352 of Scheme). Nils has also written Scheme 9 from Empty Space, which is larger but also comes with a book describing every piece of code.

Tinyscheme is another small Scheme (4500 lines of C plus 452 of Lisp)...

like image 159
Jay Avatar answered Oct 20 '22 05:10

Jay