Abstract. This paper describes a tool for the transformation of attributed trees using pattern matching. The trees to be processed are defined by a formalism based on contextfree grammars. Operations for trees such as composition and decomposition are provided. The approach can be characterized as an amalgaraation of trees or terms including pattern matching, with recursion, attribute grammars, and imperative programming. Transformations can either modify the input trees or map them to arbitrary output. Possible applications are the various transformation tasks in compilers such as semantic analysis, optimization, or the generation of intermediate representations. The design goals have been to combine an expressive and high level technique for transformation with flexibility, efficiency, and practical usability. A reliable development style is supported by static typing and checks for the single assignment property of variables. We give some example transformations and describe the input language of our tool called puma. The relationship to similar work is discussed. Finally, experimental results are presented that demonstrate the efficiency of our approach.