beneyal / rusty-scheme

A toy Scheme interpreter written in Rust for learning purposes (WIP).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A Very Rusty Scheme

Intro

This crate implements a minimal (and incomplete) Scheme interpreter based on the code from the "Principles of Programming Languages" course from Ben-Gurion University of the Negev. Original code is in TypeScript and can be found here, course lectures can be found here. The version of the language I implemented is called "L2", which supports primitive operations, function application, define expressions, lambda expressions, if expressions, and let expressions.

I know there's a ton of room for improvement, as I'm still a young Rustacean, but who knows, maybe I'll get to refactoring this project some time.

How to Use

There is currently no REPL interface, I'll maybe add one once I have some spare time. To run a program, change the src variable in bin/scm.rs. Programs must be enclosed in (L3 ...).

Dependencies

This crate only depends on nom for parsing the S-expression language.

About

A toy Scheme interpreter written in Rust for learning purposes (WIP).

License:MIT License


Languages

Language:Rust 100.0%