Skip to content

Repository files navigation

Scheme Interpreter (Python)

What is Scheme?

Scheme is a dialect of the Lisp programming language known for its simplicity and elegance. It's a functional language with a strong emphasis on recursion and higher-order functions. Scheme is often used for teaching programming concepts and as a foundation for other languages.

About This Interpreter

This Python-based interpreter provides a basic implementation of the Scheme language. It supports a subset of Scheme features, allowing you to explore the language's core concepts and syntax.

Supported Features

  • Basic Arithmetic: +, -, *, /
  • Comparison Operators: =, <, >, <=, >=
  • Boolean Values: #t, #f
  • Conditional Expressions: if, cond
  • Definitions: define
  • Lambda Expressions: lambda
  • Procedure Application: Function calls
  • Lists: Creation, manipulation, and access
  • Special Forms: quote, car, cdr, cons

Usage

To run the interpreter, execute the interpreter.py script from your terminal. This will start a read-eval-print loop (REPL) where you can enter Scheme expressions.

About

This repository contains a Python implementation of a Scheme interpreter. It provides a basic environment for executing Scheme code, including support for core language features like: Syntax parsing and evaluation Primitive procedures Variable binding and scoping Lambda expressions and closures Special forms (e.g., if, cond, let, begin)

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages