From: Guenter Roeck <linux@roeck-us.net>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: cocci@systeme.lip6.fr
Subject: Re: [Cocci] matching concatenated preprocessor tokens
Date: Wed, 23 Jan 2019 09:49:21 -0800 [thread overview]
Message-ID: <20190123174921.GA9781@roeck-us.net> (raw)
In-Reply-To: <alpine.DEB.2.20.1901231540410.3584@hadrien>
On Wed, Jan 23, 2019 at 03:41:24PM +0100, Julia Lawall wrote:
>
>
> 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.
>
Thanks!
Guenter
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
prev parent reply other threads:[~2019-01-23 17:49 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
2019-01-23 17:49 ` Guenter Roeck [this message]
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=20190123174921.GA9781@roeck-us.net \
--to=linux@roeck-us.net \
--cc=cocci@systeme.lip6.fr \
--cc=julia.lawall@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).