From: rv@rasmusvillemoes.dk (Rasmus Villemoes)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Problem with "already tagged token"
Date: Thu, 11 Sep 2014 09:16:50 +0200 [thread overview]
Message-ID: <87d2b2fwyl.fsf@rasmusvillemoes.dk> (raw)
In-Reply-To: alpine.DEB.2.10.1409101808470.4747@hadrien
On Wed, Sep 10 2014, Julia Lawall <julia.lawall@lip6.fr> wrote:
> Clever :)
>
> I haven't tried this, but I think you cudl do the following:
>
> @r@
> position p;
> @@
>
> seq_puts(...);
> seq_puts(...);
> seq_puts at p(...);
>
>> @concat1 depends on patch@
>> expression s;
>> constant c1, c2;
>> position p1, p2;
>
> Now change this line to
>
> position p1 != r.p, p2 != r.p;
>
> Then you can either use Coccinelle to do the iteration, or just run the
> semantic patch over and over on the code.
>
Thanks, that seems to work. Can you tell me how I would get coccinelle
to do the iteration? It's not really that important, since the
whitespace has to be fixed manually anyway, and with your suggestion one
finds all places with at least two consecutive seq_puts calls. But it
would be nice if one would _only_ have to fix whitespace
Thanks,
Rasmus
next prev parent reply other threads:[~2014-09-11 7:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-10 15:49 [Cocci] Problem with "already tagged token" Rasmus Villemoes
2014-09-10 16:11 ` Julia Lawall
2014-09-11 7:16 ` Rasmus Villemoes [this message]
2014-09-10 16:30 ` [Cocci] Conversion of similar function calls into one with a longer parameter SF Markus Elfring
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=87d2b2fwyl.fsf@rasmusvillemoes.dk \
--to=rv@rasmusvillemoes.dk \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.