All of lore.kernel.org
 help / color / mirror / Atom feed
From: elfring@users.sourceforge.net (SF Markus Elfring)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Using Coccinelle to add #include lines
Date: Fri, 4 Dec 2015 17:18:36 +0100	[thread overview]
Message-ID: <5661BCDC.10707@users.sourceforge.net> (raw)
In-Reply-To: <CAFEAcA-PnYAapj3tc5CiD4r5UROcbrO0x2=7xGTv+XqCjXWFKg@mail.gmail.com>

>> The solution would be to take the position of each one, and then save only
>> the position of the earliest one.  This would require using scripts and
>> hash tables, and is kind of clunky.
> 
> Maybe I'm better off just using sed or perl for this job?

Would you dare to try the semantic patch language out a bit more together
with capabilities from programming languages like "Python" or "OCaml"?


> #include lines are really pretty much line-based after all.

How safe and robust should the desired adjustment of include statements
become for your source files?

Regards,
Markus

      parent reply	other threads:[~2015-12-04 16:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-04 15:46 [Cocci] Using Coccinelle to add #include lines Peter Maydell
2015-12-04 15:54 ` SF Markus Elfring
2015-12-04 16:05 ` Julia Lawall
2015-12-04 16:11   ` Peter Maydell
2015-12-04 16:16     ` Julia Lawall
2015-12-04 16:36       ` Peter Maydell
2015-12-04 16:18     ` SF Markus Elfring [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=5661BCDC.10707@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --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.