PseudoBF is simple language, that compiles to brainfuck itself. That is, you can write simple code similar to that:
function compare(varA, varB) {
if (varA == varB) {
print("equal. ");
} else {
print("not equal. ");
}
}
function main() : locals(a, b, c) {
a = 7;
print("Compare a to 5: ");
compare(a, 5);
print("Compare a to 7: ");
compare(a, 7);
}
And feed it into PseudoBF compiler, to get equivalent code... In brainfuck!
>[-]+++++++>>>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++.++++++++++++++++++++++++++++++++++++++++++++.--.+++.---------------.+++++++
++++++++++.-------------.-------------------------------------------------------
--------------.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.-----------------------------------------------------------------.+++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.-----.--
-----------------------------------------------------------------------------.++
+++++++++++++++++++.+++++.--------------------------.>>>>[-]<<[-]<<<<<[>>>>>+>>+
<<<<<<<-]>>>>>>>[<<<<<<<+>>>>>>>-]<[-]+++++<<>>>[-]<<<[-]>[<+>>>+<<-]>>[<<+>>-][
-]>[-]<<<<[>>>>+<<<<-]+>>[>+>-<<-]>[<+>-]>[<<<<->>>>[-]]<[-]>[-]<<<<[>>>+>+<<<<-
]>>>[<<<+>>>-]+>[>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++.++++++++++++.++++.-------------------
-.+++++++++++.--------------------------------------------------------------.---
-----------.<<->[-]]<[>>>[-]++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.+.+++++.-------------
-----------------------------------------------------------------------.++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.++++++++++++.++++.
--------------------.+++++++++++.-----------------------------------------------
---------------.--------------.<<<-]<<<[-]++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++.++++++++++++++++++++++++++++++++++++++++++++.--.++
+.---------------.+++++++++++++++++.-------------.------------------------------
---------------------------------------.++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++.------------------------------------------------------
-----------.++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++.-----.---------------------------------------------------------
----------------------.+++++++++++++++++++++++.+++.--------------------------.>>
>>[-]<<[-]<<<<<<[>>>>>>+>>+<<<<<<<<-]>>>>>>>>[<<<<<<<<+>>>>>>>>-]<[-]+++++++<<>>
>[-]<<<[-]>[<+>>>+<<-]>>[<<+>>-][-]>[-]<<<<[>>>>+<<<<-]+>>[>+>-<<-]>[<+>-]>[<<<<
->>>>[-]]<[-]>[-]<<<<[>>>+>+<<<<-]>>>[<<<+>>>-]+>[>[-]++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.++++
++++++++.++++.--------------------.+++++++++++.---------------------------------
-----------------------------.--------------.<<->[-]]<[>>>[-]+++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++.+.+++++.------------------------------------------------------------
------------------------.+++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++.++++++++++++.++++.--------------------.+++++++++++.--------------
------------------------------------------------.--------------.<<<-]<<<<<<
After executing above code in any brainfuck interpreter, we get expected optput:
Compare a to 5: not equal. Compare a to 7: equal.
Note: this project is outdated. See also PseudoBF2 project, which is complete ground-up rewrite of this idea but better designed, more complete, and more extensible. https://github.com/msm-code/PseudoBF2