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] Replacing one (specific!) type with another
Date: Thu, 6 Oct 2016 08:30:52 +0200	[thread overview]
Message-ID: <34e90c59-2d96-6c77-4185-40e77511488c@users.sourceforge.net> (raw)
In-Reply-To: <8760p6ctgw.fsf@thinkpad.rath.org>

>> @@
>> typedef my_type;
>> idexpression mytype * p1;
>> @@
>>
>> - ptr at p1
>> + pointer
>>
>> This checks for the word ptr, and also checks that it is an identifier of
>> the right type.  I haven't tested it, so let me know if there is any problem.
> 
> Well, I don't have an actual use-case anymore.

I am curious when the next one will evolve for you.


> My problem is solved,

Nice to hear.


> I'm just curious what else I could do with Coccinelle to do :-).

This software supports a lot of development possibilities.


> Somehow I'm having a really hard time grasping the fundamentals.

The learning process can take a while as usual.


> The first two examples make sense - I could adapt them for similar situations.

Thanks for your understanding.


> But then, I still have absolutely no idea how I would come
> up with the third example, or how to adapt it.

The usage of SmPL metavariables was demonstrated a bit.


> What does "idexpression" mean?

This is a specific metavariable type which handles C variables.


> What does "ptr at p1" mean?

This expression shows the restriction of a C code identifier by the means
of a SmPL variable.


> Is this documented anywhere?

Yes, of course.
http://coccinelle.lip6.fr/docs/main_grammar002.html#elem

Would you like to help in improving corresponding descriptions?


> I'd hate to waste your time asking tons of such trivial questions
> on the mailing list,

The answers will be published from which others can hopefully learn a bit.
It will take some time to become more familiar with an evolving
software technology.

Are you looking for a FAQ document?


> but I just can't find any helpful documentation at all...

I find this feedback strange. - Where did you look so far?

The help could become better there as usual.
Which information sources did you check before?

Regards,
Markus

  parent reply	other threads:[~2016-10-06  6:30 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-05  3:27 [Cocci] Replacing one (specific!) type with another Nikolaus Rath
2016-10-05  5:45 ` Julia Lawall
2016-10-05 16:09   ` Nikolaus Rath
2016-10-05 16:39     ` Michael Stefaniuc
2016-10-05 17:21     ` [Cocci] Replacing one variable name " SF Markus Elfring
2016-10-05 22:34       ` Nikolaus Rath
2016-10-06  5:42         ` SF Markus Elfring
2016-10-06  5:56         ` Julia Lawall
2016-10-05 20:02     ` [Cocci] Replacing one (specific!) type " Julia Lawall
2016-10-05 22:38       ` Nikolaus Rath
2016-10-06  5:55         ` Julia Lawall
2016-10-08  3:16           ` Nikolaus Rath
2016-10-08  5:50             ` Julia Lawall
2016-10-08 20:45               ` Nikolaus Rath
2016-10-08 21:23                 ` Julia Lawall
2016-10-09  6:32                 ` SF Markus Elfring
2016-10-08  6:48             ` [Cocci] Usage of "expressions" and "identifiers" with SmPL SF Markus Elfring
2016-10-08  6:57               ` Julia Lawall
     [not found]               ` <alpine.DEB.2.10.1610080850470.7750@hadrien>
2016-10-08  7:49                 ` SF Markus Elfring
2016-10-08  7:56                   ` Julia Lawall
2016-10-08  8:26                     ` SF Markus Elfring
2016-10-08  8:38                       ` Julia Lawall
2016-10-08  9:25                         ` SF Markus Elfring
2016-10-08 20:28                           ` Nikolaus Rath
2016-10-09  7:49                             ` SF Markus Elfring
2016-10-09 20:38                               ` Nikolaus Rath
2016-10-10  6:48                                 ` SF Markus Elfring
2016-10-10  6:50                                   ` Julia Lawall
2016-10-06  6:30         ` SF Markus Elfring [this message]
2016-10-08  4:22       ` [Cocci] Replacing one (specific!) type with another Nikolaus Rath
2016-10-08  5:31         ` Julia Lawall
2016-10-08 20:52           ` Nikolaus Rath
2016-10-08 21:21             ` Julia Lawall
2016-10-09 20:45               ` Nikolaus Rath
2016-10-10  4:49                 ` Julia Lawall
2016-10-10  4:54                 ` Julia Lawall
2016-10-10 15:56                   ` Nikolaus Rath
2016-10-10 18:45                     ` Nikolaus Rath
2016-10-10 19:45                       ` Julia Lawall
2016-10-10 21:27                         ` Nikolaus Rath
2016-10-10 21:33                           ` Julia Lawall
2016-10-10 23:00                             ` Nikolaus Rath
2016-10-11  6:51                               ` Julia Lawall
2016-10-12 15:08                                 ` Nikolaus Rath
2016-10-12 20:37                                   ` Julia Lawall
2016-10-05  5:51 ` 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=34e90c59-2d96-6c77-4185-40e77511488c@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.