From mboxrd@z Thu Jan 1 00:00:00 1970 From: timur@kernel.org (Timur Tabi) Date: Fri, 12 Oct 2018 16:42:39 -0500 Subject: [Cocci] Problem with improper multi-line string literals In-Reply-To: References: Message-ID: To: cocci@systeme.lip6.fr List-Id: cocci@systeme.lip6.fr On Fri, Oct 12, 2018 at 4:38 PM Julia Lawall 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.