A Python-based Scheme interpreter, utilizing lexical and syntactic analysis to parse, evaluate, and output.
Scheme is a dialect of the Lisp family of programming languages. This program provides the backend system modules for a terminal to interpret a subset of Scheme programs.
Features of the interpreter:
- lexical analysis and syntactical analysis to read, parse, evaluate, and print Scheme code
- tail call optimization to reduce stack frame allocations when handling recursive functions
- Clone the repository
- In the terminal,
cd
inside the cloned directory, - Run
python scheme.py
orpython3 scheme.py
depending on your Python version - To exit, press
Ctrl-d
or evaluate(exit)
in the interpreter - To interpret Scheme files (
.scm
), runpython3 scheme.py <file_name>.scm
orpython3 scheme.py <file_name>.scm
depending on your Python version
This project was made with ❤️🔥 by Jeremy Yoo