Context-Free Binding Grammars

Björn Lötters, Uwe Meyer · 2024

Syntax Trees with binding structure.We take up on this idea and propose Context-Free Binding Grammars: a novel extension to Context-Free Grammars that allows us to express binding structure in a declarative fashion.In this way, we are able to define not only the syntax of a language but also how its variables are bound within their scope.By means of two representative examples from functional programming, we illustrate this capability.Our work is complemented by a proof of completeness and a restricted form of soundness, which ultimately renders our grammar formalism as a context-sensitive approach.In summary, our formalism facilitates the description of languages that incorporate the idea of name binding and thus contributes to the development of (Embedded) Domain-Specific Languages.

Read the paper · More papers on PaperTik