
Language::BF - BF virtual macine in perl

my $bf = Language::BF->new(<<EOC); ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<< +++++++++++++++.>.+++.------.--------.>+.>. EOC $bf->run; print $bf->output; # "Hello World!\n";

Language::BF is a straightforward (rather boring) implementation of Brainfuck programming language.
Language::BF is a OOP module that offers following methods
Constructs the BF virtual machine.
Resets the virtual machien to its initial state
$econstruct the virtual machine. does. $bf->reset
Sets the stdin of the virtual machine.
Runs the virtual machine. By default it runs perl-compiled code. By setting $mode to non-zero value, it runs as an iterpreter.
Step-executes the virtual machine.
Retrieves the stdout of the virtual machine.
Returns the perl-compiled source code that implements the virtual machine.
Returns the c source.
None by default.

http://en.wikipedia.org/wiki/Brainfuck

Dan Kogai, <dankogai@dan.co.jp>

Copyright (C) 2006 by Dan Kogai
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.