/*!
An optimizing Brainfuck interpreter.
- For the full documentation, see [`Brainfuck`].
- If you don't like swearing, `Brainfuck` is also re-exported as `Brainfrick`.
# Example
```
use brainfrick::Brainfuck;
let purpzie_sucks = Brainfuck::execute("
++++++++[>++++++++++<-]>.<++[>++++++++++<-]+++[>+++++<-]>+
+.---.--.++++++++++.<++[>----------<-]>+++.----.<+++++++[>
----------<-]>+.<++++++++[>++++++++++<-]>+++.++.<+++[>----
--<-]>.++++++++.++++++++.<++++++++[>----------<-]>--.
")?;
assert_eq!(purpzie_sucks, "Purpzie sucks!");
# Ok::<(), brainfrick::Error>(())
```
*/
use execute;
use parse;
use Arc;
pub use ;
/**
A struct that parses and runs brainfuck.
# Example
```
use brainfrick::Brainfuck;
let purpzie_sucks = Brainfuck::execute("
++++++++[>++++++++++<-]>.<++[>++++++++++<-]+++[>+++++<-]>+
+.---.--.++++++++++.<++[>----------<-]>+++.----.<+++++++[>
----------<-]>+.<++++++++[>++++++++++<-]>+++.++.<+++[>----
--<-]>.++++++++.++++++++.<++++++++[>----------<-]>--.
")?;
assert_eq!(purpzie_sucks, "Purpzie sucks!");
# Ok::<(), brainfrick::Error>(())
```
## The debug character
To aid whoever is crazy enough to write in brainfuck, the question mark `?` will output the
current cell number and value.
```
# use brainfrick::Brainfuck;
let where_am_i = Brainfuck::execute(">>+++++?")?;
assert_eq!(where_am_i, "[2,5]");
# Ok::<(), brainfrick::Error>(())
```
## Memory details
Memory is infinite in both directions. In order to prevent malicious brainfuck from running
forever, there is a configurable, maximum number of 'steps' you can allow to be executed before
stopping.
```
# use brainfrick::Brainfuck;
let mut infinite = Brainfuck::parse("+[>+]")?;
infinite.max_steps = 100;
let result = infinite.run();
assert!(result.is_err());
# Ok::<(), brainfrick::Error>(())
```
## Testing multiple inputs
If you'd like to quickly test the same brainfuck with many different inputs, you can
parse it beforehand to speed up the process. See [`Brainfuck::input`] for information.
*/
// for people who don't like swearing
pub use Brainfuck as Brainfrick;