https://github.com/scriptnull/yali
Embed Lisp Everywhere! :dragon_face:
https://github.com/scriptnull/yali
abstract-syntax-tree lisp lisp-dialect lisp-interpreter
Last synced: 3 months ago
JSON representation
Embed Lisp Everywhere! :dragon_face:
- Host: GitHub
- URL: https://github.com/scriptnull/yali
- Owner: scriptnull
- License: mit
- Created: 2019-01-26T18:17:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-08T04:16:58.000Z (over 6 years ago)
- Last Synced: 2025-03-22T17:22:27.463Z (3 months ago)
- Topics: abstract-syntax-tree, lisp, lisp-dialect, lisp-interpreter
- Language: C++
- Homepage:
- Size: 1.06 MB
- Stars: 3
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
# yali
> Yet Another Lisp
 [](https://www.firsttimersonly.com/)
## Goals
1. Embeddable Lisp Parser.
1. Tool for learning (about Lisp, ASTs, Dialects, etc.)
1. Modular API with documentation.Eventual goals:
1. Multiple Lisp Dialect support.
1. Plug and play Interpreters.## Requirements
1. Unix-based machine (currently most dev happens on Ubuntu 16.04)
1. [bazel](https://bazel.build/) (build tool)
1. GCC Compiler (5.4.0)
1. GNU Make 4.1Option Dev Dependencies:
1. graphviz + xdot (if you want to visualize build graph)
```bash
sudo apt update && sudo apt install graphviz xdot
```## AST Serializers
Yali aims to be a tool to learn about Lisp and ASTs. Hence it provides serializers that output AST in different form.### Graphviz
`(+ 4 (- 6 5) (+ 2 3))` translates to graphviz language
```
digraph G {
1[label="+"]
2[label="4"]
3[label="-"]
4[label="6"]
5[label="5"]
6[label="+"]
7[label="2"]
8[label="3"]
1 -> 2
1 -> 3
1 -> 6
3 -> 4
3 -> 5
6 -> 7
6 -> 8
}
```which could be used with tools like [Webgraphviz](http://www.webgraphviz.com/) to get a graphic like

### Markdown Level Table
`(+ 4 (- 6 5) (+ 2 3))` translates to markdown table```
| Level | Nodes |
|------|------|
| 1 | + |
| 2 | 4 - + |
| 3 | 6 5 2 3 |
```which renders on Markdown documents like
| Level | Nodes |
|------|------|
| 1 | + |
| 2 | 4 - + |
| 3 | 6 5 2 3 |### Array Square
Preferred often for [lightweight parsers](http://norvig.com/lispy.html).`(+ 4 (- 6 5) (+ 2 3))` translates to `[+, 4, [-, 6, 5], [+, 2, 3]]`
## Contributing
Yes, please!- Suggest features and report bugs on the [issue tracker](https://github.com/scriptnull/yali/issues)
- Refactor code to remove memory leaks
- Write more tests
- Code review to help improve the existing codeIf you need help, feel free to contact [me](https://vishnubharathi.codes/).
## Artwork
Yali is a [mythical creature portrayed as part lion, part elephant and part horse](https://en.wikipedia.org/wiki/Yali_(mythology)) - this acted as the inspiration for the artwork.Yali's artwork was designed and created by [Vasanth Selvam](https://dribbble.com/11CS103) and is licensed under a Creative Commons Attribution 4.0 International License. Check `images` directory for more variations of the artwork.
## License
MIT License - see [`LICENSE`](LICENSE) for more details