Skip to main content

A Case Study in Grammar Engineering

  • Conference paper
Software Language Engineering (SLE 2008)

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

Included in the following conference series:

Abstract

This paper describes a case study about how well-established software engineering techniques can be applied to the development of a grammar. The employed development methodology can be described as iterative grammar engineering and includes the application of techniques such as grammar metrics, unit testing, and test coverage analysis. The result is a grammar of industrial strength, in the sense that it is well-tested, it can be used for fast parsing of high volumes of code, and it allows automatic generation of support for syntax tree representation, traversal, and interchange.

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. Klint, P., Lämmel, R., Verhoef, C.: Towards an engineering discipline for grammarware. Transaction on Software Engineering and Methodology, 331–380 (2005)

    Google Scholar 

  2. Malloy, B.A., Power, J.F., Waldron, J.T.: Applying software engineering techniques to parser design: the development of a c# parser. In: Proc. of the 2002 Conf. of the South African Institute of Computer Scientists and Information Technologists, pp. 75–82. In cooperation with ACM, Press, New York (2002)

    Google Scholar 

  3. Lämmel, R., Verhoef, C.: Semi-automatic Grammar Recovery. Software—Practice & Experience 31(15), 1395–1438 (2001)

    Article  MATH  Google Scholar 

  4. van der Brand, M., Sellink, A., Verhoef, C.: Current parsing techniques in software renovation considered harmful. In: IWPC 1998: Proceedings of the 6th International Workshop on Program Comprehension, pp. 108–117. IEEE Computer Society, Los Alamitos (1998)

    Google Scholar 

  5. de Jonge, M., Visser, J.: Grammers as contracts. In: Butler, G., Jarzabek, S. (eds.) GCSE 2000. LNCS, vol. 2177, pp. 85–99. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  6. Heering, J., Hendriks, P.R.H., Klint, P., Rekers, J.: The syntax definition formalism SDF — Reference manual. SIGPLAN Notices 24(11), 43–75 (1989)

    Article  Google Scholar 

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

    Google Scholar 

  8. den van Brand, M.G.J., van Deursen, A., Heering, J., de Jong, H.A., de Jonge, M., Kuipers, T., Klint, P., Moonen, L., Olivier, P.A., Scheerder, J., Vinju, J.J., Visser, E., Visser, J.: The ASF+SDF meta-environment: A component-based language development environment. In: Wilhelm, R. (ed.) CC 2001. LNCS, vol. 2027, p. 365. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  9. Visser, E., Benaissa, Z.: A Core Language for Rewriting. In: Kirchner, C., Kirchner, H. (eds.) Proc. of the Int. Workshop on Rewriting Logic and its Applications (WRLA 1998), France. ENTCS, vol. 15. Elsevier Science, Amsterdam (1998)

    Google Scholar 

  10. Lämmel, R., Visser, J.: A Strafunski Application Letter. In: Dahl, V., Wadler, P. (eds.) PADL 2003. LNCS, vol. 2562, pp. 357–375. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  11. Kuipers, T., Visser, J.: Object-oriented tree traversal with JJForester. In: Brand, M.v.d., Parigot, D. (eds.) Proceedings of the Workshop on Language Descriptions, Tools and Applications (LDTA). Electronic Notes in Theoretical Computer Science, vol. 44. Elsevier, Amsterdam (2001)

    Google Scholar 

  12. de Jonge, M.: A pretty-printer for every occasion. In: Ferguson, I., Gray, J., Scott, L. (eds.) Proceedings of the 2nd International Symposium on Constructing Software Engineering Tools (CoSET 2000), University of Wollongong, Australia (2000)

    Google Scholar 

  13. Fogel, K.: Open Source Development with CVS. Coriolis Group Books (1999)

    Google Scholar 

  14. Kort, J., Lämmel, R., Verhoef, C.: The grammar deployment kit. In: van den Brand, M., Lämmel, R. (eds.) ENTCS, vol. 65. Elsevier, Amsterdam (2002)

    Google Scholar 

  15. Power, J., Malloy, B.: A metrics suite for grammar-based software. Journal of Software Maintenance and Evolution 16, 405–426 (2004)

    Article  Google Scholar 

  16. Alves, T., Visser, J.: Metrication of SDF grammars. Technical Report DI-PURe-05.05.01, Universidade do Minho (May 2005)

    Google Scholar 

  17. Halstead, M.: Elements of Software Science. Operating, and Programming Systems Series, vol. 7. Elsevier, New York (1977)

    MATH  Google Scholar 

  18. Fenton, N., Pfleeger, S.L.: Software metrics: a rigorous and practical approach, 2nd edn. PWS Publishing Co., Boston (revised printing, 1997)

    Google Scholar 

  19. Bravenboer, M.: Parse Unit home page, http://www.program-transformation.org/Tools/ParseUnit

  20. Purdom, P.: Erratum: A Sentence Generator for Testing Parsers [BIT 12(3), 1972, p. 372]. BIT 12(4), 595–595 (1972)

    Article  MathSciNet  Google Scholar 

  21. Lämmel, R.: Grammar testing. In: Hussmann, H. (ed.) FASE 2001. LNCS, vol. 2029, pp. 201–216. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  22. Alves, T., Silva, P., Visser, J., Oliveira, J.: Strategic term rewriting and its application to a vdmsl to sql conversion. In: Fitzgerald, J.S., Hayes, I.J., Tarlecki, A. (eds.) FM 2005. LNCS, vol. 3582, pp. 399–414. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  23. International Organisation for Standardization: Information technology—Programming languages, their environments and system software interfaces—Vienna Development Method—Specification Language—Part 1: Base language, ISO/IEC 13817-1 (December 1996)

    Google Scholar 

  24. den van Brand, M., Scheerder, J., Vinju, J., Visser, E.: Disambiguation filters for scannerless generalized LR parsers. In: Horspool, R.N. (ed.) CC 2002. LNCS, vol. 2304, p. 143. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  25. Lämmel, R.: The Amsterdam toolkit for language archaeology (Extended Abstract). In: Proceedings of the 2nd International Workshop on Meta-Models, Schemas and Grammars for Reverse Engineering (ATEM 2004) (October 2004)

    Google Scholar 

  26. Erbach, G.: Tools for grammar engineering (March 15 (2000)

    Google Scholar 

  27. Volk, M.: The role of testing in grammar engineering. In: Proc. of the 3rd Conf. on Applied Natural Language Processing, Assoc. for Computational Linguistics, pp. 257–258 (1992)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Alves, T.L., Visser, J. (2009). A Case Study in Grammar Engineering. In: Gašević, D., Lämmel, R., Van Wyk, E. (eds) Software Language Engineering. SLE 2008. Lecture Notes in Computer Science, vol 5452. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-00434-6_18

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-00434-6_18

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-00433-9

  • Online ISBN: 978-3-642-00434-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics