Syntax discoverability has been a crucial advantage of structure editors for new users of a language. Despite this advantage, structure editors have not been widely adopted. Nevertheless, the Cheetah system, developed at Capgemini, leverages a structure editor to aid domain experts modeling tax-benefit rules in a domain specific language. The structure editor suffers from a lack of free form editing and conversions from/to plain text. The Spoofax language workbench, developed at Delft University of Technology, uses a textual editor, which is syntax-aware due to immediate parsing and analyses. In this thesis we describe a migration from Cheetah to Spoofax, which aims to bring the advantages of text editing to the tax-benefit rule modeling language.During the migration, we experienced that current text-based language workbenches, such as Spoofax, require redundant specification of the ingredients for a template-based editor, which is detrimental to the quality of syntactic completion, as consistency and completeness of the definition cannot be guaranteed. We describe the design and implementation of a specification language for syntax definition based on templates. It unifies the specification of parser, pretty printer and template-based editor. We evaluate the template language by application to the tax-benefit rule modeling language and a language for mobile web applications.
PrefaceAbout this thesis This work essentially consists of two parts. The first part (Chapter 2 up to Chapter 7) describes a migration of the Cheetah system at Capgemini to Spoofax, and provides the motivation for the second part. The second part (Chapter 8 up to Chapter 11) describes a language that unifies the specification of grammar, pretty printer, and templates for syntactic completion (content assist), and runtime support for the template-based editors generated from specifications in this language. The title of this thesis is derived from the second part.