Skip to search boxSkip to navigationSkip to main content

Projecting Textual Languages

Output:
Chapter in Book/Report/Conference proceeding
Chapter
Academic
Peer-review

Information

Output type

Output:
Chapter in Book/Report/Conference proceeding
Chapter
Academic
Peer-review

Host publication Subtitle

With JetBrains MPS

Original language

English

Pages from-to (Number of pages)

Pages 197-225 (29 pages)

Publication milestones

  • Published - 15/04/2021

Publication status

Published - 15/04/2021

Publisher

Springer, Netherlands, United States, United Kingdom, Germany, Italy, France, Austria, India, Switzerland, China, Japan
978-3-030-73757-3

ISBN (Electronic)

978-3-030-73758-0

Chapter Number

8

Host publication title

Domain-Specific Languages in Practice

Host publication editors

  • Antonio Bucchiarone
  • Antonio Cicchetti
  • Federico Ciccozzi
  • Alfonso Pierantonio

Abstract

One of the strengths of the Jetbrains MPS projectional language work- bench is that it supports mixing different kinds of notations (graphical, tabular, textual, etc.). Many existing languages, however, are fully textual and are defined using grammar technology. To allow such languages to be used from within MPS, language engineers have to manually recreate the syntax of a language using MPS concepts. In this chapter we present an approach to automatically convert grammar- based languages to MPS languages, by mapping context-free grammars to MPS concept hierarchies. In addition, parse trees of programs in those languages are mapped to MPS models. As result, MPS users can import textual languages and their programs into MPS without having to write tedious boilerplate code. We have implemented the approach in a tool, Rascal2MPS, which converts grammars in the built-in grammar formalism of Rascal to MPS. Although the tool is specific for the Rascal context, the underlying approach is generic and can be instantiated for other grammar formalism. We have evaluated Rascal2MPS by generating an importer for a realistic programming language (ECMAScript 5). The results show that useable MPS editors for such languages can obtained, but that further research is needed to improve their layout.

Metrics

Metrics

Scopus
citations
4
SciVal
FWCI
1.20
SciVal
Author count
5
SciVal
Paper percentile
76
SciVal
citations
4

PlumX, opens in new tab

Citation count
4
Captures
3