Skip to content

A simple Brainfuck interpreter written in Java

Notifications You must be signed in to change notification settings

arithefirst/birp

Repository files navigation

BIRP - Brainfuck Interpreter in Java

This is a simple Brainfuck interpreter implemented in Java. Brainfuck is an esoteric programming language known for its minimalism, consisting of just eight commands.

Features

  • Interprets standard Brainfuck code
  • Handles memory management automatically
  • Provides clear error messages for common issues
  • Supports file-based input

Usage

You can run the interpreter by either building the project from source or downloading the pre-built JAR file from the Releases tab.

Running from JAR

java -jar birp.jar test.bf

Example

The following Brainfuck code:

>++++++++[<+++++++++>-]<.
>++++[<+++++++>-]<+.
+++++++..
+++.
>>++++++[<+++++++>-]<++.
------------.
>++++++[<+++++++++>-]<+.
<.
+++.
------.
--------.
>>>++++[<++++++++>-]<+.

When interpreted, outputs:

Hello, World!

Building the Project

You can build the project using Gradle:

./gradlew build

This will create a JAR file in the libs directory that can be executed to interpret Brainfuck code.

Project Structure

  • src/main/java/com/arithefirst/Birp.java: Main entry point
  • src/main/java/com/arithefirst/BfInterpreter.java: Interpreter implementation

About

A simple Brainfuck interpreter written in Java

Resources

Stars

Watchers

Forks