Skip to content

NeoChen1024/Brainfunk

Repository files navigation

Brainfunk: Yet Another Brainfuck Interpreter

Brainfunk Logo

Build Instruction

$ make

Features

  • RLE optimizations for +- & ><
  • Various common loop structure optimizations ("set to zero", "multiply with offset", and "find zero")
  • Can convert brainfuck to C code for compilation
  • Is faster than older C version

Modes

bf: interpretes Brainfuck program

bfc: converts Brainfuck program to C

bit: prints out bitcode

Usage

# Run Brainfuck program:
$ ./brainfunk -f <source file>

# Translate Brainfuck program to optimized C source:
$ ./brainfuck -m bfc -f <source file> [-o <output file>]

CPU core

The ultimate Brainfuck CPU CPU core

Credits