A simple programming language that makes Brainfuck easier to read and write. It replaces Brainfuck's symbols with words like increment, mov eright, and print, while still compiling directly into standard Brainfuck code.
Values in square brackets ([]) are optional.
| Command | Brainfuck | Description |
|---|---|---|
move right [amount] |
> × amount |
Move the pointer right by 1 cell, or by amount cells. |
move left [amount] |
< × amount |
Move the pointer left by 1 cell, or by amount cells. |
increment [amount] |
+ × amount |
Increment the current cell by 1, or by amount. |
decrement [amount] |
- × amount |
Decrement the current cell by 1, or by amount. |
input [amount] |
, × amount |
Read 1 byte into the current cell, or read amount bytes. |
print [amount] |
. × amount |
Output the current cell once, or amount times. |
loop |
[ |
Begin a loop. |
end |
] |
End the current loop. |
clear |
[-] |
Resets the current cell to 0. |
The translator converts everything to lowercase before parsing:
increment 65
Print
mOVe RiGht 2
incremeNT 10
PRINT
is equivalent to:
increment 65
print
move right 2
increment 10
print
increment 5
loop
decrement
move right
increment
back
end
move right
print
input
decrement 10
print 2
back 1
move right 3
headache run program.haTranslates the file to Brainfuck and executes it.
headache run program.bfExecutes a Brainfuck file directly.
headache program.haExample:
increment 3
print
Output:
+++.
headache program.ha output.bfExample:
headache hello.ha hello.bfGenerates:
hello.bf
containing the translated Brainfuck code.
increment 10
loop
move right
increment 7
move right
increment 10
move right
increment 3
move right
increment 1
move left 4
decrement 1
end
move right
increment 2
print
move right
increment 1
print
increment 7
print
print
increment 3
print
move right
increment 2
print
move left 2
increment 15
print
move right
print
increment 3
print
decrement 6
print
decrement 8
print
move right
increment 1
print
move right
print