Skip to main content

Designing Syntax Embeddings and Assimilations for Language Libraries

  • Conference paper
Book cover Models in Software Engineering (MODELS 2007)

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

Abstract

Language libraries extend regular libraries with domain-specific notation. More precisely, a language library is a combination of a domain-specific language embedded in the general-purpose host language, a regular library implementing the underlying functionality, and an assimilation transformation that maps embedded DSL fragments to host language code. While the basic architecture for realizing language libraries is the same for all applications, there are many design choices to be made in the design of a particular combination of library, guest language syntax, host language, and assimilation. In this paper, we give an overview of the design space for syntax embeddings and assimilations for the realization of language libraries.

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. Bachrach, J., Playford, K.: The Java syntactic extender (JSE). In: Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2001), pp. 31–42. ACM, New York (2001)

    Google Scholar 

  2. Baker, J., Hsieh, W.: Maya: multiple-dispatch syntax extension in java. In: Programming Language Design and Implementation (PLDI 2002), pp. 270–281. ACM, New York (2002)

    Chapter  Google Scholar 

  3. Batory, D., Lofaso, B., Smaragdakis, Y.: JTS: tools for implementing domain-specific languages. In: International Conference on Software Reuse (ICSR 1998), pp. 143–153. IEEE, Los Alamitos (1998)

    Google Scholar 

  4. Begel, A., Graham, S.L.: Language analysis and tools for input stream ambiguities. In: Language Descriptions, Tools and Applications (LDTA 2004). ENTCS, Elsevier, Amsterdam (April 2004)

    Google Scholar 

  5. Brabrand, C., Vanggaard, M., Schwartzbach, M.I.: The metafront system: Extensible parsing and transformation. In: Language Descriptions, Tools and Applications (LDTA 2003), ACM, New York (April 2003)

    Google Scholar 

  6. Bravenboer, M., de Groot, R., Visser, E.: MetaBorg in action: Examples of domain-specific language embedding and assimilation using Stratego/XT. In: Lämmel, R., Saraiva, J., Visser, J. (eds.) GTTSE 2005. LNCS, vol. 4143, pp. 297–311. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  7. Bravenboer, M., Dolstra, E., Visser, E.: Preventing injection attacks with syntax embeddings. A host and guest language independent approach. In: Lawall, J. (ed.) Generative Programming and Component Engineering (GPCE 2007), pp. 3–12. ACM, New York (October 2007)

    Chapter  Google Scholar 

  8. Bravenboer, M., Tanter, E., Visser, E.: Declarative, formal, and extensible syntax definition for AspectJ. A case for scannerless generalized-LR parsing. In: Object-Oriented Programing, Systems, Languages, and Applications (OOPSLA 2006), ACM, New York (October 2006)

    Google Scholar 

  9. Bravenboer, M., van Dam, A., Olmos, K., Visser, E.: Program transformation with scoped dynamic rewrite rules. Fundamenta Informaticae 69(1–2), 123–178 (2006)

    MATH  MathSciNet  Google Scholar 

  10. Bravenboer, M., Vermaas, R., Vinju, J.J., Visser, E.: Generalized type-based disambiguation of meta programs with concrete object syntax. In: Glück, R., Lowry, M. (eds.) GPCE 2005. LNCS, vol. 3676, pp. 157–172. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  11. Bravenboer, M., Visser, E.: Concrete syntax for objects. Domain-specific language embedding and assimilation without restrictions. In: Object-Oriented Programing, Systems, Languages, and Applications (OOPSLA 2004), pp. 365–383. ACM, New York (October 2004)

    Google Scholar 

  12. Earley, J.: An efficient context-free parsing algorithm. Communications of the ACM 13(2), 94–102 (1970)

    Article  MATH  Google Scholar 

  13. Ford, B.: Packrat parsing: simple, powerful, lazy, linear time, functional pearl. In: International Conference on Functional Programming (ICFP 2002), pp. 36–47. ACM, New York (2002)

    Chapter  Google Scholar 

  14. Grimm, R.: Better extensibility through modular syntax. In: Cook, W.R. (ed.) Programming Language Design and Implementation (PLDI 2006), ACM, New York (June 2006)

    Google Scholar 

  15. Kiczales, G., Lamping, J.: L.H.R., Jr., Ruf, E.: Macros that reach out and touch somewhere. Technical report, Xerox Corporation (December 1991)

    Google Scholar 

  16. Mernik, M., Heering, J., Sloane, A.M.: When and how to develop domain-specific languages. ACM Computing Surveys 37(4), 316–344 (2005)

    Article  Google Scholar 

  17. Nystrom, N., Clarkson, M.R., Myers, A.C.: Polyglot: An extensible compiler framework for Java. In: Hedin, G. (ed.) CC 2003 and ETAPS 2003. LNCS, vol. 2622, pp. 138–152. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  18. Rekers, J.: Parser Generation for Interactive Environments. PhD thesis, University of Amsterdam (1992)

    Google Scholar 

  19. Salomon, D.J., Cormack, G.V.: Scannerless NSLR(1) parsing of programming languages. ACM SIGPLAN Notices 24(7), 170–178 (1989); In: PLDI 1989 (1989)

    Google Scholar 

  20. de Rauglaudre, D.: Camlp4 reference manual (September 2003)

    Google Scholar 

  21. Tomita, M.: Efficient Parsing for Natural Languages. A Fast Algorithm for Practical Systems. Kluwer Academic Publishers, Dordrecht (1985)

    Google Scholar 

  22. Van Wyk, E., Schwerdfeger, A.: Context-aware scanning for parsing extensible languages. In: Lawall, J. (ed.) Generative Programming and Component Engineering (GPCE 2007), pp. 63–72. ACM, New York (October 2007)

    Google Scholar 

  23. Visser, E.: Syntax Definition for Language Prototyping. PhD thesis, University of Amsterdam (September 1997)

    Google Scholar 

  24. Visser, E.: Meta-programming with concrete object syntax. In: Batory, D., Consel, C., Taha, W. (eds.) GPCE 2002. LNCS, vol. 2487, pp. 299–315. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  25. van Wijngaarden, J., Visser, E.: Program transformation mechanics. a classification of mechanisms for program transformation with a survey of existing transformation systems. Technical Report UU-CS-2003-048, Institute of Information and Computing Sciences, Utrecht University (May 2003)

    Google Scholar 

  26. Zook, D., Huang, S.S., Smaragdakis, Y.: Generating AspectJ programs with Meta-AspectJ. In: Karsai, G., Visser, E. (eds.) GPCE 2004. LNCS, vol. 3286, pp. 1–19. Springer, Heidelberg (2004)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Holger Giese

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bravenboer, M., Visser, E. (2008). Designing Syntax Embeddings and Assimilations for Language Libraries. In: Giese, H. (eds) Models in Software Engineering. MODELS 2007. Lecture Notes in Computer Science, vol 5002. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69073-3_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-69073-3_5

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-69069-6

  • Online ISBN: 978-3-540-69073-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics