Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yacbrafi

Brainfuck interpreter written in C
yet another c brainfuck interpreter

Features

  • Executing a Brainfuck program given as a file or an command line argument
  • Showing the currently executed command
  • Showing the trace of the execution

Compilation and Installation

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

Usage

yacbrafi will check first if the program you have entered is correct before executing it.
Correct means that it the same amount of [ and ].

Options

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!

Supplying the program

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

Help

Running yacbrafi without command line parameters will show a help file:

yacbrafi

About

Brainfuck interpreter written in c

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages