Modular language implementation in Rascal - experience report

Dec 15, 2015·
Bas Basten
Jeroen van den Bos
Jeroen van den Bos
Mark Hills
Mark Hills
Paul Klint
Paul Klint
,
Arnold Lankamp
,
Bert Lisser
,
Atze Van Der Ploeg
Tijs van der Storm
Tijs van der Storm
Jurgen Vinju
Jurgen Vinju
· 0 min read
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.
Type
Publication
Science of Computer Programming, Volume 114
Jeroen van den Bos
Authors
Jeroen van den Bos
Mark Hills
Authors
Associate Professor
Paul Klint
Authors
Paul Klint
Tijs van der Storm
Authors
Tijs van der Storm
Jurgen Vinju
Authors
Jurgen Vinju