1. A method in a data processing system for pattern matching and expression transformation of intermediate language expression trees, the method comprising: defining a pattern using a generic pattern definition in a computer program; responsive to detecting a match statement in the computer program, matching the pattern with an input expression; and responsive to detecting a transform statement in the computer program, matching the pattern with an input expression, and generating an output expression.