Skip to content
Brainfuck code interpreter developed in Python.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
interpreter.py

README.md

interpret-brainfuck

brainfuck code interpreter developed in Python.

About

This program accepts input directly from a file or standard input until an EOF is received. The input is then cleaned and interpreted as brainfuck code.

Some concepts have been modelled after pocmo's interpreter, such as the use of the filter function to clean up input and the buildbracemap function, which appears as get_map in my program.

The debug variable is used to set the state of debug mode. When debug mode is set to 0, the program will not output non-printable characters. When debug mode is set to 1, the program will output non-printable characters as their numeric values contained within brackets. When debug mode is set to 2, the program will output all characters as their numeric values followed by spaces.

Usage

Set the debug variable to the desired value, and use:

python interpreter.py [file]

You can’t perform that action at this time.