Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 686 Bytes

readme.md

File metadata and controls

23 lines (18 loc) · 686 Bytes

Rust-Whitespace

A whitespace interpreter written in Rust

Usage

Usage:    whitespace [command] <file>
Commands: run   - (default) run the program
          list  - list the commands that the file contains

Design

It's built as a simple two-pass compiler that returns a vector of operations for a virtual machine to execute.

The first pass converts the whitespace tokens into a processable enum, and the second pass reduces the named labels to simple program-pointers. (Like line numbers, but indexes.)

Build

There are no dependencies, so you should be able to run

git clone https://github.com/Jayshua/rust-whitespace
cd rust-whitespace
cargo run