Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Brainfuck compiler targeting multiple backends.
branch: master

Add DCE.

latest commit 5016c2f3e9
@rfw authored
Failed to load latest commit information.
libpybfc Add DCE.
tests fix junk
.gitignore First commit!
CREDITS fix junk
LICENSE Add some documentation.
pybfc First commit!
pybfc.bat Terrible, terrible coding.


pybfc - the optimizing brainfuck compiler

pybfc is a fast, optimizing brainfuck compiler. It takes brainfuck code, generates a parse tree and performs optimization with that tree, such as evaluating as much as possible at compile-time.

pybfc has many backends, which all generate code from the parse tree. It can also interpret code at a (very _very_) slow speed with the same engine that is used for optimizing code during compile time.

Things that work

  • The folding optimizer.
  • The dead code elimination optimizer.
  • The C code generation backend.
  • The Intel x86 Windows ABI code generation backend.
  • The IAL code generation backend.

Things that don't

  • The collapsing optimizer. It will work on any program that does not use the getchar operation, but may miscompile programs that do. Also extremely extremely slow (I dare you to try it on mandelbrot.b).
  • The AT&T AMD64 System V ABI code generation backend.
Something went wrong with that request. Please try again.