/bft

totally cheating brainfuck combination transpiler/compiler

Primary LanguageBrainfuckBoost Software License 1.0BSL-1.0

Build Status Coverage Status GitHub tag

BFT

BFT is a BrainFuck Transpiler. BFT translates brainfuck code to native (but ugly) D code during compile-time.

This translated code may also be executed at compile-time, but requires a heavy amount of memory for anything non-trivial.

Requirements

  • dmd, ldc or gdc
  • A generous amount of memory.

Example

import std.array;
import bft;

auto program = BFProgram!("++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.", 7)();
auto outbuf = appender!(char[])();
program.execute("", outbuf);
assert(outbuf.data == "Hello World!\n");

Documentation