Metadata-Version: 2.4
Name: ronsum-brainfuck
Version: 1.0.0
Summary: A Brainfuck interpreter written in Python.
Author: Saksham Dwivedi
License: MIT License
        
        Copyright (c) 2026 Saksham Dwivedi
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# 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:

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

Install in editable mode:

```bash
pip install -e .
```

## Usage

Run a Brainfuck program:

```bash
bf hello.bf
```

or

```bash
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.
