Model-aware language specification with Java
Jaroslav Porubän, Sergej Chodarev · 2015
Tools that support development of parsers often concentrate on concrete syntax, leaving abstract syntax defined only implicitly. On the other hand there are projectional language workbenches that give central role to language model (abstract syntax) at the cost of locking a language to the concrete tool. In this paper we present YAJCo parser generator that uses model-centered approach to language definition while preserving textual representation. Abstract syntax of a language is expressed using object-oriented model in a general-purpose language with additional information and concrete syntax provided in form of annotations. In the paper we describe how abstract syntax, concrete syntax and semantics of the language are defined using YAJCo. We also describe how this method supports language composition and iterative development.