Type Definition bf::ast::Program [−][src]
type Program = [Statement];
A BF program is represented as a slice of statements. The slice will typically be boxed.
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.
impl RleCompilable for Program
[src]
impl RleCompilable for Program