> @script:python s@
> c << r.c;
> c2;
> @@
> if c.startswith('"NVRM: '):
> coccinelle.c2 = '"' + c[7:];
> else:
> coccinelle.c2 = c;
I have got another software development idea for this transformation approach.
The detection of unwanted prefixes could be moved into a regular expression
like “^"NVRM: ” for the constraint of the metavariable for which SmPL
inheritance
is used here, couldn't it?
The shown SmPL rule “s” needs to work only with matching data then so that
the Python code could be reduced to the statement “coccinelle.c2 = '"' + c[7:]”.
How do you think about to try such a script variant out besides adjustments
for comma positions?
https://systeme.lip6.fr/pipermail/cocci/2018-July/005212.html
Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci