Slangify
Slangify
Power up your Domain Specific Language.
Design your DSL.<br>Create a Grammar<br>to Parse your syntax.
Slangify is here to<br>show you how.
We focus on why,<br>where & how to use<br>Raku Grammars.
Write grammars the same way you write functions or classes. Build your language with native semantics, composition, tooling and flow.
examples · tools · quick start · resources
Try it in the playground →
DSLs are a secret weapon for LLM effectiveness because their human-readable, domain-centric structure constrains both the training set and model outputs, making them significantly easier for LLMs to generate accurately.
Why does parsing still feel like a chore?<br>Most languages treat parsing as an afterthought — something you bolt on with a library, define in a string, and hope behaves.<br>Why should parsing require a module install?
Why define your grammar as a string, separate from your code?
Why number your capture groups?
Why can't you extend a grammar like a class?
Why treat non-ASCII text as a special case?
What if ...<br>A grammar is a class. Tokens are named. The parse tree is instant.
grammar DateParser {<br>token TOP { '-' '-' }<br>token year { \d ** 4 }<br>token month { \d ** 2 }<br>token day { \d ** 2 }
my $m = DateParser.parse("2026-05-12");<br>say $myear>; # 「2026」 named, not positional<br>say $mmonth>; # 「05」<br>say $mday>; # 「12」
In Raku, a Slang is a user-defined Domain Specific Language - an embedded DSL.<br>Defined by a Grammar and its Actions, Slang code may be written seamlessly within any Raku code - it becomes part of the wider language.<br>Slangify is the tool that extends the native syntax in a single line of code. It's the simple and powerful way to make your DSL come alive. Either as an an embedding, or as a stand-alone user tool or both.<br>Easy to make, easy to use and easy to maintain.