Home

Awesome

smpl

smpl is a superset of brainfuck with 3 additional operators for dynamic memory allocation and management. This allows smpl to compilation from much higher level languages, as implementations for patterns like vector and string are possible.

Operators

CommandDescription
>Move the pointer to the right
<Move the pointer to the left
+Increment the memory cell under the pointer
-Decrement the memory cell under the pointer
.Output the character stored at the cell under the pointer
,Input a character and store it in the cell under the pointer
[Jump past the matching ] if the cell under the pointer is zero
]Jump back to the matching [ if the cell under the pointer is not zero
*Set the pointer equal to the value of the current cell
&Set the pointer back to the value it was before the last *
?With the value of the cell under the pointer, store the address of the first instance of that many consecutive zeros from the left of the tape at the current cell

Tape Attributes

The user should ALWAYS be able to set tape length for each implementation of smpl. A default value for the tape length may be used, but DO NOT bar the user from setting it.

Cells must be unsigned 32 bit integers, and the pointer is an unsigned 32 bit integer as well.

Extreme Behavior

Extreme behavior describes behavior that is very important to keep note of while implementing smpl. If the implementation does not implement extreme behavior properly, then it is not a valid implmentation of smpl. The goal of documenting extreme behavior is to help guarantee that all implementations of smpl are compatible. Keeping note of the very specific behaviors of smpl helps ensure this.

Undefined Behavior / Errors

Undefined behavior is EXTREMELY frowned upon. If possible, make undefined behavior throw errors in your implementation.

Undefined behavior includes