Rust library built on top of poetic to parse brainfuck.
There are tests for the parser which you can run with:
cargo test
It will first parse the string source input and parse it to only contain brainfuck opcodes.
let buf = fs::read_to_string("input.bf").unwrap();
let intermediate = Parser::parse_string(&buf);
These opcodes can then be turned into instructions
let mut instructions = Parser::parse_instructions(&intermediate);
which can then be optimized and interpreted by poetic see https://github.com/mztikk/poetic#usage