Implementing an embedded compiler using program transformation rules

Periodicals(2015)

引用 5|浏览35
暂无评分
摘要
AbstractDomain-specific languages DSLs are well-recognized to ease programming and improve robustness for a specific domain, by providing high-level domain-specific notations and checks of domain-specific properties. The compiler of a DSL, however, is often difficult to develop and maintain, because of the need to define a specific treatment for a large and potentially increasing number of language constructs. To address this issue, we propose an approach for specifying a DSL compiler using control-flow sensitive concrete-syntax based matching rules. These rules either collect information about the source code to carry out checks or perform transformations to carry out compilation. Because rules only mention the relevant constructs, using their concrete syntax, and hide the complexity of control-flow graph traversal, it is easy to understand the purpose of each rule. Furthermore, new compilation steps can be added using only a small number of lines of code. We explore this approach in the context of the z2z DSL for network gateway development and show that it is beneficial to implement the core of its compiler in this manner.Copyright © 2013 John Wiley & Sons, Ltd.
更多
查看译文
关键词
DSL,compiler construction,internal (embedded) languages,embedded compilers,program transformation
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要