Coccinelle Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: francois.berenger@inria.fr (Francois Berenger)
To: cocci@systeme.lip6.fr
Subject: [Cocci] What is the spatch file for this change and the corresponding spatch command line invocation
Date: Thu, 04 Dec 2014 11:40:32 +0100	[thread overview]
Message-ID: <54803A20.2080207@inria.fr> (raw)
In-Reply-To: <alpine.DEB.2.10.1412041128401.2118@hadrien>

On 12/04/2014 11:29 AM, Julia Lawall wrote:
> On Thu, 4 Dec 2014, Francois Berenger wrote:
>
>> Hello,
>>
>> What is the spatch command line you used and which version of coccinelle are
>> you using?
>>
>> I tried this:
>>
>> # apply.spatch is your exact proposal
>> spatch --sp-file apply.spatch test_before.c -o /dev/stdout
>
> spatch apply.spatch test_before.c
>
> See what happens if you add -debug to the argument list.

# spatch -debug -sp apply.spatch test_before.c
init_defs_builtins: /home/berenger/.opam/4.01.0/share/coccinelle/standard.h
-----------------------------------------------------------------------
processing semantic patch file: /tmp/sp-15933-b4165a.cocci
with isos from: /home/berenger/.opam/4.01.0/share/coccinelle/standard.iso
-----------------------------------------------------------------------
@@
@@
* apply.spatch

warning: line 3: should apply be a metavariable?
(ONCE) Expected tokens spatch apply
Skipping:test_before.c
Check duplication for 0 files
@@
@@
* apply.spatch

> julia
>
>>
>> Then I see on stdout the exact same file than what's in test_before.c
>>
>> On 12/03/2014 07:13 PM, Julia Lawall wrote:
>>> @@
>>> expression i;
>>> @@
>>>
>>> for ( ; ;
>>> - ++i
>>>       ) {
>>>     if (1) {
>>> +   ++i;
>>>       continue;
>>>     }
>>> }
>>>
>>> julia
>>
>> --
>> Regards,
>> Francois.
>> _______________________________________________
>> Cocci mailing list
>> Cocci at systeme.lip6.fr
>> https://systeme.lip6.fr/mailman/listinfo/cocci
>>

-- 
Regards,
Francois.

  reply	other threads:[~2014-12-04 10:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-03 17:29 [Cocci] What is the spatch file for this change and the corresponding spatch command line invocation Francois Berenger
2014-12-03 17:34 ` Luis R. Rodriguez
2014-12-04 12:49   ` Francois Berenger
2014-12-04 12:56     ` Julia Lawall
2014-12-04 13:00       ` Francois Berenger
2014-12-04 17:31         ` Luis R. Rodriguez
2014-12-04 14:31       ` Francois Berenger
2014-12-03 18:13 ` Julia Lawall
2014-12-04 10:17   ` Francois Berenger
2014-12-04 10:29     ` Julia Lawall
2014-12-04 10:40       ` Francois Berenger [this message]
2014-12-04 11:00         ` Francois Berenger
2014-12-04 11:22         ` Julia Lawall

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=54803A20.2080207@inria.fr \
    --to=francois.berenger@inria.fr \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox