Download mlBNF

Transcript
Chapter 3
Related Work
In this section research and projects that are related to this project are described. We have
chosen a number of so-called language development frameworks (LDFs), basically tools which
can be used for the creation of development environments for languages, and explain what
they do and how they compare to our approach.
We have chosen five different examples of LDFs. The Meta-Environment (Section 3.1), which
is an early example of a language development framework uses SDF for defining the concrete
grammar of a language. Spoofax/IMP (Section 3.2) is based on the Eclipse development
platform and also uses SDF [32] for the definition of languages. Xtext and EMFText (Sections 3.3 and 3.4 respectively) are other LDFs based on the Eclipse platform. All these LDFs
uses parsers to transform instances of DSLs into abstract syntax definitions. MPS, Section 3.5
is a LDF which does not depend on parser generation, but is based on editing the abstract
syntax directly without the intervention of a parser.
3.1
ASF+SDF Meta-Environment
The ASF+SDF Meta-Environment, or simply the Meta-Environment[18, 31] was one of the
first language workbenches. It uses the combination of the Algebraic Specification Formalism(ASF)[3] to describe semantics of DSLs and the Syntax Definition Formalism(SDF)[12]
to describe the syntax of DSLs. Within the ASF+SDF Meta-Environment it is possible to
generate editors for DSLs using a combination of ASF and SDF, called ASF+SDF.
The latest version of the ASF+SDF Meta-Environment uses SDF2[32] instead of SDF. SDF2
is a modular syntax formalism based on SDF. The modules in SDF2 consist of a number of
sections, including a context free syntax section, in which context free production rules are
defined and a lexical syntax section in which lexical production rules are defined. SDF2 also
has a number of disambiguation constructs, for example: priorities which define priorities
between production rules and associativity indicators which indicate how the associativity of
operators is defined.
The Meta-Environment uses a bottom-up parser, called SGLR (for scanner-less generalized
LR). The disambiguation constructs defined in the SDF2 syntax are needed because of the
generalized parsing approach. The Meta-Environment uses the ATerms library[30] to repre10