Modular language implementation in Rascal – experience report

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 depen...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:Science of computer programming Jg. 114; S. 7 - 19
Hauptverfasser: Basten, Bas, van den Bos, Jeroen, Hills, Mark, Klint, Paul, Lankamp, Arnold, Lisser, Bert, van der Ploeg, Atze, van der Storm, Tijs, Vinju, Jurgen
Format: Journal Article
Sprache:Englisch
Veröffentlicht: Elsevier B.V 15.12.2015
Elsevier
Schlagworte:
ISSN:0167-6423, 1872-7964
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung: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. •We present an extended language engineering case-study in the meta programming language Rascal.•The case-study is the implementation of Oberon-0 (from the LDTA'11 tool challenge).•The case-study illustrates the OO-like modularity features of Rascal, to support extensible syntax definition and extensible language operations.
ISSN:0167-6423
1872-7964
DOI:10.1016/j.scico.2015.11.003