|
Project Information
Links
|
Esotope Brainfuck compiler (aka esotope-bfc) is an optimizing Brainfuck-to-C compiler. It aims at the best Brainfuck compiler ever, enabling many possible optimizations other compilers don't. It is currently in the development phase, but already it shows certain progress. For example the following Brainfuck program prints "Hello World!": >+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.>>>++++++++[<++++>-] <.>>>++++++++++[<+++++++++>-]<---.<<<<.+++.------.--------.>>+. which is translated to the following C code by esotope-bfc (rev 7be42beabad4, 2009-05-09): /* generated by esotope-bfc */
#include <stdio.h>
#include <stdint.h>
#define PUTS(s) fwrite(s, 1, sizeof(s)-1, stdout)
static uint8_t m[30000], *p = m;
int main(void) {
PUTS("Hello World!");
return 0;
}Isn't it good? :) See Optimization for what's going on, or Comparison with other compilers available. Esotope Brainfuck compiler is currently written in Python (2.5 or later). It is a part of Esotope project, which plans to give advanced implementation of every esoteric programming language. DownloadSee "source" tab above, or you can download a development snapshot as .zip or .tar.gz archive. It is in the heavy development and guaranteed to contain some kinds of bugs. ;) Python 2.5 or later is required; for the huge program (such as The Lost Kingdom) Psyco is pretty recommended. |