ABSTRACT
Embedded domain-specific languages (EDSLs) are known to improve the productivity of developers. However, for many domains no DSL implementation is available. Two important reasons are: First, the effort to implement embedded DSLs that provide the domain's established syntax (called concrete syntax) is very high. Second, the embedded DSL and its underlying general-purpose programming language (GPL) are typically tightly integrated which hampers reusability across different GPLs.
In this paper, we present an approach that significantly reduces the necessary effort to implement embedded DSLs with concrete syntax. The idea is to use island grammars to specify the EDSL's concrete syntax. This enables the developer to implement the embedded DSL as a library and to incrementally specify the concrete syntax using meta-data. Only those parts of the EDSL's grammar need to be specified that deviate from the grammar of the GPL and which is required to enable the integration with the GPL.
- M. Bravenboer and E. Visser. Concrete Syntax for Objects: Domain-Specific Language Embedding and Assimilation without Restrictions. In OOPSLA, pages 365--383, 2004. Google ScholarDigital Library
- J. R. Cordy. The TXL Source Transformation Language. Science of Computer Programming, 61(3): 190--210, 2006. Special Issue on The Fourth Workshop on Language Descriptions, Tools, and Applications (LDTA '04). Google ScholarDigital Library
- T. Dinkelaker, M. Eichberg, and M. Mezini. An Architecture for Composing Embedded Domain-Specific Languages. In AOSD, pages 49--60. ACM, 2010. Google ScholarDigital Library
- J. Earley. An Efficient Context-Free Parsing Algorithm. Communications of the ACM, 13(2): 94--102, 1970. Google ScholarDigital Library
- B. Ford. Parsing Expression Grammars: A Recognition-Based Syntactic Foundation. ACM SIGPLAN Notices, 39(1): 122, 2004. Google ScholarDigital Library
- P. Hudak. Building Domain-Specific Embedded Languages. ACM Computing Surveys, 28(4): 196, 1996. Google ScholarDigital Library
- A. Johnstone, P. Mosses, and E. Scott. An Agile Approach to Language Modelling and Development. Innovations in Systems and Software Engineering, 6: 145--153, 2010. 10.1007/s11334-009-0111-6.Google ScholarCross Ref
- L. C. Kats, M. de Jonge, E. Nilsson-Nyman, and E. Visser. Providing Rapid Feedback in Generated Modular Language Environments: Adding Error Recovery to Scannerless Generalized-LR Parsing. In OOPSLA, pages 445--464, 2009. Google ScholarDigital Library
- R. Knöll and M. Mezini. π: A Pattern Language. ACM SIGPLAN Notices, 44(10): 503--522, 2009.Google ScholarDigital Library
- D. Knuth. Semantics of Context-Free Languages. Theory of Computing Systems, 2(2): 127--145, 1968.Google Scholar
- T. Kosar, M. López, E. Pablo, P. Barrientos, and M. Mernik. A Preliminary Study on Various Implementation Approaches of Domain-Specific Language. Information and Software Technology, 50(5): 390--405, 2008. Google ScholarDigital Library
- P. Maes. Computational Reflection. PhD thesis, Vrije Universiteit, Brussel, 1987.Google Scholar
- J. Melton and A. Eisenberg. Understanding SQL and Java together: a guide to SQLJ, JDBC, and related technologies. Morgan Kaufmann, 2000. Google ScholarDigital Library
- M. Mernik, J. Heering, and A. Sloane. When and How to Develop Domain-Specific Languages. ACM Computing Surveys (CSUR), 37(4): 316--344, 2005. Google ScholarDigital Library
- L. Moonen. Generating Robust Parsers using Island Grammars. In Proceedings of the 8th Working Conference on Reverse Engineering, pages 13--22. IEEE Computer Society, October 2001. Google ScholarDigital Library
- J. Poruban, M. Forgac, M. Sabo, and M. Behalek. Annotation Based Parser Generator. Computer Science and Information Systems, 7: 291--307, 2010.Google ScholarCross Ref
- L. Renggli, T. Gîrba, and O. Nierstrasz. Embedding Languages without Breaking Tools. ECOOP, 6183: 380--404, 2010. Google ScholarDigital Library
- N. Synytskyy, J. R. Cordy, and T. R. Dean. Robust Multilingual Parsing using Island Grammars. In Proc. of Conference of the Centre for Advanced Studies on Collaborative Research, pages 266--278. IBM Press, 2003. Google ScholarDigital Library
- L. Tratt. Domain Specific Language Implementation via Compile-Time Meta-Programming. ACM Trans. Program. Lang. Syst., 30(6): 1--40, 2008. Google ScholarDigital Library
- M. van den Brand and P. Klint. ATerms for Manipulation and Exchange of Structured Data: It's all about Sharing. Information and Software Technology, 49(1): 55--64, 2007. Google ScholarDigital Library
- M. van den Brand, J. Scheerder, J. Vinju, and E. Visser. Disambiguation Filters for Scannerless Generalized LR Parsers. In CC, LNCS. Springer, 2002. Google ScholarDigital Library
- E. Visser. Scannerless Generalized-LR Parsing. Technical Report P9707, Programming Research Group, University of Amsterdam, July 1997.Google Scholar
- E. Visser. Syntax Definition for Language Prototyping. PhD thesis, Universiteit van Amsterdam, The Netherlands, 1997.Google Scholar
Index Terms
- Incremental concrete syntax for embedded languages
Recommendations
Incremental concrete syntax for embedded languages with support for separate compilation
Embedded domain-specific languages (EDSLs) are known to improve the productivity of developers. However, for many domains no DSL implementation is available and two important reasons for this are: First, the effort to implement EDSLs that provide the ...
Concrete syntax for objects: domain-specific language embedding and assimilation without restrictions
OOPSLA '04Application programmer's interfaces give access to domain knowledge encapsulated in class libraries without providing the appropriate notation for expressing domain composition. Since object-oriented languages are designed for extensibility and reuse, ...
Concrete syntax for objects: domain-specific language embedding and assimilation without restrictions
OOPSLA '04: Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applicationsApplication programmer's interfaces give access to domain knowledge encapsulated in class libraries without providing the appropriate notation for expressing domain composition. Since object-oriented languages are designed for extensibility and reuse, ...
Comments