Expand description
§The Breakfast Brainfuck Interpreter
Breakfast is a minimal brainfuck (BF for short) interpreter in Rust.
It offers most of the suggested BF features, including multiple EOF
behaviors and # for debug purposes.
§Example
Here is a simple piece of code to run the “Hello World” BF program:
use breakfast::*;
fn main() -> std::io::Result<()> {
let program = Breakfast::parse(
r#"
>++++++++[<+++++++++>-]<.
>++++[<+++++++>-]<+.
+++++++..
+++.
>>++++++[<+++++++>-]<++.
------------.
>++++++[<+++++++++>-]<+.
<.
+++.
------.
--------.
>>>++++[<++++++++>-]<+.
"#
);
let mut bf = Breakfast::new(Default::default());
bf.run(program)?;
Ok(())
}Structs§
Enums§
- EofBehavior
- An
EofBehaviorindicates the behavior to handle empty inputs.