Blog Archive

Sunday, August 28, 2011

Brainfuck Pseudo Compiler


Being down with fever has its own fun. Was bored wid my mundane stuff
& there was no way i could go out.Thats when i heard about 'Brainfuck'.
Found it interesting & hence ended up writing a Pseudo compiler for it.
Am calling it a pseudo compiler because this will only parse pure
Brainfuck code to equivalent fully working 'c' code & then it uses gcc to
compile it into an executable.It does no syntax checking as of now & expects
the Brainfuck code to be perfect. Tried & tested..the code is fully functional.
It might be vulnerable to buffer overflow attacks here n there..but right
now am too lazy to fix it. :)


night_machine said...

hey i compiled the code , its working .... i didnt figure out dis line , hats off to ur geeky brain waves....
strcpy(make,"gcc /tmp/a0d.c -o ./");

night_machine said...

strcpy(make,"gcc /tmp/a0d.c -o ./");

what is a0d.c , pls let me knw , do wish 2 hav a response frm u....