English

Creating modular and reusable DSL textual syntax definitions with Grammatic/ANTLR

Programming Languages 2009-02-17 v1 Software Engineering

Abstract

In this paper we present Grammatic -- a tool for textual syntax definition. Grammatic serves as a front-end for parser generators (and other tools) and brings modularity and reuse to their development artifacts. It adapts techniques for separation of concerns from Apsect-Oriented Programming to grammars and uses templates for grammar reuse. We illustrate usage of Grammatic by describing a case study: bringing separation of concerns to ANTLR parser generator, which is achieved without a common time- and memory-consuming technique of building an AST to separate semantic actions from a grammar definition.

Keywords

Cite

@article{arxiv.0902.2621,
  title  = {Creating modular and reusable DSL textual syntax definitions with Grammatic/ANTLR},
  author = {Andrey Breslav},
  journal= {arXiv preprint arXiv:0902.2621},
  year   = {2009}
}

Comments

Submitted to PSI'09

R2 v1 2026-06-21T12:11:53.856Z