https://github.com/sebtee/bfinterpreter
This is an interpreter for the esoteric programming language Brainfuck.
https://github.com/sebtee/bfinterpreter
brainfuck brainfuck-interpreter cplusplus cpp esoteric esoteric-interpreter esoteric-language esoteric-programming-language interpreter
Last synced: 10 months ago
JSON representation
This is an interpreter for the esoteric programming language Brainfuck.
- Host: GitHub
- URL: https://github.com/sebtee/bfinterpreter
- Owner: SebTee
- License: mit
- Created: 2020-03-20T21:26:02.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-20T22:50:34.000Z (about 6 years ago)
- Last Synced: 2025-03-14T01:47:29.023Z (over 1 year ago)
- Topics: brainfuck, brainfuck-interpreter, cplusplus, cpp, esoteric, esoteric-interpreter, esoteric-language, esoteric-programming-language, interpreter
- Language: C++
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Brainfuck Interpreter
This is an interpreter for the esoteric programming language Brainfuck.
## Instructions
### Compiling
```shell script
gcc main.cpp Interpreter.cpp Memory.cpp -lstdc++ -o bfInterpreter
```
You can replace `bfInterpreter` with any name for the outputted executable file. Make sure to use the correct file name when running the program.
### Running a brainfuck program
```shell script
./bfInterpreter /path/to/file.bf (input to the program)
```
#### examples
##### Hello World
This program outputs the line `Hello World!`
```shell script
./bfInterpreter ./examples/HelloWorld.bf
```
##### Mandelbrot
This program outputs the Mandelbrot set. This program was written by Erik Bosman.
```shell script
./bfInterpreter ./examples/mandelbrot.bf
```
##### Cat
This program just outputs the input string without changing it.
```shell script
./bfInterpreter ./examples/cat.bf This text is output!
```
###### Hello World Mk.2
This program will also output `Hello World!`
```shell script
./bfInterpreter ./examples/cat.bf Hello World!
```