Abstract
Component-based development of language tools stands in need of meta-tool support. This support can be offered by generation of code — libraries or full-fledged components — from syntax definitions. We develop a comprehensive architecture for such syntax-driven meta-tooling in which grammars serve as contracts between components. This architecture addresses exchange and processing both of full parse trees and of abstract syntax trees, and it caters for the integration of generated parse and pretty-print components with tree processing components.
We discuss an instantiation of the architecture for the syntax definition formalism SDF, integrating both existing and newly developed meta-tools that support SDF. The ATerm format is adopted as exchange format. This instantiation gives special attention to adaptability, scalability, reusability, and maintainability issues surrounding language tool development.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
J. Baeten and W. Weijland. Process Algebra. Cambridge Tracts in Theoretical Computer in Science18. Cambridge University Press, 1990.
J.A. Bergstra, J. Heering, and P. Klint. The algebraic specification formalism ASF. In J. Bergstra, J. Heering, and P. Klint, editors, Algebraic Specification, ACM Press Frontier Series, pages 1–66. The ACM Press in co-operation with Addison-Wesley, 1989.
J.A. Bergstra and P. Klint. The ToolBus coordination architecture. In P. Ciancarini and C. Hankin, editors, Coordination Languages and Models (COORDINATION’96), volume 1061 of Lecture Notes in Computer Science, pages 75–88. Springer-Verlag, 1996.
R.J. Boulton. SYN: A single language for specifying abstract syntax trees, lexical analysis, parsing and pretty-printing. Technical report, Computer laboratory, University of Cambridge, 1996.
M.G.J. van den Brand, H. A. de Jong, P. Klint, and P. A. Olivier. Effficient annotated terms. Software, Practice & Experience, 30(3):259–291, 2000.
M.G.J. van den Brand, M. P. A. Sellink, and C. Verhoef. Generation of components for software renovation factories from context-free grammars. In Proceedings Fourth Working Conference on Reverse Engineering, pages 144–153. IEEE, 1997.
M.G.J. van den Brand, M. P. A. Sellink, and C. Verhoef. Current parsing techniques in software renovation considered harmful. In Proceedings of the sixth International Workshop on Program Comprehension, pages 108–117. IEEE, 1998.
T. Bray, J. Paoli, and C. M. Sperberg-McQueen. Extensible Markup Language (XML) 1. 0. Technical ReportREC-xml-19980210, World Wide Web Consortium, 1998.
A. van Deursen, J. Heering, and P. Klint, editors. Language Prototyping: An Algebraic Specification Approach, volume 5 of AMAST Series in Computing. World Scientific, 1996.
A. van Deursen and T. Kuipers. Building documentation generators. In Proceedings; IEEE International Conference on Software Maintenance, pages 40–49. IEEE Computer Society Press, 1999.
J. Heering, P. R. H. Hendriks, P. Klint, and J. Rekers. The syntax definition formalism SDF-Reference manual. SIGPLAN Notices, 24(11):43–75, 1989.
S. C. Johnson. YACC-Yet Another Compiler-Compiler. Technical Report Computer Science No. 32, Bell Laboratories, Murray Hill, New Jersey, 1975.
M. de Jonge. A Pretty-Printer for Every Occasion. In I. Ferguson, J. Gray, and L. Scott, editors, Proceedings of the 2nd International Symposium on Constructing Software Engineering Tools (CoSET2000). University of Wollongong, Australia, 2000.
J. Kort, R. Lammel, and J. Visser. Functional transformation systems. In Proceedings of the 9th International Workshop on Functional and Logic Programming, Sept. 2000.
J. Rekers. Parser Generation for Interactive Environments. PhD thesis, University of Amsterdam, 1992.
E. Visser. Syntax Definition for Language Prototyping. PhD thesis, University of Amsterdam, 1997.
E. Visser. Strategic pattern matching. In Rewriting & Techniques’ and Applications (RTA’99), volume 1631 of Lecture Notes in Computer Science pages 30–44. Springer-Verlag, 1999.
M. Wallace and C. Runciman. Haskell and XML: (Generic Combinators or Type-Based Translation? In International Conference on Functional Programming (ICFP’99), Paris, France, ACM SIGPLAN, Sept. 1999.
D. C. Wang, A. W. Appel, J. L. Korn, and C. S. Serra. The Zephyr abstract syntax description language. In Proceedings of the USENIX Conference on Domain-Specific Languages, pages 213–28, Berkeley, CA, Oct. 15-17 1997. USENIX Association.
D. S. Wile. Abstract syntax from concrete syntax. In Proceedings of the 19th International, Conference on Software Engineering (ICSE’ 97), pages 472–480, Berlin-Heidelberg-New York, May 1997. Springer
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
de Jonge, M., Visser, J. (2001). Grammars as Contracts. In: Butler, G., Jarzabek, S. (eds) Generative and Component-Based Software Engineering. GCSE 2000. Lecture Notes in Computer Science, vol 2177. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44815-2_7
Download citation
DOI: https://doi.org/10.1007/3-540-44815-2_7
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-42578-6
Online ISBN: 978-3-540-44815-0
eBook Packages: Springer Book Archive