Modular language implementation in Rascal - experience report

Gespeichert in:
Bibliographische Detailangaben
Titel: Modular language implementation in Rascal - experience report
Autoren: Basten, B., van den Bos, J., Hills, M., Klint, P., Lankamp, A., Lisser, B., van der Ploeg, Atze, 1982, van der Storm, T., Vinju, J.
Quelle: Science of Computer Programming. 114:7-19
Schlagwörter: Language engineering, Compiler generators, Language workbench, Meta-programming, Modularity
Beschreibung: All software evolves, and programming languages and programming language tools are no exception. And just like in ordinary software construction, modular implementations can help ease the process of changing a language implementation and its dependent tools. However, the syntactic and semantic dependencies between language features make this a challenging problem. In this paper we detail how programming languages can be implemented in a modular fashion using the RASCAL meta-programming language. RASCAL supports extensible definition of concrete syntax, abstract syntax and operations on concrete and abstract syntax trees like matching, traversal and transformation. As a result, new language features can be added without having to change existing code. As a case study, we detail our solution of the LDTA'11 Tool Challenge: a modular implementation of OBERON-0, a relatively simple imperative programming language. The approach we sketch can be applied equally well to the implementation of domain-specific languages.
Dateibeschreibung: electronic
Zugangs-URL: https://research.chalmers.se/publication/231012
http://dx.doi.org/10.1016/j.scico.2015.11.003
Datenbank: SwePub
Beschreibung
Abstract:All software evolves, and programming languages and programming language tools are no exception. And just like in ordinary software construction, modular implementations can help ease the process of changing a language implementation and its dependent tools. However, the syntactic and semantic dependencies between language features make this a challenging problem. In this paper we detail how programming languages can be implemented in a modular fashion using the RASCAL meta-programming language. RASCAL supports extensible definition of concrete syntax, abstract syntax and operations on concrete and abstract syntax trees like matching, traversal and transformation. As a result, new language features can be added without having to change existing code. As a case study, we detail our solution of the LDTA'11 Tool Challenge: a modular implementation of OBERON-0, a relatively simple imperative programming language. The approach we sketch can be applied equally well to the implementation of domain-specific languages.
ISSN:01676423
DOI:10.1016/j.scico.2015.11.003