From: timur@kernel.org (Timur Tabi)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Problem with improper multi-line string literals
Date: Fri, 12 Oct 2018 16:42:39 -0500 [thread overview]
Message-ID: <CAOZdJXWzDQay=sRwri7N_Hanzee1Qkwqg-ezLiY3_JToCp9kog@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1810122336171.2383@hadrien>
On Fri, Oct 12, 2018 at 4:38 PM Julia Lawall <julia.lawall@lip6.fr> 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.
next prev parent reply other threads:[~2018-10-12 21:42 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-12 21:28 [Cocci] Problem with improper multi-line string literals Timur Tabi
2018-10-12 21:37 ` Julia Lawall
2018-10-12 21:42 ` Timur Tabi [this message]
2018-10-12 22:24 ` Timur Tabi
2018-10-12 23:08 ` Timur Tabi
2018-10-12 23:22 ` Timur Tabi
2018-10-13 3:08 ` Julia Lawall
[not found] ` <e4e5dc37-c364-c53d-26f6-52205cfee304@users.sourceforge.net>
2018-10-13 15:56 ` Timur Tabi
2018-10-13 21:19 ` Julia Lawall
2018-10-15 16:37 ` Timur Tabi
2018-10-15 16:39 ` Julia Lawall
2018-10-15 16:50 ` Timur Tabi
2018-10-15 16:55 ` Julia Lawall
2018-10-15 18:35 ` Timur Tabi
2018-10-16 15:10 ` Himanshu Jha
2018-10-16 15:12 ` Julia Lawall
2018-10-16 16:28 ` Timur Tabi
2018-10-16 16:39 ` Julia Lawall
2018-10-16 17:14 ` Timur Tabi
2018-10-16 17:10 ` Himanshu Jha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAOZdJXWzDQay=sRwri7N_Hanzee1Qkwqg-ezLiY3_JToCp9kog@mail.gmail.com' \
--to=timur@kernel.org \
--cc=cocci@systeme.lip6.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).