#!/usr/bin/perl -s # |bf; bf $file; bf -e=, $|++;undef$/;$_=$e||<>;tr/-+,.[]<>//cd;for$ a(qw%]} [while($p[$p]){ -$p[$p]-- +$p[$p]++ ,$p[$p]=ord(getc) .print(chr($p[$p])) <$p-- >$p++%){s/\Q${\substr$a,0,1}/${\substr$a,1} ;/g}eval; # by Juerd <juerd@juerd.nl>, 2001
2;0 juerd@ouranos:~$ ./bf -e='++++++++[>++++++++<-]+++++[>>+++++<<-]>> ++ [<+.>-]++++++++++.' ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Brainf*ck interpreter
by locked_user mtve (Deacon) on May 09, 2002 at 13:34 UTC | |
by Juerd (Abbot) on May 09, 2002 at 14:33 UTC | |
by locked_user mtve (Deacon) on May 10, 2002 at 16:06 UTC | |
by Juerd (Abbot) on May 10, 2002 at 21:50 UTC | |
by locked_user mtve (Deacon) on May 11, 2002 at 16:13 UTC |