From: Julia Lawall <julia.lawall@lip6.fr>
To: Guenter Roeck <linux@roeck-us.net>
Cc: cocci@systeme.lip6.fr
Subject: Re: [Cocci] matching concatenated preprocessor tokens
Date: Wed, 23 Jan 2019 15:41:24 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1901231540410.3584@hadrien> (raw)
In-Reply-To: <f2ce5bb5-0956-2ee7-4165-ebcbbedd9020@roeck-us.net>
On Wed, 23 Jan 2019, Guenter Roeck wrote:
> Hi Julia,
>
> On 1/22/19 10:35 PM, Julia Lawall wrote:
> >
> >
> > On Tue, 22 Jan 2019, Guenter Roeck wrote:
> >
> > > Hi,
> > >
> > > I am trying to match a construct such as
> > >
> > > #define func(a,b,c) \
> > > some_call(a##b, c, NULL)
> > >
> > > to replace it with, for example,
> > >
> > > #define func(a,b,c) \
> > > some_other_call(a##b, c)
> > >
> > > Is this possible with coccinelle ?
> > > I tried several variants, but I don't seem to be able to match "a##b".
> >
> > I doubt that ## is supported in the matching language. I will add it.
> >
>
> All I was able to find about the subject was in the Coccinelle change log:
>
> 20.4 Internals:
> "reorganize the way we parse C identifiers, especially concatenated cpp
> identifiers as in a##b. This may lead to some regressions as we may not
> parse as much code as before."
Yeah, it's supported on the C side, but not on the pattern matching side.
I'm working on that.
julia
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
next prev parent reply other threads:[~2019-01-23 14:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-23 3:22 [Cocci] matching concatenated preprocessor tokens Guenter Roeck
2019-01-23 6:35 ` Julia Lawall
2019-01-23 14:11 ` Guenter Roeck
2019-01-23 14:41 ` Julia Lawall [this message]
2019-01-23 17:49 ` Guenter Roeck
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=alpine.DEB.2.20.1901231540410.3584@hadrien \
--to=julia.lawall@lip6.fr \
--cc=cocci@systeme.lip6.fr \
--cc=linux@roeck-us.net \
/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).