Brainfuck interpreter and code generator