Editing composed languages

Student thesis: Doctoral ThesisDoctor of Philosophy

Abstract

The development of domain-specific languages and the migration of legacy software have long been problems for which language composition offers an enticing solution. Unfortunately, approaches thus far have failed to meet expectations, largely due to the difficulty of writing composed programs. Language composition editors have traditionally fallen into two extremes: traditional parsing, which is inflexible or ambiguous; or syntaxdirected editing, which programmers dislike. This thesis extends an incremental parser to create an approach that bridges the two extremes: an editor that ‘feels’ like a normal text editor, but always operates on a valid tree as in syntax-directed editing, which allows users to compose arbitrary syntaxes. I first take an existing incremental parsing algorithm and fix several errors in it. I then extend it with incremental abstract syntax trees and support for whitespace-sensitive languages, which increases the range of languages the algorithm can support. I then introduce the notion of language boxes, which allow an incremental parser to be used for language composition and implement them in a prototype editor. Finally, I show how language boxes can, in many useful cases, be automatically inserted and removed without the need for user intervention.
Date of Award1 Jun 2019
Original languageEnglish
Awarding Institution
  • King's College London
SupervisorLaurence Tratt (Supervisor) & Christian Urban (Supervisor)

Cite this

'