Skip to content

Demonstrandum/lispy

Repository files navigation

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

4 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:

./execute <filename>

where <filename> is some file ending with .lispy.

Running the REPL

On GNU/Linux, in the root of the repository again, type:

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

About

LISP Interpreter in Python 😣 β€” LIS(PY)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published