Modular language implementation in Rascal - experience report

Bas Basten*, Jeroen van den Bos, Mark Hills, Paul Klint, Arnold Lankamp, Bert Lisser, Atze van der Ploeg, Tijs van der Storm, Jurgen Vinju

*Corresponding author for this work

Research output: Contribution to journalArticleAcademicpeer-review

17 Citations (Scopus)
25 Downloads (Pure)

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. (C) 2015 Elsevier B.V. All rights reserved.

Original languageEnglish
Pages (from-to)7-19
Number of pages13
JournalScience of computer programming
Volume114
DOIs
Publication statusPublished - 15-Dec-2015
Externally publishedYes

Keywords

  • Language engineering
  • Language workbench
  • Meta-programming
  • Modularity
  • Compiler generators
  • SYSTEM

Cite this