This site will advertise raku grammars and slang. It is currently in its early state.
More than 20 years ago, Damian Conway created in Perl a mostly declarative system of grammars to parse programs written in languages using rich syntax. He made regular expressions composable by making them methods in an OO system. He called such mehods rules. Grammar are classes that include rules in addition to regular methods. Perl was good to prototype such a system but it was dog slow.
Grammars are a main part of Raku [1] [2] the putative Perl successor. It leverages raku modern OO. And its current implementation is very close to the original design uses such a grammar to parse itself.
In fact it is the composition of many grammars. Grammars can be composed and extended dynamically. One can use a class Actions associated to a grammar to build an AST, a step to create a language compiler from the parse tree. A language which hooks on an existing language is called a slang. Liz created Slangify to streamline the process of creating a slang.
This would be fine and dandy if an ecosystem would be build around that to provide treesitters and syntax highligting.
Currently beside the Comma editor, syntax highlighting is broken for raku is broken in all editor even for trivial programs. So writing program in a given slang is a non starter for anyone expecting decent support from the editor. Nowhere LSP is supported.
A parse tree is generated as a yaml text in a very compact form. It is loaded
and used by the routine calcCrumbs
to generate the crumbs at a given position.
The version that runs on vercel uses pregenerated parse trees like this generated by the nqp program.