Type Definition bf::bytecode::Program [−][src]
type Program = [Instruction];
A program is a bytecode sequence of instructions.
Trait Implementations
impl Interpretable for Program
[src]
impl Interpretable for Program
fn interpret_state<R: Read, W: Write>(
&self,
state: State,
input: R,
output: W
) -> BfResult<()>
[src]
fn interpret_state<R: Read, W: Write>(
&self,
state: State,
input: R,
output: W
) -> BfResult<()>
Interprets a program against the given state.
fn interpret<R: Read, W: Write>(
&self,
size: Option<usize>,
input: R,
output: W
) -> BfResult<()>
[src]
fn interpret<R: Read, W: Write>(
&self,
size: Option<usize>,
input: R,
output: W
) -> BfResult<()>
Interprets a program. If the given size
is None
, the default memory size.
fn interpret_stdin(&self, size: Option<usize>) -> BfResult<()>
[src]
fn interpret_stdin(&self, size: Option<usize>) -> BfResult<()>
Interprets a program using stdin and stdout for input and output.
fn interpret_memory(
&self,
size: Option<usize>,
input: &[u8]
) -> BfResult<Vec<u8>>
[src]
fn interpret_memory(
&self,
size: Option<usize>,
input: &[u8]
) -> BfResult<Vec<u8>>
Interprets a program from memory, returning a vector of its output.