A simple Brainfuck interpreter written in about 40 mins as a Java library.
Find a file
2016-11-18 22:48:25 -08:00
src Add time limit to state constructor and state itself. 2016-11-18 22:48:25 -08:00
.gitignore Initial commit. 2016-11-18 21:05:33 -08:00
pom.xml Initial commit. 2016-11-18 21:05:33 -08:00
README.md Create README.md 2016-11-18 21:11:29 -08:00

bfinterpreter

A simple Brainfuck interpreter written in about 40 mins as a Java library. Because your programming career is incomplete until you've at least interpreted it.

Usage

This project has a pom.xml and can be added as a dependency for maven. The setup code-wise is quite simple, and takes some three lines of code:

BrainfuckState state = new BrainfuckState("program", instructionLimit);
System.out.println("Program completed with return code: " + state.executeInstructions());
System.out.println("The program output was: " + state.getOutput());

Limitations

Because this is intended to be a library without a set use case, this interpreter does not take input. I might add it later on should the need to do so arise, but it satisfies its purpose at the moment.