Visible to the public Type-directed, whitespace-delimited parsing for embedded DSLsConflict Detection Enabled

TitleType-directed, whitespace-delimited parsing for embedded DSLs
Publication TypeConference Proceedings
Year of Publication2013
AuthorsCyrus Omar, Benjamin Chung, Darya Kurilova, Alex Potanin, Jonathan Aldrich
Conference NameGlobalDSL '13 Proceedings of the First Workshop on the Globalization of Domain Specific Languages
Date Published07/2013
PublisherACM New York, NY, USA ©2013
Conference LocationMontpellier, France
ISBN Number978-1-4503-2043-6
KeywordsCMU
Abstract

Domain-specific languages improve ease-of-use, expressiveness and verifiability, but defining and using different DSLs within a single application remains difficult. We introduce an approach for embedded DSLs where 1) whitespace delimits DSL-governed blocks, and 2) the parsing and type checking phases occur in tandem so that the expected type of the block determines which domain-specific parser governs that block. We argue that this approach occupies a sweet spot, providing high expressiveness and ease-of-use while maintaining safe composability. We introduce the design, provide examples and describe an ongoing implementation of this strategy in the Wyvern programming language. We also discuss how a more conventional keyword-directed strategy for parsing of DSLs can arise as a special case of this type-directed strategy.

DOI10.1145/2489812.2489815
Citation Keynode-30253

Other available formats:

Omar_Type_Directed_Ja.pdf
AttachmentTaxonomyKindSize
Omar_Type_Directed_Ja.pdfPDF document614.38 KBDownloadPreview
AttachmentSize
bytes