On this page:
syntax-spec:   A Metalanguage for Hosted DSLs
8.12

syntax-spec: A Metalanguage for Hosted DSLs🔗ℹ

Michael Ballantyne <michael.ballantyne@gmail.com>

This package provides a metalanguage for creating hosted DSLs. Hosted DSLs extend the syntax of Racket with their own grammar and have their own static semantics and compilers.

The metalanguage allows programmers to declare a DSL’s grammar, binding rules, and integration points with Racket. Under the hood it produces a macro expander for the DSL that parses, checks name bindings, expands DSL macros, and produces syntax in the DSL’s core language for compilation.

You can implement conventional macros that do all these same things, but it can take a lot of manual effort and a deep knowledge of Racket’s syntax API.

You might find the metalanguage useful when you both: