Skip to content
This repository

HTTPS clone URL

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
Tony Young authored March 08, 2012
Octocat-spinner-32 libpybfc Add DCE. March 08, 2012
Octocat-spinner-32 tests fix junk February 01, 2012
Octocat-spinner-32 .gitignore First commit! January 19, 2012
Octocat-spinner-32 CREDITS fix junk February 01, 2012
Octocat-spinner-32 LICENSE Add some documentation. January 19, 2012
Octocat-spinner-32 README.rst Add DCE. March 08, 2012
Octocat-spinner-32 pybfc First commit! January 19, 2012
Octocat-spinner-32 pybfc.bat Terrible, terrible coding. January 19, 2012
README.rst

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.