KIT | KIT-Bibliothek | Impressum | Datenschutz

SugarJ: Library-based Syntactic Language Extensibility

Erdweg, Sebastian ORCID iD icon 1; Rendel, Tillmann; Kästner, Christian; Ostermann, Klaus
1 Institut für Programmstrukturen und Datenorganisation (IPD), Karlsruher Institut für Technologie (KIT)

Abstract (englisch):

Existing approaches to extend a programming language with syntactic sugar often leave a bitter taste, because they cannot be used with the same ease as the main extension mechanism of the programming language-libraries. Sugar libraries are a novel approach for syntactically extending a programming language within the language. A sugar library is like an ordinary library, but can, in addition, export syntactic sugar for using the library. Sugar libraries maintain the composability and scoping properties of ordinary libraries and are hence particularly well-suited for embedding a multitude of domain-specific languages into a host language. They also inherit self-applicability from libraries, which means that sugar libraries can provide syntactic extensions for the definition of other sugar libraries. To demonstrate the expressiveness and applicability of sugar libraries, we have developed SugarJ, a language on top of Java, SDF and Stratego, which supports syntactic extensibility. SugarJ employs a novel incremental parsing technique, which allows changing the syntax within a source file. We demonstrate SugarJ by five language extensions, including embeddings of XML and closures in Java, all available as sugar libraries. ... mehr


Zugehörige Institution(en) am KIT Institut für Programmstrukturen und Datenorganisation (IPD)
Publikationstyp Proceedingsbeitrag
Publikationsjahr 2011
Sprache Englisch
Identifikator ISBN: 978-1-4503-0940-0
ISSN: 0362-1340
KITopen-ID: 1000188529
Erschienen in Proceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA; Portland, OR, USA, 22.-27.10.2011
Veranstaltung 26th ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (2011), Portland, OR, USA, 22.10.2011 – 27.10.2011
Verlag Association for Computing Machinery (ACM)
Seiten S. 391–406
Serie ACM SIGPLAN Notices ; 46
Schlagwörter DSL embedding; Language composition; Language extensibility; Libraries; SugarJ; Syntactic sugar
Nachgewiesen in Scopus
KIT – Die Universität in der Helmholtz-Gemeinschaft
KITopen Landing Page