C99 · token-based · wasm-ready

lo3

A minimalist interpreted language. Every command follows #CMD ARG1 ARG2 — always exactly two arguments, no exceptions.

try in browser source → docs →
#CMD
unified syntax
2
args per command
C99
backend
GPL-2
license
loading wasm runtime…
// playground
main.lo3
lo3 · utf-8 loading
1
output
lo3>
ctrl+enter
ln 1, col 1 0 chars
examples
// syntax reference
type prefixes
$42 ; integer _text ; string %name ; variable *0 ; global[0]

Every value carries a type prefix. Variables typed at creation: 0 = num, 3 = string.

variables
#n _x $0 ; new num var #n _s $3 ; new str var #= %x $99 ; assign #f %x $0 ; free

#n allocates, #f frees. Max 256 variables.

alu operations
#+ %x $5 ; x += 5 #- %x $2 ; x -= 2 #* %x $3 ; x *= 3 #/ %x $4 ; x /= 4

Mutate arg1 in-place. Arg2 must be an integer literal.

i/o & exit
#o %x $0 ; print var #o _hi $0 ; print literal #0 $0 $0 ; exit 0 #1 $0 $0 ; exit 1

Without explicit exit, runs to EOF and exits 0.

// implementation status
ALU Operations✓ done
Output / STDOUT✓ done
Input / STDIN✓ done
Variable system✓ done
Manual exit (0/1)✓ done
Auto exit (EOF)✓ done
WebAssembly build✓ done
Control Flow / jmp~ wip
Plugin / dlopen~ wip
Global array g[]~ wip
Double / float type· todo
Func calling· todo