On Fri, Oct 12, 2018 at 4:38 PM Julia Lawall <[email protected]> wrote:
> It does look strange.  Maybe you can avoid removing and reconstructing the
> string.  For example, if you rewrite rule1 as:
>
> @rule1@
> expression x;
> expression list y;
> @@
> -DBG_PRINTF
> +NV_PRINTF
>   (
> - x,
>   y);
>
> then the code generated by rule1 is OK.  I haven't checked whether this
> can be done in the whole semantic patch, though.

That made a huge difference, thanks.  I still need to keep the Python
code that merges the string into one line, but that could be just for
my own code vs Coccinelle's parser.
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to