Struct brainfuck::program::Program
[−]
[src]
pub struct Program { /* fields omitted */ }
The logic desired to be run by the brainfuck interpreter.
A program consists of the Abstract Syntax List (ASL) of a given
brainfuck source text. The main operations of a program is creating
one with the parse
function, and getting the instruction for a
given program counter with the get
function.
Methods
impl Program
[src]
fn parse(source: &str) -> Result<Program, Error>
Create a program from source text.
fn get(&self, iptr: usize) -> Option<Instruction>
Get the instruction at the given program counter.
fn from_file<P: AsRef<Path>>(path: P) -> Result<Program, Error>
Create a program from a file.