Skip to main content

A Brainfuck interpreter written in Python.

Project description

Brainfuck Interpreter

A Brainfuck interpreter written completely from scratch in Python.

This project implements the complete Brainfuck instruction set and provides a command-line interface for executing .bf programs.

Features

  • Complete Brainfuck instruction set
    • >
    • <
    • +
    • -
    • .
    • ,
    • [
    • ]
  • Nested loop support
  • Jump table preprocessing for efficient loop execution
  • Syntax validation for unmatched brackets
  • 30,000-cell memory tape
  • 8-bit memory cells (0–255 wrapping)
  • Command-line interface

Installation

Clone the repository:

git clone https://github.com/RonsumGameDev/brainfuck-interpreter.git
cd brainfuck-interpreter

Install in editable mode:

pip install -e .

Usage

Run a Brainfuck program:

bf hello.bf

or

python -m brainfuck hello.bf

Project Structure

brainfuck-interpreter/
│
├── brainfuck/
│   ├── __main__.py
│   ├── interpreter.py
│   ├── preprocessor.py
│   └── __init__.py
│
├── tests/
├── pyproject.toml
└── README.md

Roadmap

  • Interactive debugger
  • Memory visualization
  • Execution tracing
  • Performance optimizations
  • Interactive REPL
  • Brainfuck compiler utilities

License

This project is licensed under the MIT License.


Note

The Brainfuck interpreter and its implementation were written by me from scratch.

Only this README.md was created with the assistance of AI for documentation and formatting purposes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ronsum_brainfuck-1.0.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ronsum_brainfuck-1.0.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file ronsum_brainfuck-1.0.0.tar.gz.

File metadata

  • Download URL: ronsum_brainfuck-1.0.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for ronsum_brainfuck-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3367224742b9aef63af2eaacfbbe78cdd6a82601f5eac6493b775b0ebf71ad6c
MD5 d3e1a9fc74b24eba29bcf7b4ee087f05
BLAKE2b-256 393991dbf57f247fa9cf2f5a6b0a5099ff756166c5fbf718e605da19b0ac57b3

See more details on using hashes here.

File details

Details for the file ronsum_brainfuck-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ronsum_brainfuck-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6825cc5e43555a7d9e04086999c0234e469ee2dc7f12e9a4d9f9227ab9e00efd
MD5 a09fba5dc60bf8149e61e4bfe549cc6e
BLAKE2b-256 b07af0c81e0b0cc0475252e5de39620add210d8776a6ae0e00008e1ecd0ad2b1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page