Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/demonstrandum/lispy
LISP Interpreter in Python 😣 — LIS(PY)
https://github.com/demonstrandum/lispy
lisp lisp-interpreter python
Last synced: about 1 month ago
JSON representation
LISP Interpreter in Python 😣 — LIS(PY)
- Host: GitHub
- URL: https://github.com/demonstrandum/lispy
- Owner: Demonstrandum
- License: gpl-2.0
- Created: 2019-01-28T09:27:38.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-01T23:16:49.000Z (almost 6 years ago)
- Last Synced: 2024-11-06T06:27:51.267Z (3 months ago)
- Topics: lisp, lisp-interpreter, python
- Language: Python
- Homepage:
- Size: 40.6 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LISPY
A LISP interpreter written in Python --- LIS(PY).## About
### File Structure
```
├── common-lisp-merge-sort.lisp
├── debug-stages.py
├── docs
│  ├── ast_Tree.png
│  ├── carbon.png
│  ├── cons-cells.png
│  ├── debug-stages.png
│  ├── eof-string.png
│  ├── err-warn.png
│  ├── example_interp.png
│  ├── exec-args.png
│  ├── execute_file.png
│  ├── files.png
│  ├── hello-world-flowchart.png
│  ├── ilispy_file.png
│  ├── index-err.png
│  ├── interp-Atom.png
│  ├── interp-Def.png
│  ├── interp-eval.png
│  ├── interp-exec.png
│  ├── interp-load_file.png
│  ├── interp-req.png
│  ├── interp-SymTab.png
│  ├── interp-visit.png
│  ├── interp-walk.png
│  ├── lexer-flow.png
│  ├── lexer_regex.png
│  ├── lex_numeric.png
│  ├── main_lex.png
│  ├── mismatched-parens.png
│  ├── nea.pdf
│  ├── nea.tex
│  ├── num-call.png
│  ├── paren_bal.png
│  ├── parse-error.png
│  ├── parser_atom.png
│  ├── parser-flow.png
│  ├── parser_header.png
│  ├── parser_macroexpand.png
│  ├── parser_macro-obj.png
│  ├── parser_parse.png
│  ├── parser_pre.png
│  ├── prelude.png
│  ├── references.bib
│  ├── repl_lispy.png
│  ├── token_obj.png
│  ├── token_stream.png
│  ├── too-few-parens.png
│  ├── too-many-parens.png
│  ├── tree_Data.png
│  ├── tree_Hier.png
│  ├── tree_Nil.png
│  ├── tree_Node.png
│  ├── tree_Nodes.png
│  ├── tree_Operator.png
│  ├── type-check.png
│  └── unbound-sym.png
├── execute
├── hello_world.lispy
├── ilispy
├── LICENSE
├── lispy
│  ├── config.py
│  ├── err.py
│  ├── __init__.py
│  ├── lexing.py
│  ├── parsing.py
│  ├── tree.py
│  └── visitor.py
├── _making_log.log
├── prelude
│  ├── destructive.lispy
│  ├── dt.lispy
│  ├── functional.lispy
│  ├── IO.lispy
│  ├── lists.lispy
│  ├── loop.lispy
│  ├── numerics.lispy
│  └── prelude.lispy
├── README.md
├── repl.lispy
├── run-samples.sh
├── samples
│  ├── atoms.lispy
│  ├── blocks.lispy
│  ├── compose.lispy
│  ├── declarative.lispy
│  ├── deep.lispy
│  ├── eval.lispy
│  ├── factorial.lispy
│  ├── fizzbuzz.lispy
│  ├── functions.lispy
│  ├── ifact.lispy
│  ├── integral.lispy
│  ├── internal.lispy
│  ├── lists.lispy
│  ├── merge_sort.lispy
│  └── strings.lispy
├── testing.lispy
└── windows_execute.py4 directories, 96 files
```- The folder `lispy/` contains the implementation for the langauge.
- The folder `samples/` contains examples of LISPY programs.
- The folder `prelude/` contains the standard library for LISPY.
- The folder `/docs` contains the source for the documentation.
- The file `/docs/nea.pdf` is the compiled documentation document.### How to execute a file
On GNU/Linux, in the root of this repository, type:
```shell
./execute
```
where `` is some file ending with `.lispy`.### Running the REPL
On GNU/Linux, in the root of the repository again, type:
```shell
./ilispy
```
and the REPL should start.### Weird file names:
`ast`, `parser` and `lexer` are reserved file names/modules in Python, so I
couldn't use those names.