Incremental concrete syntax for embedded languages with support for separate compilation

被引:7
|
作者
Dinkelaker, Tom [1 ]
Eichberg, Michael [2 ]
Mezini, Mira [2 ]
机构
[1] Ericsson R&D, Frankfurt, Germany
[2] Tech Univ Darmstadt, Darmstadt, Germany
关键词
Language embeddings; Domain-specific languages; Language design and implementation; Program transformation; Generic pre-processor;
D O I
10.1016/j.scico.2012.12.002
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Embedded domain-specific languages (EDSLs) are known to improve the productivity of developers. However, for many domains no DSL implementation is available and two important reasons for this are: First, the effort to implement EDSLs that provide the domain's established syntax (called concrete syntax) is very high. Second, the EDSL and its underlying general-purpose programming language (GPL) are typically tightly integrated. This hampers reusability across different GPLs. Besides these implementation issues, the productivity gains of using EDSLs are also limited by the lack of explicit tool support for EDSL users such as syntax highlighting or code analyses. In this paper, we present an approach that significantly reduces the necessary effort to implement embedded DSLs with concrete syntax. The idea is to use island grammars to specify the EDSL's concrete syntax. This enables the developer to implement the embedded DSL as a library and to incrementally specify the concrete syntax using meta-data. Only those parts of the EDSL's grammar need to be specified that deviate from the grammar of the GPL. By analyzing an EDSL's implementation using reflection, it is possible to provide tool support for EDSLs without having the developer implement it explicitly, such as syntax highlighting. An evaluation demonstrates the feasibility of our approach by embedding a real-world DSL into a GPL. (C) 2012 Elsevier B.V. All rights reserved.
引用
收藏
页码:615 / 632
页数:18
相关论文
共 21 条
  • [1] The Syntax of Embedded Clauses in Icelandic and Related Languages
    Engdahl, Elisabet
    [J]. NORDIC JOURNAL OF LINGUISTICS, 2012, 35 (01) : 91 - 96
  • [2] A SIMPLE SEPARATE COMPILATION MECHANISM FOR BLOCK-STRUCTURED LANGUAGES
    LEBLANC, RJ
    FISCHER, CN
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1984, 10 (03) : 221 - 227
  • [3] A Generic Abstract Syntax Model for Embedded Languages
    Axelsson, Emil
    [J]. ACM SIGPLAN NOTICES, 2012, 47 (09) : 323 - 334
  • [4] Extensible Embedded Hardware Description Languages with Compilation, Simulation and Verification
    Tahir, Omar
    Luk, Wayne
    Wu, Nicolas
    [J]. THE PROCEEDINGS OF THE 13TH INTERNATIONAL SYMPOSIUM ON HIGHLY EFFICIENT ACCELERATORS AND RECONFIGURABLE TECHNOLOGIES, HEART 2023, 2023, : 1 - 10
  • [5] Bridging concrete and abstract syntax of Web rule languages
    Milanovic, Milan
    Gasevic, Dragan
    Giurca, Adrian
    Wagner, Gerd
    Lukichev, Sergey
    Devedzic, Vladan
    [J]. WEB REASONING AND RULE SYSTEMS, PROCEEDINGS, 2007, 4524 : 309 - +
  • [6] Integrated definition of abstract and concrete syntax for textual languages
    Krahn, Holger
    Rumpe, Bernhard
    Voelkel, Steven
    [J]. MODEL DRIVEN ENGINEERING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2007, 4735 : 286 - +
  • [7] Correctly defined concrete syntax for visual modeling languages
    Baar, Thomas
    [J]. MODEL DRIVEN ENGINEERING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2006, 4199 : 111 - 125
  • [8] Classification for the Concrete Syntax of Graph-Like Modeling Languages
    Wrobel G.
    Scheffler R.
    [J]. SN Computer Science, 4 (2)
  • [9] Model Transformations to Bridge Concrete and Abstract Syntax of Web Rule Languages
    Milanovic, Milan
    Gasevic, Dragan
    Giurca, Adrian
    Wagner, Gerd
    Lukichev, Sergey
    Devedzic, Vladan
    [J]. COMPUTER SCIENCE AND INFORMATION SYSTEMS, 2009, 6 (02) : 47 - 85
  • [10] Synchronization of abstract and concrete syntax in domain-specific modeling languages
    Rath, Istvan
    Okros, Andras
    Varro, Daniel
    [J]. SOFTWARE AND SYSTEMS MODELING, 2010, 9 (04): : 453 - 471