使用Grammatic/ANTLR创建模块化和可重用的DSL文本语法定义
Creating modular and reusable DSL textual syntax definitions with Grammatic/ANTLR
摘要:
在本文中,我们提出了语法-一个工具的文本语法定义。Grammatic充当解析器生成器(和其他工具)的前端,并为它们的开发工件带来模块化和重用。它适应了从面向Apsect编程到语法的关注点分离技术,并使用模板进行语法重用。我们通过描述一个案例研究来说明语法的使用:将关注点分离到ANTLR解析器生成器,这是在没有构建AST以将语义动作与语法定义分离的常见耗时和内存消耗技术的情况下实现的。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。