A Scheme interpreter written in Rust
See the codeA toy Scheme interpreter written in Rust, loosely based on the R5RS Specification with a bit of Racket thrown in as well.
It supports a small number of standard library functions, as well as:
There are two versions of the interpreter:
In the future, I may develop an interpreter that manages its own stack and/or heap, and possibly a bytecode VM & compiler as well for comparison.
Download and install Rust 1.0 from http://www.rust-lang.org/install.html.
To start a REPL using the default CPS interpreter:
cargo run
To execute a Scheme file using the default CPS interpreter:
cargo run examples/printing.scm
To start a REPL using the AST-walking interpreter:
cargo run -- -t ast_walk
To execute a Scheme file using the AST-walking interpreter:
cargo run -- -t ast_walk examples/printing.scm
To run the test suite:
cargo test
To watch for changes and auto-rebuild (on OS X):
gem install kicker -s http://gemcutter.org
./watch
Rust
100.0%
A Scheme interpreter written in Rust
See the codeA toy Scheme interpreter written in Rust, loosely based on the R5RS Specification with a bit of Racket thrown in as well.
It supports a small number of standard library functions, as well as:
There are two versions of the interpreter:
In the future, I may develop an interpreter that manages its own stack and/or heap, and possibly a bytecode VM & compiler as well for comparison.
Download and install Rust 1.0 from http://www.rust-lang.org/install.html.
To start a REPL using the default CPS interpreter:
cargo run
To execute a Scheme file using the default CPS interpreter:
cargo run examples/printing.scm
To start a REPL using the AST-walking interpreter:
cargo run -- -t ast_walk
To execute a Scheme file using the AST-walking interpreter:
cargo run -- -t ast_walk examples/printing.scm
To run the test suite:
cargo test
To watch for changes and auto-rebuild (on OS X):
gem install kicker -s http://gemcutter.org
./watch
Rust
100.0%