Brainf*** interpreters and compilers
Interpreters:
racket interp_basic.rkt bench/benches/mandel.b
racket interp_threaded.rkt bench/benches/mandel.b
racket runner.rkt bench/benches/mandel.bCompilers:
racket native.rkt bench/benches/mandel.b > mandel.s && clang mandel.s -o mandel && ./mandelThis project contains a set of interpreters and compilers for the BF language.
- interp_basic.rkt
- Basic BF interpreter; nothing fancy here.
- interp_threaded.rkt
- Uses a threaded interpreter for a big speed boost.
- interp_threaded_opt.rkt
- A threaded interpreter that does further optimizations. Forms the basic for the native code compiler. Use the file
runner.rktto invoke this interpreter.
- comp_c.rkt
- Lowers optimized code (from
interp_threaded_opt.rkt) to C. - native.rkt
- Emits ARM assembly (from
interp_threaded_opt.rkt)
Ashton Wiersdorf https://lambdaland.org