i have written an alpha version of an brainfuck ide. i wrote my own interpreter although i had massive help from my teacher regarding loops in the code because i had a really hard time understanding it in the "IT way". now for my report i need a state chart of the algorithm of the interpreter, how he handles each char.
i have come up with the following diagram, only thing missing is how the interpreter handles loops. i looked at the code my teacher wrote almost by himself but i dont understand it. i hope you can point me in the right direction here, i dont want a finished answer just a few sidenotes what is being done when an [ or ] is encountered in the code.
codeZeiger = codePointer (the pointer which moves through the code)
memoryZeiger = memoryPointer (the pointer wich moves through the memory stack)
memory = the memory stack
code = the code as a string oject
i = counter of the interpre() method (single chars are read from the string and then parsed through a switch statement whose statechart you see below)