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

University essay from Lunds universitet/Institutionen för datavetenskap

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.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)