Lingling is a technology I am building to facilitate compiler + spec creation. It describes its own 【DSL】 called “MLgate”.
Algebraic Typing
Users trivially type fixtures w.o. hints in response to phase re-evaluation (based on dirty triggers and Defer exceptions).
MLgate presents convenient wrappers over the verify specification.
uh, better meant “footprint” instead of “variable” as to augmentLookup :s
Language components do have to set up some configuration for linking adequate messages and specific-behavior; for instance,
lingling.fig
# $schema=http://www.ryujinx.com/lingling/1.0
ID: org.atelier.luml:1.0.0
ml:
module: org.atelier.luml
language:
enable: true
ID: luml
name: Luml
uri: https://www.atelier.org/luml/1.0/lang
extensions: ["ml", "luml"]
cast-invoke:
enable = true
optional = false
internal-aliases:
msg: org.atelier.luml.msg
message-reports:
# msg::WrongNumberOfArguments { expected : int, got : int }
wrong-number-of-arguments: msg::WrongNumberOfArguments
# msg::NotInvokable { type : Type }
not-invokable: msg::NotInvokable
Tree traversal
MLgate implicitly enters frames.
(* n : Tree *)
(* master sample *)
fun f () = List.app (fn n' => ...) (n->children())
val _ = List.filter (fn n' => yesno) (n->children())
val _ = List.exists (fn n' => yesno) (n->children())
val _ = List.all (fn n' => yesno) (n->children())
val _ = with n' do ... end
Pay-As-You-Go-style
Incremental parsing, analysis and evaluation ---- all that relies on the fact that anything in MLgate can be queried for a copy, hash code, ord and read-from/written-to file system (in form of binary cache).
In terms of cache, Lingling is being formulated to specify build tooling (like Cargo, Deno, CMake, Maven, PIP, Golang…) easily, where we’d be more like Golang, hiding build artifacts into smth like /var/share/<Set-ID>/shadows/home/inexistent/Documents/katanacraft plus subshadows for a specific shadow.
Parsing
Wanna see a bit of how parsing rulesets are formulated?
Some snippets.
ruleset Form = b:[ between ( (), mode=MODE, reinterpret as Form' ) ] ;
ruleset || Form' =
| exp ( Exp )
| stat ( Stat )
;
Another one.
ruleset ArrayInitialiser =
"[" elements:Expression(minPrecedence=Assignment)*{split=","}{trail}{elision=Elision} "]" (":" type:TypeExpression)?
;
ruleset Elision = "," ;
ruleset definitions are used instead of ANTLR-style ones since they can specify class blocks and MLgate doesn’t limit itself to only few kinds of syntactic variations. Either way, I’m not planning to transpile MLgate to another language, but rather compile it down to some bytecode.
Well, the reference I built so far is extensive and there’s a lot I can show, but I’m leaving it closed-source for the meanwhile. I’m implementing the bootstrap tooling for this technology using Deno.

