Technical report

Title:
INGRID: Creating Languages in MPS from ANTLR Grammars
Authors:
P. Vysoký, P. Parízek, V. Pech
Publication:
Technical report no. D3S-TR-2018-01, Department of Distributed and Dependable Systems, Charles University
Year:
2018
Fulltext:

Abstract:
JetBrains MPS is a language workbench, an IDE that allows developers both to write code and create language definitions. It leverages the concept of projectional editing, where the developer directly manipulates the AST representation of program code. While MPS focuses on domain-specific languages (DSL), it needs to support also general-purpose programming languages (GPPLs) — for example, to compile and run programs written in some DSL. We present INGRID, a method for construction of a language definition in MPS based on its ANTLR grammar. The structure of a language is generated automatically, but its projectional editor and other aspects has to be adjusted manually. During the development of INGRID , we encountered several chal- lenges related to the mapping between grammars and language definitions in MPS that are based on object-oriented principles. Another difficulty is that grammars do not hold any information about code layout. We implemented INGRID as a plugin for MPS and evaluated it on several mainstream GPPLs, such as JavaScript and C#. Results show that our approach is practical, and it saves the user from many hours of tedious and error-prone work. Necessary manual adjustments take only a short time.

BibTeX:
@techreport{vysoky_ingrid_report_2018,
    title = {{INGRID: Creating Languages in MPS from ANTLR Grammars}},
    author = {Vysoký, Přemysl and Parí zek, Pavel and Pech, Václav},
    year = {2018},
    institution = {Department of Distributed and Dependable Systems, Charles University},
    number = {D3S-TR-2018-01},
    pages = {1--18},
}