#end #language #compilation #world #syntax #msg #write-line

maolang-core

Core components (tokenizer, parser, evaluator) for the Mao language

1 unstable release

Uses new Rust 2024

new 0.1.0 Mar 30, 2025

#16 in #msg


Used in maolang

MIT/Apache

49KB
1K SLoC

MaoLang

A language with rules you won't know, until it's too late >:)

Inspired by Mao, a card game where the rules are not known, added randomly other players, and learnt by trial and error, MaoLang strives to be the most confusing language, with a dynamic syntax that changes upon each compilation

A valid hello world in Mao could be:

auto message is "Hello, World";
println(message);

Or maybe it could be

$val = "Hello!".

cond (:) alonside not :( ):
    puts(val).
end

Or maybe even

new msg equals "Hey :D";
Console.WriteLine(msg);

The interpretter chooses at random each time by generating a seed and creating lexer, parser and evaluation rules each time you attempt to run your program.


lib.rs:

The core tokenizer, parser and evaluator for a programming language with dynamically randomized syntax

Dependencies

~1.5MB
~21K SLoC