Currently this code serves as a minimally-viable product version of a brainfuck interpreter.
The only optimization I'm currently planning on:
- coalescing repeated instructions,
- [.] transforming trivial/obvious instruction series (e.g.
[-]
) into a pseudo-instruction-
[-]
intoSetValue(0)
-
Next steps (if I don't just forget about this and do other things):
- write a script to test my interpreter behaves the same as some other popular interpreter(s).
Some or all of the examples are taken from this repo.
$ cargo run --release -- examples/hello.bf
$ cargo run --release -- examples/head.bf < src/bin/bf.rs
This work is released to the public domain "under" the unlicense. See
LICENSE
.