view raw
MyNameIsKhan MyNameIsKhan - 9 months ago 165
Brainfuck Question

C to brainfuck compiler?

I have a basic program in C that I wish to convert to the language brainfsck but cannot find anything on the subject. I find many "brainfuck to C" converters but not the other way around. I found C2BF but do not understand how to use it or if that's what I need.


C2BF is a C program that is distributed as C source code.

To build the C2BF you need svn, Gnu Make and yacc and flex to be installed. After you have compiled C2BF yourself it should do exactly what you expect it to.

If you are using some kind of Linux flavour:

cd ${HOME}
svn co c2bf
cd c2bf
sudo apt-get install bison flex # or yum install bison flex
YACC=bison make

should give you the compiler in ${HOME}/c2bf/cc/c2bf-cc.

If you are using Windows you have to install something like MinGW or cygwin to compile the stuff.