Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Brainfuck

Name: Anonymous 2009-12-19 3:12

So I couldn't sleep and out of boredom wrote a brainfuck to C compiler.

http://nopaste.info/73ec0c6fa7_nl.html

Name: Anonymous 2009-12-24 14:12

Here's my C to Brainfuck compiler, written in perl:

foreach(<>){
  s/++ptr;/>/;
  s/--ptr;/</;
  s/++\*ptr;/+/;
  s/--\*ptr;/-/;
  s/putchar\(\*ptr\);/./;
  s/putchar\(\*ptr\);/,/;
  s/while \(\*ptr\) {/[/;
  s/}/]/;
  print;
}


It doesn't quite support the whole C standard, though.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List