Advanced

Integrating Xtext and JavaRAG: Using an attribute grammar library in a language workbench

Gigovic, Emin LU and Malmros, Philip (2016) In LU-CS-EX 2016-22 EDA920 20161
Department of Computer Science
Abstract
Having a specialized editor or IDE has become commonplace for many programming
languages. Smaller languages, especially domain-specific ones that
normally have very narrow usage areas, often lack such convenience features
due to their naturally small user base. Tools for implementing editor support
for these languages are called language workbenches. Unfortunately these often
lack features for more advanced semantic analysis, as they must be able to
handle a wide range of language specifications. Reference attribute grammars
(RAGs) can be used to formulate powerful semantic analysis and might, if integrated
with a language workbench, help alleviate this problem.

JavaRAG is a library that can be used to add RAGs to Java based... (More)
Having a specialized editor or IDE has become commonplace for many programming
languages. Smaller languages, especially domain-specific ones that
normally have very narrow usage areas, often lack such convenience features
due to their naturally small user base. Tools for implementing editor support
for these languages are called language workbenches. Unfortunately these often
lack features for more advanced semantic analysis, as they must be able to
handle a wide range of language specifications. Reference attribute grammars
(RAGs) can be used to formulate powerful semantic analysis and might, if integrated
with a language workbench, help alleviate this problem.

JavaRAG is a library that can be used to add RAGs to Java based projects,
which means it should be possible to integrate with the language workbench
Xtext, which is built on Java. This thesis has evaluated this integration of
JavaRAG into Xtext to see how beneficial the addition of RAGs would be
when constructing an editor. To do this we implemented three editors, two
relatively equivalent ones for a simple language where one only used Xtext
while the other also made use of JavaRAG. The last editor covered a subset of
a more complex language, where more advanced parts of JavaRAG could be
used.

Finally we concluded that JavaRAG could be integrated into Xtext without issue,
and that it offered beneficial functionality for more complex error-checking
problems where Xtext’s own features were sometimes lacking. (Less)
Please use this url to cite or link to this publication:
author
Gigovic, Emin LU and Malmros, Philip
supervisor
organization
alternative title
Integration av Xtext och JavaRAG: Användning av ett attributgrammatikbibliotek i ett språk-baserat editorverktyg
course
EDA920 20161
year
type
H3 - Professional qualifications (4 Years - )
subject
keywords
Xtext, JavaRAG, JastAdd, domain-specific language, editor
publication/series
LU-CS-EX 2016-22
report number
LU-CS-EX 2016-22
ISSN
1650-2884
language
English
id
8884258
date added to LUP
2016-06-22 11:47:52
date last changed
2016-06-22 11:47:52
@misc{8884258,
  abstract     = {Having a specialized editor or IDE has become commonplace for many programming
languages. Smaller languages, especially domain-specific ones that
normally have very narrow usage areas, often lack such convenience features
due to their naturally small user base. Tools for implementing editor support
for these languages are called language workbenches. Unfortunately these often
lack features for more advanced semantic analysis, as they must be able to
handle a wide range of language specifications. Reference attribute grammars
(RAGs) can be used to formulate powerful semantic analysis and might, if integrated
with a language workbench, help alleviate this problem.

JavaRAG is a library that can be used to add RAGs to Java based projects,
which means it should be possible to integrate with the language workbench
Xtext, which is built on Java. This thesis has evaluated this integration of
JavaRAG into Xtext to see how beneficial the addition of RAGs would be
when constructing an editor. To do this we implemented three editors, two
relatively equivalent ones for a simple language where one only used Xtext
while the other also made use of JavaRAG. The last editor covered a subset of
a more complex language, where more advanced parts of JavaRAG could be
used.

Finally we concluded that JavaRAG could be integrated into Xtext without issue,
and that it offered beneficial functionality for more complex error-checking
problems where Xtext’s own features were sometimes lacking.},
  author       = {Gigovic, Emin and Malmros, Philip},
  issn         = {1650-2884},
  keyword      = {Xtext,JavaRAG,JastAdd,domain-specific language,editor},
  language     = {eng},
  note         = {Student Paper},
  series       = {LU-CS-EX 2016-22},
  title        = {Integrating Xtext and JavaRAG: Using an attribute grammar library in a language workbench},
  year         = {2016},
}