Simple Brainfuck compiler written as an educational project based on Let's make a Teeny Tiny compiler by Austin Z. Henley.
It uses gcc
to internally compile and includes all the parts mentioned in Austin's compiler (lexer, parser, emitter) along with the final compiler. It can also interpret bf code in order to compile and produce an output on the fly without generating any kind of executable nor code.
It comes with a debugger in order to debug the code and memory and follow the flow of your bf code.
Just type make
. That's it.
Check the test/
folder in order to get some examples on how to use the codebase.
- Ditch
gcc
and make yeti compile the final binary. - Include an interpreter skip emitting process.
- More exhaustive work on the interpreter (eg. test against more complex code).
- Child can't read from STDIN when interpreted.