classbrainfuck::Interpreter

sys::Obj
  brainfuck::Interpreter

Interpreter for brainfuck instructions

decrementData

Source

Void decrementData()

decrementPointer

Source

Void decrementPointer()

dp

Source

Int dp := 0 { private set }

Data pointer

execute

Source

Void execute()

forward

Source

Void forward()

incrementData

Source

Void incrementData()

incrementPointer

Source

Void incrementPointer()

indexBrackets

Source

const 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

Source

Void input()

jumpBackward

Source

Void jumpBackward()

jumpForward

Source

Void jumpForward()

log

Source

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

make

Source

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

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

off

Source

Bool off()

output

Source

Void output()

pp

Source

Int pp := 0 { private set }

Program pointer

program

Source

Token[] program { private set }

Program to interprete

run

Source

Void run()

tape

Source

Int[] tape { private set }

Array to write

toStr

Source

virtual override Str toStr()