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.
Preview
Unable to display preview. Download preview PDF.
References
M. Alt, C. Fecht, C. Ferdinand, R. Wilhelm: The TrafoLa-H System, Bernd Krieg-Brückner (Ed.): PROSPECTRA, Springer, to appear (1990)
R. Burstall, MacQueen, D., Sannella, D.: HOPE: An Experimental Applicative Language, Report CSR-62-80, Computer Science Dept., Edinburgh, (1980)
Christian Ferdinand: Pattern Matching in TrafoLa-H, Diplomarbeit 1990
Author information
Authors and Affiliations
Editor information
Rights 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