The Brainfuck interpreter is designed to execute Brainfuck programs, which is a minimalist esoteric programming language created by Urban Müller.
To compile and run the Brainfuck interpreter, you will need:
- GCC (GNU Compiler Collection) or another compatible C compiler
To compile the Brainfuck interpreter, follow these steps:
- Open your terminal.
- Navigate to the directory containing the source code file
bf_interp.c
. - Run the following command to compile the interpreter:
gcc -O3 bf_interp.c -o bf_interp
This command will create an executable named bf_interp
in the same directory.
To run a Brainfuck program using the compiled interpreter, you can use the following command:
./bf_interp < path/to/your/brainfuck_program.b
Replace path/to/your/brainfuck_program.b with the path to the Brainfuck file you want to execute.
To enable the profiler, run the following command:
./bf_interp -p < path/to/your/brainfuck_program.b
For timer
time ./bf_interp < benches/mandel.b > /dev/null
chmod +x bf_compiler/run_compiler.sh
./bf_compiler/run_compiler.sh path/to/bf/file