classbrainfuck::Interpreter

sys::Obj
  brainfuck::Interpreter

Interpreter for brainfuck instructions

decrementData

Void decrementData()

decrementPointer

Void decrementPointer()

dp

Int dp := 0 { private set }

Data pointer

execute

Void execute()

forward

Void forward()

incrementData

Void incrementData()

incrementPointer

Void incrementPointer()

indexBrackets

static Int:Int indexBrackets(Token[] program)

Index the matching brackets to speed up the program. Instead of move from one instruction to another to find the matching bracket it "jumps" directly to the position.

input

Void input()

jumpBackward

Void jumpBackward()

jumpForward

Void jumpForward()

log

const static Log log := Interpreter#.pod().log

make

new make(Token[] program, Int size := 3000)

Creates the interpreter with the program and the size of the array

off

Bool off()

output

Void output()

pp

Int pp := 0 { private set }

Program pointer

program

Token[] program { private set }

Program to interprete

run

Void run()

tape

Int[] tape { private set }

Array to write

toStr

virtual override Str toStr()