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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Klint, P., Lämmel, R., Verhoef, C.: Towards an engineering discipline for grammarware. Transaction on Software Engineering and Methodology, 331–380 (2005)
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)
Lämmel, R., Verhoef, C.: Semi-automatic Grammar Recovery. Software—Practice & Experience 31(15), 1395–1438 (2001)
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)
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)
Heering, J., Hendriks, P.R.H., Klint, P., Rekers, J.: The syntax definition formalism SDF — Reference manual. SIGPLAN Notices 24(11), 43–75 (1989)
Visser, E.: Syntax Definition for Language Prototyping. PhD thesis, University of Amsterdam (1997)
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)
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)
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)
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)
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)
Fogel, K.: Open Source Development with CVS. Coriolis Group Books (1999)
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)
Power, J., Malloy, B.: A metrics suite for grammar-based software. Journal of Software Maintenance and Evolution 16, 405–426 (2004)
Alves, T., Visser, J.: Metrication of SDF grammars. Technical Report DI-PURe-05.05.01, Universidade do Minho (May 2005)
Halstead, M.: Elements of Software Science. Operating, and Programming Systems Series, vol. 7. Elsevier, New York (1977)
Fenton, N., Pfleeger, S.L.: Software metrics: a rigorous and practical approach, 2nd edn. PWS Publishing Co., Boston (revised printing, 1997)
Bravenboer, M.: Parse Unit home page, http://www.program-transformation.org/Tools/ParseUnit
Purdom, P.: Erratum: A Sentence Generator for Testing Parsers [BIT 12(3), 1972, p. 372]. BIT 12(4), 595–595 (1972)
Lämmel, R.: Grammar testing. In: Hussmann, H. (ed.) FASE 2001. LNCS, vol. 2029, pp. 201–216. Springer, Heidelberg (2001)
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)
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)
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)
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)
Erbach, G.: Tools for grammar engineering (March 15 (2000)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)