Grammars as contracts

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 A Term format is adopted as exchange format. This instantiation gives special attention to adaptability, scalability, reusability, and maintainability issues surrounding language tool development.

[1]  Jan A. Bergstra,et al.  The TOOLBUS Coordination Architecture , 1996, COORDINATION.

[2]  Ralf Lämmel,et al.  Functional Transformation Systems , 2000, WFLP.

[3]  Arie van Deursen,et al.  Building documentation generators , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

[4]  C. M. Sperberg-McQueen,et al.  Extensible Markup Language (XML) , 1997, World Wide Web J..

[5]  Arie van Deursen,et al.  Language Prototyping: An Algebraic Specification Approach , 1996, AMAST Series in Computing.

[6]  Colin Runciman,et al.  Haskell and XML: generic combinators or type-based translation? , 1999, ICFP '99.

[7]  P. Klint,et al.  Efficient annotated terms , 2000 .

[8]  Jan A. Bergstra,et al.  The algebraic specification formalism ASF , 1989 .

[9]  Andrew W. Appel,et al.  The Zephyr Abstract Syntax Description Language , 1997, DSL.

[10]  J. C. M. Baeten,et al.  Process Algebra: Bibliography , 1990 .

[11]  Chris Verhoef,et al.  Generation of components for software renovation factories from context-free grammars , 2000, Sci. Comput. Program..

[12]  Merijn de Jonge,et al.  HASDF : a generalized LR-parser generator for Haskell , 1999 .

[13]  Eelco Visser,et al.  Syntax definition for language prototyping , 1997 .

[14]  Jan A. Bergstra,et al.  Algebraic specification , 1989 .

[15]  Joost Visser,et al.  Hasdf: A generalised lr-parser generator for haskell. Technical Report SEN-R9920 , 1999 .

[16]  Murray Hill,et al.  Yacc: Yet Another Compiler-Compiler , 1978 .

[17]  Paul Klint,et al.  The syntax definition formalism SDF—reference manual— , 1989, SIGP.

[18]  Eelco Visser,et al.  Strategic Pattern Matching , 1999, RTA.

[19]  Chris Verhoef,et al.  Current parsing techniques in software renovation considered harmful , 1998, Proceedings. 6th International Workshop on Program Comprehension. IWPC'98 (Cat. No.98TB100242).

[20]  M. Jonge,et al.  A pretty-printer for every occasion , 2001 .

[21]  J. Rekers,et al.  Parser Generation for Interactive Environments , 1992 .

[22]  David S. Wile,et al.  Abstract Syntax from Concrete Syntax , 1997, Proceedings of the (19th) International Conference on Software Engineering.

[23]  C. M. Sperberg-McQueen,et al.  eXtensible Markup Language (XML) 1.0 (Second Edition) , 2000 .