Abstract
Many processes can be seen as transformations of tree-like data structures. In compiler construction, for example, we continuously manipulate trees and perform tree transformations. This paper introduces a pattern matching compiler (Tom): a set of primitives which add pattern matching facilities to imperative languages such as C, Java, or Eiffel. We show that this tool is extremely non-intrusive, lightweight and useful to implement tree transformations. It is also flexible enough to allow the reuse of existing data structures.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
J. M. Crawford, D. Dvorak, D. Litman, A. Mishra, and P. F. Patel-Schneider. Path-based rules in object-oriented programming. In Proceedings of the Eighth Innovative Applications of Artificial Intelligence Conference, pages 490–497, Menlo Park, 1996. AAAI Press / MIT Press.
P. Hudak, S. L. Peyton Jones, and P. Wadler (editors). Report on the Programming Language Haskell, A Non-strict Purely Functional Language (Version 1.2). SIGPLAN Notices, Mar, 1992.
H. Kirchner and P.-E. Moreau. Promoting rewriting to a programming language: A compiler for non-deterministic rewrite programs in associative-commutative theories. Journal of Functional Programming, 11(2):207–251, 2001.
L. Leung. Prop homepage: cs1.cs.nyu.edu/phd_students/leunga/prop.html.
J. Liu and A. C. Myers. Jmatch: Iterable abstract pattern matching for java. In V. Dahl and P. Wadler, editors, Proceedings of PADL’03, volume 2562 of LNCS, pages 110–127. Springer-Verlag, 2003.
R. Milner, M. Tofte, and R. Harper. The definition of Standard ML. MIT Press, 1990.
M. Odersky and P. Wadler. Pizza into Java: Translating theory into practice. In Proceedings of the 24th ACM Symposium on Principles of Programming Languages (POPL’97), Paris, France, pages 146–159. ACM Press, USA, 1997.
M. G. J. van den Brand, H. A. de Jong, P. Klint, and P. Olivier. Efficient annotated terms. Software-Practice and Experience, 30:259–291, 2000.
M. G. J. van den Brand, P. Klint, and P. Olivier. Compilation and Memory Management for ASF+SDF. In Proceedings of Compiler Construction, 8th International Conference, volume 1575 of LNCS, pages 198–213. Springer, 1999.
M. Vittek. A compiler for nondeterministic term rewriting systems. In H. Ganzinger, editor, Proceedings of RTA’96, volume 1103 of LNCS, pages 154–168, New Brunswick (New Jersey), 1996. Springer-Verlag.
P. Weis, M. Aponte, A. Laville, M. Mauny, and A. Suárez. The CAML Reference Manual. INRIA-ENS, 1987.
M. Zenger and M. Odersky. Extensible algebraic datatypes with defaults. In Proceedings of the 6th ACM SIGPLAN International Conference on functional Programming (ICFP’2001), Florence, Italy, pages 241–252. ACM Press, 2001.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Pierre-Etienne, M., Ringeissen, C., Vittek, M. (2003). A Pattern Matching Compiler for Multiple Target Languages. In: Hedin, G. (eds) Compiler Construction. CC 2003. Lecture Notes in Computer Science, vol 2622. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-36579-6_5
Download citation
DOI: https://doi.org/10.1007/3-540-36579-6_5
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-00904-7
Online ISBN: 978-3-540-36579-2
eBook Packages: Springer Book Archive