brainfoamkit 1.1.0

An interpreter for the brainf*** language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
program          ::= statement* (* A program is a collection of zero or more statements *)

statement        ::= increment | decrement | moveRight | moveLeft | loop | output | input

loop             ::= loopStart statement* loopEnd (* Loop construct: Executes statements inside the loop until the value in the current memory cell is zero *)

increment        ::= '+'                (* Increment the value in the current memory cell *)
decrement        ::= '-'                (* Decrement the value in the current memory cell *)
moveRight        ::= '>'                (* Move the current memory pointer to the right *)
moveLeft         ::= '<'                (* Move the current memory pointer to the left *)
loopStart        ::= '['                (* Loop Start: Start executing statements inside the loop until the value in the current memory cell is zero *)
loopEnd          ::= ']'                (* Loop End: Jump back to the loop start if the value in the current memory cell is not zero and continue otherwise *)
output           ::= '.'                (* Output the value in the current memory cell as an ASCII character *)
input            ::= ','                (* Read a character from the input and store its ASCII value in the current memory cell *)