Skip to main content

Pattern matching in a functional transformation language using treeparsing

  • Implementation Of Pattern Matching
  • Conference paper
  • First Online:
Programming Language Implementation and Logic Programming (PLILP 1990)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 456))

Abstract

This article describes the techniques used for the implementation of pattern matching in TrafoLa-H, a functional transformation language. TrafoLa-H was designed to allow for very short and suggestive formulations of program transformations. Therefore, TrafoLa-H has a very powerful pattern language. There exist “distributed” patterns matching a set of subterms without fixed distances; patterns can match at arbitrary distance from the root of the whole term and anywhere in lists.

These powerful language constructs require special implementation techniques. By transforming TrafoLa-H patterns into regular tree grammars, and generating fast bottom-up parsers, it is possible to match even complex patterns in times linear to the size of the term to be matched.

After a short introduction of TrafoLa-H, the translation of patterns into possibly ambiguous regular tree grammars is presented, and the mechanism of variable binding is demonstrated.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. M. Alt, C. Fecht, C. Ferdinand, R. Wilhelm: The TrafoLa-H System, Bernd Krieg-Brückner (Ed.): PROSPECTRA, Springer, to appear (1990)

    Google Scholar 

  2. R. Burstall, MacQueen, D., Sannella, D.: HOPE: An Experimental Applicative Language, Report CSR-62-80, Computer Science Dept., Edinburgh, (1980)

    Google Scholar 

  3. Christian Ferdinand: Pattern Matching in TrafoLa-H, Diplomarbeit 1990

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Pierre Deransart Jan Maluszyński

Rights and permissions

Reprints and permissions

Copyright information

© 1990 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Ferdinand, C. (1990). Pattern matching in a functional transformation language using treeparsing. In: Deransart, P., Maluszyński, J. (eds) Programming Language Implementation and Logic Programming. PLILP 1990. Lecture Notes in Computer Science, vol 456. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0024195

Download citation

  • DOI: https://doi.org/10.1007/BFb0024195

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-53010-7

  • Online ISBN: 978-3-540-46298-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics