Skip to main content

Extensible Grammars for Language Specialization

  • Conference paper
Database Programming Languages (DBPL-4)

Part of the book series: Workshops in Computing ((WORKSHOPS COMP.))

Abstract

A frequent dilemma in the design of a database programming language is the choice between a language with a rich set of tailored notations for schema definitions, query expressions, etc., and a small, simple core language. We address this dilemma by proposing extensible grammars, a syntax-definition formalism for incremental language extensions and restrictions based on an initial core language.

The translation of programs written in rich object languages into a small core language is defined via syntax-directed patterns. In contrast to macro-expansion and program-rewriting tools, our extensible grammars respect scoping rules. Therefore, we can introduce binding constructs while avoiding problems with unwanted name clashes.

We develop extensible grammars and illustrate their use by extending the lambda calculus with let-bindings, conditionals, and SQL-style query expressions. We then give a formal description of the underlying parsing, transformation, and substitution rules. Finally, we sketch how these rules are exploited in the implementation of a generic, extensible parser package.

The second author was supported by the European Commission, ESPRIT, EC/US-FIDE Collaborative Activity, 006:9829.

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. A.V. Aho, R. Sethi, and J.D. Ullmann. Compilers: Principles, Techniques and Tools. Addison-Wesley, 1987.

    Google Scholar 

  2. A. Bove and L. Arbilla. A Confluent Calculus of Macro Expansion and Evaluation. In ACM Conference on Lisp and Functional Programming, pages 278–287, 1992.

    Google Scholar 

  3. V. Breazu-Tannen, P. Buneman, and S. Naqvi. Structural Recursion as a Query Language. In Proceedings of the Third International Workshop on Database Programming Languages,Nafplion, Greece, 1991. Morgan Kaufmann Publishers.

    Google Scholar 

  4. L. Cardelli. An Implementation of F. Report 97, Digital Equipment Corporation, Systems Research Center, 1993.

    Google Scholar 

  5. T. Griffin. Notational definition — A formal account. In Proceedings Symposium on Logic in Computer Science, pages 372–383, 1988.

    Google Scholar 

  6. E. Kohlbecker, D.P. Friedman, M. Felleisen, and B. Duba. Hygienic macro expansion. In ACM Conference on Lisp and Functional Programming, 1992.

    Google Scholar 

  7. G.N.C. Kirby. Persistent Programming with Strongly Typed Linguistic Reflection. FIDE Technical Report Series FIDE/92/40, FIDE Project Coordinator, Department of Computing Sciences, University of Glasgow, 1992.

    Google Scholar 

  8. E.E. Kohlbecker. Syntactic extensions in the programming language LISP. PhD thesis, Indiana University, 1986.

    Google Scholar 

  9. B.W. Kernighan and D.M. Ritchie. The C Programming Language. Prentice Hall, Englewood Cliffs, NJ, 1977.

    Google Scholar 

  10. F. Matthes. Persistente Objektsysteme: Integrierte Datenbankentwicklung and Programmerstellung. Springer-

    Google Scholar 

  11. M. Manny and D. Rauglaudre. Parsers in ML. In ACM Conference on Lisp and Functional Programming, 1992.

    Google Scholar 

  12. F. Matthes and J.W. Schmidt. Bulk Types: Built-In or Add-On? In Proceedings of the Third International Workshop on Database Programming Languages,Nafplion, Greece, 1991. Morgan Kaufmann Publishers.

    Google Scholar 

  13. S.A. Naqvi. Stratification as a Design Principle in Logical Query Languages. In Proceedings of the Second International Workshop on Database Programming Languages, Salishan, Oregon, 1989.

    Google Scholar 

  14. A. Ohori, P. Buneman, and V. Breazu-Tannen. Database Programming in Machiavelli — a Polymorphic Language with Static Type Inference. In Proceedings of the ACM-SIGMOD International Conference on Management of Data, Portland, Oregon, pages 46–57, 1989.

    Google Scholar 

  15. B. Pierce and D. Turner. Object-Oriented Programming without Recursive Types. In Proceedings of the 20th ACM Symposium on Principles of Programming Languages, pages 299–312, 1993.

    Google Scholar 

  16. J.M. Smith, S. Fox, and T. Landers. ADAPLEX: Rationale and Reference Manual ( 2nd ed. ). Technical report, Computer Corporation of America, Cambridge, Mass., 1983.

    Google Scholar 

  17. D. Stemple, R. Morrison, and Atkinson M. Type-safe Linguistic Reflection. In Database Programming Languages: Bulk Types and Persistent Data,pages 357–362, Nafplion, Greece, 1991. Morgan Kaufmann Publishers.

    Google Scholar 

  18. ISO. Standard ISO 9075, Information processing systems–Database language SQL,1987.

    Google Scholar 

  19. D. Stemple and T. Sheard. A Recursive Base for Database Programming Primitives. In Proceedings of the Kiev East/West Workshop on Next Generation Database Technology, volume 504 of Lecture Notes in Computer Science, 1991.

    Google Scholar 

  20. D. Stemple, T. Sheard, and L. Fegaras. Linguistic Reflection: A Bridge from Programming to Database Languages. In Proc.

    Google Scholar 

  21. D. Stemple, A. Socorro, and T. Sheard. Formalizing Objects for Databases using ADABTPL. In Advances in Object-Oriented Database Systems, pages 110–172, 1988.

    Chapter  Google Scholar 

  22. D. Stemple, R.B. Stanton, T. Sheard, P. Philbrow, R. Morrison, G.N.C. Kirby, L. Fegaras, R.L. Cooper, R.C.H. Connor, M.P. Atkinson, and S. Alagic. Type-Safe Linguistic Reflection: A Generator Technology. Research Report CS/92/6, Univ. of St. Andrews, Dept. of Comp. Science, 1992.

    Google Scholar 

  23. P. Trinder. Comprehensions, a Query Notation for DBPLs. In Proceedings of the Third International Workshop on Database Programming Languages,Nafplion, Greece, 1991. Morgan Kaufmann Publishers.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1994 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Cardelli, L., Matthes, F., Abadi, M. (1994). Extensible Grammars for Language Specialization. In: Beeri, C., Ohori, A., Shasha, D.E. (eds) Database Programming Languages (DBPL-4). Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3564-7_2

Download citation

  • DOI: https://doi.org/10.1007/978-1-4471-3564-7_2

  • Publisher Name: Springer, London

  • Print ISBN: 978-3-540-19853-6

  • Online ISBN: 978-1-4471-3564-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics