Slangify

Power up your Domain Specific Language.

Design your DSL.
Create a Grammar
to Parse your syntax.

Slangify is here to
show you how.

We focus on why,
where & how to use
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?

Most languages treat parsing as an afterthought — something you bolt on with a library, define in a string, and hope behaves.

  • 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 ...

A grammar is a class. Tokens are named. The parse tree is instant.

grammar DateParser {
    token TOP   { <year> '-' <month> '-' <day> }
    token year  { \d ** 4 }
    token month { \d ** 2 }
    token day   { \d ** 2 }
}

my $m = DateParser.parse("2026-05-12");
say $m<year>;   # 「2026」 named, not positional
say $m<month>;  # 「05」
say $m<day>;    # 「12」

In Raku, a Slang is a user-defined Domain Specific Language - an embedded DSL.

Defined by a Grammar and its Actions, Slang code may be written seamlessly within any Raku code - it becomes part of the wider language.

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.

Easy to make, easy to use and easy to maintain.