Neverlang 2 – Componentised Language Development for the JVM

  • Walter Cazzola
  • Edoardo Vacchi
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8088)


Traditional compiler development is non-modular. Although syntax extension and DSL embedding is making its way back in modern language design and implementation, componentisation in compiler construction is still an overlooked matter. Neverlang is a language development framework that emphasises modularity and code reuse. Neverlang makes extension, restriction and feature sharing easier, by letting developers define language components in distinct, independent units, that can be compiled independently and shared across different language implementations, even in their compiled form. The semantics of the implemented languages can be specified using any JVM-supported language. In this paper we will present the architecture and implementation of Neverlang 2, by the help of an example inspired by mobile devices and context-dependent behaviour. The Neverlang framework is already being employed successfully in real-world environments.


Domain-Specific Languages Language Design and Implementation Composability and Modularity 


  1. 1.
    Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading (1986)Google Scholar
  2. 2.
    Aycock, J.: The Design and Implementation of SPARK, a Toolkit for Implementing Domain-Specific Languages. J. of Computing and Inform. Tech. 10(1), 55–66 (2004)CrossRefGoogle Scholar
  3. 3.
    Bettini, L.: Implementing Java-like Languages in xText with xSemantics. In: Proc. of SAC’13, Coimbra, Portugal, March 2013, pp. 1559–1564. ACM Press, New York (2013)Google Scholar
  4. 4.
    Bosch, J.: Delegating Compiler Objects. In: Gyimóthy, T. (ed.) CC 1996. LNCS, vol. 1060, pp. 326–340. Springer, Heidelberg (1996)CrossRefGoogle Scholar
  5. 5.
    Brabrand, C., Schwartzbach, M.I.: The Metafront System: Safe and Extensible Parsing and Transformation. J. Science of Computer Programming 68, 2–20 (2007)MathSciNetMATHCrossRefGoogle Scholar
  6. 6.
    Bravenboer, M., Kalleberg, K.T., Vermaas, R., Visser, E.: Stratego/XT 0.17. A Language and Toolset for Program Transformation. J. Science of Comp. Progr. 72(1-2), 52–70 (2008)MathSciNetCrossRefGoogle Scholar
  7. 7.
    Bravenboer, M., Visser, E.: Parse Table Composition. In: Gašević, D., Lämmel, R., Van Wyk, E. (eds.) SLE 2008. LNCS, vol. 5452, pp. 74–94. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  8. 8.
    Cazzola, W.: Domain-Specific Languages in Few Steps. In: Gschwind, T., De Paoli, F., Gruhn, V., Book, M. (eds.) SC 2012. LNCS, vol. 7306, pp. 162–177. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  9. 9.
    Cazzola, W., Poletti, D.: DSL Evolution through Composition. In: Proc. of RAM-SE’10, Maribor, Slovenia, June 2010, ACM Press, New York (2010)Google Scholar
  10. 10.
    Cazzola, W., Vacchi, E.: DEXTER and Neverlang: A Union Towards Dynamicity. In: Proc. of ICOOOLPS’12, Beijing, China, June 2012, ACM Press, New York (2012)Google Scholar
  11. 11.
    Dinkelaker, T., Eichberg, M., Mezini, M.: An Architecture for Composing Embedded Domain-Specific Languages. In: Proc. of AOSD’10, Saint-Malò, France, pp. 49–60 (2010)Google Scholar
  12. 12.
    Earley, J.: An Efficient Context-Free Parsing Algorithm. Commun. ACM 13(2), 94–102 (1970)MATHCrossRefGoogle Scholar
  13. 13.
    Efftinge, S., Eysholdt, M., Köhnlein, J., Zarnekow, S., von Massow, R., Hasselbring, W., Hanus, M.: xBase: Implementing Domain-Specific Languages for Java. In: Proc. of GPCE’12, Dresden, Germany, Sep. 2012, pp. 112–121. ACM Press, New York (2012)Google Scholar
  14. 14.
    Efftinge, S., Völter, M.: oAW xText: A Framework for Textual DSLs. In: Proc. of the EclipseCon Summit Europe 2006 (ESE’06), vol. 32, Esslingen, Germany (Nov. 2006)Google Scholar
  15. 15.
    Erdweg, S., Rendel, T., Kästner, C., Ostermann, K.: SugarJ: Library-Based Syntactic Language extensibility. In: Proc. of OOPSLA’11, Portland, OR, USA, Oct. 2011, pp. 391–406 (2011)Google Scholar
  16. 16.
    Gini, R.: Frameworks for Data Extraction and Management from Electronic Healthcare Databases for Multi-Center Epidemiologic Studies: a Comparison among EU-ADR, MATRICE, and OMOP Strategies. Keynote (Nov. 2012)Google Scholar
  17. 17.
    Grimm, R.: Practical Packrat Parsing. TR2004-854, NYU, New York, NY, USA (2004)Google Scholar
  18. 18.
    Hedin, G., Magnusson, E.: JastAdd — An Aspect-Oriented Compiler Construction System. Science of Computer Programming 47(1), 37–58 (2003)MathSciNetMATHCrossRefGoogle Scholar
  19. 19.
    Heering, J., Klint, P., Rekers, J.: Incremental Generation of Parsers. IEEE Trans. Softw. Eng. 16(12), 1344–1351 (1990)MathSciNetCrossRefGoogle Scholar
  20. 20.
    Horspool, R.: Incremental Generation of LR Parsers. J. Comp. Lang. 15(4), 205–223 (1990)CrossRefGoogle Scholar
  21. 21.
    Knöll, R., Mezini, M.: \(\mathrm\pi\): A Pattern Language. In: OOPSLA’09, pp. 503–522 (2009)Google Scholar
  22. 22.
    Krahn, H., Rumpe, B., Völkel, S.: MontiCore: A Framework for Compositional Development of Domain Specific Languages. J. SW Tools for Techn. Transfer 12(5), 353–372 (2010)CrossRefGoogle Scholar
  23. 23.
    Mernik, M., Žumer, V.: Incremental Programming Language Development. Computer Languages, Systems and Structures 31(1), 1–16 (2005)MATHCrossRefGoogle Scholar
  24. 24.
    Ng, K., Warren, M., Golde, P., Hejlberg, A.: The Roslyn Project: Exposing the C# and VB Compiler’s Code Analysis. White paper, Microsoft (Oct. 2011)Google Scholar
  25. 25.
    Odersky, M.: Reflection and Compilers. Keynote at Lang.NEXT (Apr 2012)Google Scholar
  26. 26.
    Parr, T.J., Quong, R.W.: ANTLR: A Predicated-LL(k) Parser Generator. Software—Practice and Experience 25(7), 789–810 (1995)CrossRefGoogle Scholar
  27. 27.
    Stansifer, P., Wand, M.: Parsing Reflective Grammars. In: Proc. of LDTA’11, Saarbrucken, Germany, March 2011, pp. 10:1–10:7. ACM Press, New York (2011)Google Scholar
  28. 28.
    Steinberg, D., Budinsky, D., Paternostro, M., Merks, E.: EMF: Eclipse Modeling Framework, Dec. 2008. Addison-Wesley, Reading (2008)Google Scholar
  29. 29.
    Völter, M., Pech, V.: Language Modularity with the MPS Language Workbench. In: Proc. of ICSE’12, Zürich, Switzerland, June 2012, pp. 1449–1450. IEEE Computer Society Press, Los Alamitos (2012)Google Scholar

Copyright information

© IFIP International Federation for Information Processing 2013

Authors and Affiliations

  • Walter Cazzola
    • 1
  • Edoardo Vacchi
    • 1
  1. 1.Department of Computer ScienceUniversità degli Studi di MilanoMilanoItaly

Personalised recommendations