Brainfuck interpreter with procedures and some other features.
Procedures declared using !
keyword, and called using $
. Example:
!print{.[-]} +++++++++++++++++++++++++++++++++ $print
Instead of counting pluses you can use constants. It loads number into cell using =
. Example:
=66.=10.
This program prints letter 'B' and newline. only values from 0 to 255 allowed (cells are unsigned 8 bit integers).
Install cmake
and then type:
mkdir build && cd build
cmake ..
make
-DDEBUG_PRINT
— prints disassembled bytecode after compiling it (default:OFF
).-DENABLE_BOUNDS_CHECK
— enables or disables bounds checks during execution (default:ON
).-DUSE_LIBEDIT
— uses libedit library for REPL (default:ON
).
All the code in this repository is released under the WTFPL license. Take a look at the LICENSE for more info.