Brainfuck interpreter written in C
yet another c brainfuck interpreter
- Executing a Brainfuck program given as a file or an command line argument
- Showing the currently executed command
- Showing the trace of the execution
Compile:
make
If you want to access yacbrafi on your entire system, copy it to /usr/bin and the help file to usr/share/yacbrafi:
sudo scp yacbrafi /usr/bin
sudo mkdir /usr/share/yacbrafi
sudo scp yacbrafi.help /usr/share/yacbrafi
yacbrafi will check first if the program you have entered is correct before executing it.
Correct means that it the same amount of [ and ].
yacbrafi comes with the following command line options:
-f <file path> |
Read the Brainfuck program from a file |
-c |
Output as char and not as int |
-pt |
print trace Print the sequence in which the commands were executed. |
-pap |
print active position Print the command and highlight the currently executed command |
The order of the command line options doesn't matter!
The program can either be supplied by adding it as a command line argument...
yacbrafi "++[>++[>++<-]<-]"
... or by giving the file path as a command line argument after the parameter -f:
yacbrafi -f /path/to/programm.bf
Running yacbrafi without command line parameters will show a help file:
yacbrafi