A simple programming / command language
Parameter | Definition |
---|---|
-r file | Execute file with the interpreter |
-m file out | Compress file and write the result to out |
-c file out | (Coming in the future) Transpile file into C, write the result to out |
Command | Definition |
---|---|
/ | Single-line comment |
+ | Increment the current cell value |
- | Decrement the current cell value |
> | Increment the cell pointer |
< | Decrement the cell pointer |
, | Input a number into the current cell |
. | Output the current cell's value as a character |
: | Output the current cell's value as a number |
[ | Jump forward to ] if 0, else continue |
] | Jump back to [ if not 0, else continue |
!name; | Define a jump point with the name name |
@name; | Jump to the jump point with the name name |
=value (...) | Execute ... if the current cell value is equal to value |
{text} | Output text to the console (for debugging) |
# | Add a breakpoint |
$start,stop; | Print cell values from start to stop |
; | Terminate the program |
To run tests, just run the exe with the parameters -r tests/tests.cl