Date of Award

Spring 1-1-2012

Document Type


Degree Name

Master of Science (MS)


Computer Science

First Advisor

Jeremy Siek

Second Advisor

Bor-Yuh Evan Chang

Third Advisor

Sriram Sankaranarayanan


This thesis addresses the problem of specifying and parsing the syntax of domain-specific languages (DSLs) in a modular, user-friendly way. That is, we want to enable the design of composable DSLs that combine the natural syntax of external DSLs with the easy implementation of internal DSLs. The challenge in parsing composable DSLs is that the composition of several (individually unambiguous) languages is likely to contain ambiguities. In this thesis, we present the design of a system that uses a type-oriented variant of island parsing to efficiently parse the syntax of composable DSLs. In particular, we show that type-oriented island parsing is the first parsing algorithm that is constant time with respect to the number of DSLs imported. We also show how to use our tool to implement DSLs on top of a host language such as Typed Racket.