small & readable scheme interpreter in C++?

后端 未结 5 2047
南方客
南方客 2021-02-01 19:06

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

5条回答
  •  深忆病人
    2021-02-01 19:17

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

提交回复
热议问题