Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rainmark/lispoo
C++ Lisp Interpreter
https://github.com/rainmark/lispoo
cpp lisp scheme-interpreter
Last synced: 10 days ago
JSON representation
C++ Lisp Interpreter
- Host: GitHub
- URL: https://github.com/rainmark/lispoo
- Owner: RainMark
- License: apache-2.0
- Created: 2022-02-20T09:10:09.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-04T14:48:04.000Z (almost 3 years ago)
- Last Synced: 2024-11-28T09:40:07.379Z (2 months ago)
- Topics: cpp, lisp, scheme-interpreter
- Language: C++
- Homepage:
- Size: 93.8 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lispoo
Code Oops Lisp Interpreter
# build
```sh
$ ./build.sh
```# example
```lisp
(progn
(define abc (lambda (a b c) (+ a (+ b c))))
(set! x (abc 1 2 3))
(message x)
(progn (+ 1.2 3.9) (define plus (lambda (a b) (+ a b))) (message (plus 9 9)))
)
``````sh
$ ./lispoo example/lambda.lisp
8
18
``````lisp
(progn
(set! i 3)
(while i (progn (message i) (set! i (+ i -1))))
(progn (set! x 0) (message (if x 1 2)))
(message (progn (+ 1 1) (+ 2 2)))
)
``````sh
$ ./lispoo example/loop.lisp
3
2
1
2
4
``````lisp
(progn
(define test (lambda (x) x))
(if (test (quote (+ 1 -1)))
(message (quote true))
(message (quote false))
)
(message (quote (+ 1 2)))
)
``````sh
$ ./lispoo example/quote.lisp
false
(+ 1 2)
```[More Examples](./example)