Struct whitespacers::Interpreter
[−]
[src]
pub struct Interpreter<'a> { /* fields omitted */ }
A whitespace interpreter. This struct provides various strategies for interpreting a whitespace program.
Methods
impl<'a> Interpreter<'a>
[src]
fn new(
program: &'a Program,
options: Options,
input: &'a mut BufRead + 'a,
output: &'a mut Write + 'a
) -> Interpreter<'a>
program: &'a Program,
options: Options,
input: &'a mut BufRead + 'a,
output: &'a mut Write + 'a
) -> Interpreter<'a>
Construct a new whitespace interpreter from a program, input stream and output stream with the specified options.
fn count_with_simple_state(&'a mut self) -> Result<usize, WsError>
Similar to Interpreter::interpret_with_simple_state but does not have bigint fallback and returns the amount of executed instructions on success.
fn interpret_with_simple_state(&'a mut self) -> Result<(), WsError>
The reference interpreter implementation. It uses simple data structures internally, falling back to bignum-based simple datastructures if values become too large.
fn interpret_with_fast_state(&'a mut self) -> Result<(), WsError>
Interprets the program with optimized data structures, falling back to bignum-based simple datastructures if values become too large.
fn interpret_with_bigint_state(&'a mut self) -> Result<(), WsError>
Interpret the program using only bignum-based simple datastructures. This is slow.