Skip to main content

Language Boxes

Bending the Host Language with Modular Language Changes

  • Conference paper
Book cover Software Language Engineering (SLE 2009)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5969))

Included in the following conference series:

Abstract

As domain-specific modeling begins to attract widespread acceptance, pressure is increasing for the development of new domain-specific languages. Unfortunately these DSLs typically conflict with the grammar of the host language, making it difficult to compose hybrid code except at the level of strings; few mechanisms (if any) exist to control the scope of usage of multiple DSLs; and, most seriously, existing host language tools are typically unaware of the DSL extensions, thus hampering the development process. Language boxes address these issues by offering a simple, modular mechanism to encapsulate (i) compositional changes to the host language, (ii) transformations to address various concerns such as compilation and syntax highlighting, and (iii) scoping rules to control visibility of fine-grained language extensions. We describe the design and implementation of language boxes, and show with the help of several examples how modular extensions can be introduced to a host language and environment.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Fowler, M.: Domain specific languages. Work In Progress (June 2008) http://martinfowler.com/dslwip/

  2. Bracha, G.: Executable grammars in Newspeak. Electron. Notes Theor. Comput. Sci. 193, 3–18 (2007)

    Article  Google Scholar 

  3. Goldberg, A., Robson, D.: Smalltalk 80: the Language and its Implementation. Addison Wesley, Reading (1983)

    MATH  Google Scholar 

  4. Black, A., Ducasse, S., Nierstrasz, O., Pollet, D., Cassou, D., Denker, M.: Pharo by Example. Square Bracket Associates (2009)

    Google Scholar 

  5. Denker, M., Ducasse, S., Lienhard, A., Marschall, P.: Sub-method reection. In: Journal of Object Technology, Special Issue. Proceedings of TOOLS Europe 2007, ETH, vol. 6/9, pp. 231–251 (2007)

    Google Scholar 

  6. Renggli, L., Gîrba, T.: Why Smalltalk wins the host languages shootout. In: Proceedings of International Workshop on Smalltalk Technologies (IWST 2009). ACM Digital Library, New York (to appear, 2009)

    Google Scholar 

  7. Visser, E.: Scannerless generalized-LR parsing. Technical Report P9707, Programming Research Group, University of Amsterdam (July 1997)

    Google Scholar 

  8. Hutton, G., Meijer, E.: Monadic parser combinators. Technical Report NOTTCSTR- 96-4, Department of Computer Science, University of Nottingham (1996)

    Google Scholar 

  9. Ford, B.: Parsing expression grammars: a recognition-based syntactic foundation. In: POPL 2004: Proceedings of the 31st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pp. 111–122. ACM, New York (2004)

    Chapter  Google Scholar 

  10. Ford, B.: Packrat parsing: simple, powerful, lazy, linear time, functional pearl. In: ICFP 2002: Proceedings of the seventh ACM SIGPLAN international conference on Functional programming, vol. 37/9, pp. 36–47. ACM, New York (2002)

    Chapter  Google Scholar 

  11. Foote, B., Johnson, R.E.: Reective facilities in Smalltalk-80. In: Proceedings OOPSLA 1989, October 1989. ACM SIGPLAN Notices, vol. 24, pp. 327–336 (1989)

    Google Scholar 

  12. Bawden, A.: Quasiquotation in Lisp. In: Partial Evaluation and Semantic-Based Program Manipulation, pp. 4–12 (1999)

    Google Scholar 

  13. Taha, W.: A gentle introduction to multi-stage programming. In: Domain-Specific Program Generation, pp. 30–50 (2003)

    Google Scholar 

  14. Tratt, L.: The Converge programming language. Technical Report TR-05-01, Department of Computer Science, King’s College London (February 2005)

    Google Scholar 

  15. Clark, T., Sammut, P., Willans, J.: Superlanguages, Developing Languages and Applications with XMF, vol. 1st edn. Ceteva (2008)

    Google Scholar 

  16. Seaton, C.: A programming language where the syntax and semantics are mutable at runtime. Technical Report CSTR-07-005, University of Bristol (June 2007)

    Google Scholar 

  17. Klint, P.: A meta-environment for generating programming environments. ACM Transactions on Software Engineering and Methodology (TOSEM) 2(2), 176–201 (1993)

    Article  Google Scholar 

  18. Fowler, M.: Language workbenches: The killer-app for domain-specific languages (June 2005), http://www.martinfowler.com/articles/languageWorkbench.html

  19. Cordy, J.R.: The TXL source transformation language. Sci. Comput. Program. 61(3), 190–210 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  20. Bravenboer, M., Visser, E.: Concrete syntax for objects. Domain-specific language embedding and assimilation without restrictions. In: Schmidt, D.C. (ed.) Proceedings of the 19th ACM SIGPLAN Conference on Object-Oriented Programing, Systems, Languages, and Applications (OOPSLA 2004), Vancouver, Canada, pp. 365–383. ACM Press, New York (2004)

    Chapter  Google Scholar 

  21. Visser, E.: Program transformation with Stratego/XT: Rules, strategies, tools, and systems in StrategoXT-0.9. In: Lengauer, C., Batory, D., Consel, C., Odersky, M. (eds.) Domain-Specific Program Generation. LNCS, vol. 3016, pp. 216–238. Springer, Heidelberg (2004)

    Google Scholar 

  22. Krahn, H., Rumpe, B., Völkel, S.: MontiCore: Modular development of textual domain specific languages. In: Paige, R., Meyer, B. (eds.) Proceedings of the 46th International Conference Objects, Models, Components, Patterns (TOOLS-Europe), pp. 297–315. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  23. Spinellis, D.: Notable design patterns for domain specific languages. Journal of Systems and Software 56(1), 91–99 (2001)

    Article  Google Scholar 

  24. Cleenewerck, T.: Component-based DSL development. In: Proceedings of the 2nd international conference on Generative programming and component engineering, pp. 245–264. Springer, New York (2003)

    Google Scholar 

  25. Van Wyk, E., de Moor, O., Backhouse, K., Kwiatkowski, P.: Forwarding in Attribute Grammars for Modular Language Design. In: Horspool, R.N. (ed.) CC 2002. LNCS, vol. 2304, pp. 128–142. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  26. Van Wyk, E., Krishnan, L., Bodin, D., Schwerdfeger, A.: Attribute Grammar-Based Language Extensions for Java. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 575–599. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  27. Hudak, P.: Building domain specific embedded languages. ACM Computing Surveys 28(4es) (December 1996)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Renggli, L., Denker, M., Nierstrasz, O. (2010). Language Boxes. In: van den Brand, M., Gašević, D., Gray, J. (eds) Software Language Engineering. SLE 2009. Lecture Notes in Computer Science, vol 5969. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-12107-4_20

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-12107-4_20

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-12106-7

  • Online ISBN: 978-3-642-12107-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics