Coccinelle, , :
identifier foo =~ "xxx";
foo , xxx. PCRE.
python :
@a@
identifier x;
@@
foo(x)
@script:python b@
x << a.x;
xx;
@@
coccinelle.xx = "%s%s" % (x,x)
@@
identifier a.x;
identifier b.xx;
@@
foo(
- x
+ xx
)
:
int main () {
foo(one);
}
int main () {
foo(oneone);
}