Skip to content

Thatguyjs/cmdlang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cmdlang

A simple programming / command language

Usage

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

Syntax

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

Tests

To run tests, just run the exe with the parameters -r tests/tests.cl

About

A simple programming / command language

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published