Coccinelle is a program matching and transformation system targeting C code.
Coccinelle provides a language, SmPL (semantic patch language), for writing
complex code patterns that may perform simple searching or that can be
annotated with transformation information. A novelty of Coccinelle is that
these patterns look very similar to ordinary source code. Nevertheless, SmPL
patterns can be made generic using pattern variables, and are matched according
to the semantics of the source code rather than the line-by-line syntax.

In developing Coccinelle, we have particularly targeted Linux kernel code.
Nevertheless, Coccinelle has been applied in the context of other open source
software projects, such as OpenSSL and Wine.  To date, over 400 patches derived
from the use of Coccinelle have been accepted into the Linux kernel source tree.