pub fn interpret<I, E, O>(
mem: &mut Vec<u8>,
program: &[u8],
input: I,
output: O,
eof_retry: bool,
) -> Result<(), (TapirError<E>, usize)>Expand description
Runs a Brainfuck program to completion,
or produces an error in the form of a TapirError along with
the index into program of the last instruction executed.
§Arguments
mem- A buffer to use as the memory tapeprogram- Brainfuck program text as bytesinput- An iterator over bytes of “user” input, read wheninterpretencounters a,instructionoutput- AWriteable sink for program output, written to wheninterpretencounters a.instructioneof_retry- Whether to repeatedly callnextwhen reading input fails, i.e. wheninput.into_iter().next()returnsNone