Skip to Main content Skip to Navigation
Journal articles

Modular Language Implementation In Rascal ― Experience Report

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. 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.
Document type :
Journal articles
Complete list of metadata

https://hal.inria.fr/hal-01261480
Contributor : Tijs van der Storm <>
Submitted on : Monday, January 25, 2016 - 2:06:43 PM
Last modification on : Tuesday, June 15, 2021 - 10:08:01 AM

Links full text

Identifiers

Collections

Citation

Bas Basten, Jeroen van den Bos, Mark Hills, Paul Klint, Arnold Lankamp, et al.. Modular Language Implementation In Rascal ― Experience Report. Science of Computer Programming, Elsevier, 2015, 114, pp.7 - 19. ⟨10.1016/j.scico.2015.11.003⟩. ⟨hal-01261480⟩

Share

Metrics

Record views

279