/yali

Embed Lisp Everywhere! :dragon_face:

Primary LanguageC++MIT LicenseMIT

artwork

yali

Yet Another Lisp

license first-timers-only

Goals

  1. Embeddable Lisp Parser.
  2. Tool for learning (about Lisp, ASTs, Dialects, etc.)
  3. Modular API with documentation.

Eventual goals:

  1. Multiple Lisp Dialect support.
  2. Plug and play Interpreters.

Requirements

  1. Unix-based machine (currently most dev happens on Ubuntu 16.04)
  2. bazel (build tool)
  3. GCC Compiler (5.4.0)
  4. GNU Make 4.1

Option Dev Dependencies:

  1. graphviz + xdot (if you want to visualize build graph)
    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 to get a graphic like

graphviz

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.

(+ 4 (- 6 5) (+ 2 3)) translates to [+, 4, [-, 6, 5], [+, 2, 3]]

Contributing

Yes, please!

  • Suggest features and report bugs on the issue tracker
  • Refactor code to remove memory leaks
  • Write more tests
  • Code review to help improve the existing code

If you need help, feel free to contact me.

Artwork

Yali is a mythical creature portrayed as part lion, part elephant and part horse - this acted as the inspiration for the artwork.

Yali's artwork was designed and created by Vasanth Selvam 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 for more details