NAME
Language::Ook - a Ook! interpreter.
SYNOPSIS
use Language::Ook;
my $interp = new Language::Ook( "program.ook" );
$interp->run_code;
DESCRIPTION
A programming language should be writable and readable by orang-utans. So Ook! is a programming language designed for orang-utans.
Ook! is bijective with BrainFuck, and thus, Turing-complete.
CONSTRUCTOR
new( [filename] )
Create a new Ook interpreter. If a filename is provided, then read and store the content of the file in the cartesian Lahey space topology of the interpreter.
Public methods
read_file( filename )
Read a file (given as argument) and store its code.
Side effect: clear the previous code.
run( )
Run the code stored.
store_code( code )
Store the given code and check wether it is valid Ook! code.
tick( )
Execute the next Ook instruction to be executed.
Private methods
Those methods should not be called directly. Use at your own risks, you've been warned!
dec_ptr( )
Implement the Ook! Ook!
instruction.
end_loop( )
Implement the Ook? Ook!
instruction.
inc_ptr( )
Implement the Ook. Ook.
instruction.
mv_ptr_down( )
Implement the Ook? Ook.
instruction.
mv_ptr_up( )
Implement the Ook. Ook?
instruction. Append new cells if the current cells aren't enough.
print_cell( )
Implement the Ook! Ook.
instruction.
read_cell( )
Implement the Ook. Ook!
instruction.
start_loop( )
Implement the Ook! Ook?
instruction.
AUTHOR
Jerome Quelin, <jquelin@cpan.org>
COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.