Just another rethink of the BrainFuck language
Project description
NeoBrainFuckInterpreter
NeoBrainFuckInterpreter is a Python interpreter for the Brainfuck programming language with additional commands for extended functionality.
Overview
This interpreter supports the basic Brainfuck commands (+
, -
, <
, >
, [
, ]
, .
, ,
) and introduces three additional commands:
$
: Switches IO mode to ASCII.%
: Switches IO mode to integers.^
: Jumps to memory cell with address which equals the value of current memory cell.&
: Jumps to the instruction with address which equals the value of current memory cell.0
: NOP (No operation)
The interpreter manages memory using a dynamic stack (MemoryStack
), allowing for negative indices and dynamic memory expansion.
Usage
Installation
Clone the repository:
git clone https://github.com/kusrabyzarc/NeoBrainF--k.git
cd NeoBrainF--k
Interpreter args
code: [str] BrainFuck code
do_debug: [bool] print debug info (default: False)
vanilla_cell_behaviour: [bool] clamp the values in memory to the range 0-255 (default: False)
vanilla_memory_stack: [bool] use static 30k-sized memory stack instead of dynamic one (default: False)
Examples
You can find examples here.
In progress.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file neobrainfuck-1.1.0.tar.gz
.
File metadata
- Download URL: neobrainfuck-1.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8af4f68472e80577465a1b3be49acd35fb6c7dbd2f5c853eaa91e23ded8b9a72 |
|
MD5 | ccea461e864ce4a9e459b328ce6c37d3 |
|
BLAKE2b-256 | 85127d4eec8386928e64635346269da6e161e2d4f98280144c992a8d9eb4f342 |
File details
Details for the file neobrainfuck-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: neobrainfuck-1.1.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 801157532617d2bff378724abe72d9db92dad24b5b3fe6fa84d431266cfddc43 |
|
MD5 | 380186df0a5e1e35ff4149aaf106edd2 |
|
BLAKE2b-256 | 9934b08ec8629a4507d965a872df9027fd0835f6a4c85e4d3cc9885983740625 |