Skip to content

Add brainfuck interpreter test program in SPL

Jochem Raat requested to merge add-brainfuck-interpreter into master

The interpreter is very slow, but does work correctly for the programs I've tested. I've included two example brainfuck programs: the first one prints 'Hello world!' and the second one prints all squares up to 100^2.

This program does not require a polymorphic typechecker. For correct output, it does require a way to convert an Int to a Char, so that it can be printed as a Char. Since there is no way that I know of that would work across SPL compilers, I have left that out in this version. I have added a comment for where this can be changed if your compiler supports it.

Merge request reports