🧠BF 📄Interpreter

by Ricardo Fernández Serrata

Version 1 (November 22, 2020)

Download (35 downloads)

A BrainFuck (esoteric) programming language interpreter. Has a notification with debugging info: Instruction Pointer index and current Code instruction, Memory Pointer index and current Cell value, Live Memory_Dump and progress bar that shows ratio between Instruction Pointer and Code Length.

Most default behavior of this implementation relies/depends/is-based on Automate's default behavior. So the memory array has non-fixed "unlimited" size, the cells "don't" have max limit and all pointers can have negative indices that aren't "outside" the arrays or texts.

This interpreter does NOT optimize code, is so basic that it lacks most performance optimizations. But even if it was optimized, it would still be slow because of intrinsic properties of BF and Automate.

Only allows input as files because files are more versatile than using an Input Dialog (this will change with REPL). The first Pick File must contain BF Code, while the 2nd (optional) Pick File can contain literally anything because this is the input to the program.

There's a (unconnected) Delay block to ease debugging when needed.

C = Code Instructions or Commands.
C_i = Instruction Pointer index.
C[C_i] = Current Instruction.
M = Memory Array.
M_i = Memory Pointer index.
M[M_i] = Current Cell value.
Inp = Input to the program.
Inp_i = Input Pointer index.
Inp[Inp_i] = Current Input Byte.

â„ą en.wikipedia.org/wiki/Brainfuck

Future changelog:
0) Support for Square Brackets ([]) (Sorry for the inconvenience, this is the only lacking feature that makes this interpreter a Beta version)

1) More customization and settings.

2) Transform this into a REPL shell/console, also add a BF to MKSH transcompiler. The REPL will be optimized for testing and debugging, while the transpiler will be to run huge code.

3) Graphically show the location of the Memory Pointer within the Live Memory_Dump.

4) Compiler to create executable files for different platforms.

4.0 average rating from 5 reviews

5 stars
3
4 stars
0
3 stars
1
2 stars
1
1 star
0
Reports
0

Reviews and ratings can be submitted in the app.