Re: [Cocci] a small nuisance report

2018-04-29 Thread Robert Larice
Julia Lawall <julia.law...@lip6.fr> writes: > On Sun, 29 Apr 2018, Robert Larice wrote: > >> Julia Lawall <julia.law...@lip6.fr> writes: >> >> > On Sun, 29 Apr 2018, Robert Larice wrote: >> > >> >> Hello, >> >> >> >

Re: [Cocci] a small nuisance report

2018-04-29 Thread Robert Larice
Julia Lawall <julia.law...@lip6.fr> writes: > On Sun, 29 Apr 2018, Robert Larice wrote: > >> Hello, >> >> attached is a small example which >> injects a statement and a comment. >> >> It works well, but does'nt do exactly as wanted. >&g

Re: [Cocci] perhaps a bug

2018-04-29 Thread Robert Larice
Julia Lawall <julia.law...@lip6.fr> writes: > On Sun, 29 Apr 2018, Robert Larice wrote: > >> Julia Lawall <julia.law...@lip6.fr> writes: >> >> > On Sun, 29 Apr 2018, Robert Larice wrote: >> > >> >> Julia Lawall <julia.law...@lip6.fr&

Re: [Cocci] perhaps a bug

2018-04-29 Thread Robert Larice
Julia Lawall <julia.law...@lip6.fr> writes: > On Sun, 29 Apr 2018, Robert Larice wrote: > >> Julia Lawall <julia.law...@lip6.fr> writes: >> >> > On Sun, 29 Apr 2018, Robert Larice wrote: >> > >> >> Hello, >> >> >> >

[Cocci] a small nuisance report

2018-04-29 Thread Robert Larice
Hello, attached is a small example which injects a statement and a comment. It works well, but does'nt do exactly as wanted. I get : +j /* comments are overrated */ +-= 3; The comment popped up within the expression instead of in front of it. no bug, but uggly.

Re: [Cocci] perhaps a bug

2018-04-29 Thread Robert Larice
Julia Lawall <julia.law...@lip6.fr> writes: > On Sun, 29 Apr 2018, Robert Larice wrote: > >> Hello, >> >> attached is a small example which does something strange >> to a "int i, j;" within a "#ifdef..." >> Perhaps t

[Cocci] perhaps a bug

2018-04-29 Thread Robert Larice
Hello, attached is a small example which does something strange to a "int i, j;" within a "#ifdef..." Perhaps this points to a bug in coccinelle, Would you please check ? Best Regards, Robert int foo(int bar) { int i, j; return bar+54; } int boo(int bar) { #ifdef BOO int

[Cocci] please help me with a "repetition"

2018-04-29 Thread Robert Larice
Hello, probably a stupid question, I'm failing to match something like this + int newvar; i++; i++; ... any sequence of only "i++"; + buckbear(42); I don't succeed to express this "maximum length repetition" in the mids of those two insertions. Best Regards, Robert

Re: [Cocci] might be bug report, breaking up of a comment

2018-03-12 Thread Robert Larice
Julia Lawall writes: > The problem is fixed now. > > julia Thank You ! ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] transform needing a calculation from a Python script

2018-03-03 Thread Robert Larice
Hello, attached is a very rough piece of .cocci which might be an aproximation of your wish and julias hint. I assembled it as a sort of excersice for myself. Regards, Robert // For example, I’d like to transform: // // #define BITMASK_A FOO(0x3F, 4) /* 0x3F0 */ // #define BITMASK_A

Re: [Cocci] might be bug report, breaking up of a comment

2018-02-17 Thread Robert Larice
Julia Lawall <julia.law...@lip6.fr> writes: > On Sat, 17 Feb 2018, Robert Larice wrote: > >> Hello, >> >> attached is a small example which seems to >> break up a comment line, >> thus commenting out following lines. >> >> Pleas

[Cocci] might be bug report, breaking up of a comment

2018-02-17 Thread Robert Larice
" Best Regards, Robert Larice // (compile "spatch --sp-file ex5.cocci ex5.c") // a might be bug report // in ex5.c there is a comment spawning to lines // this patch seems to open up this comment (behind "long reuse"), // dropping its second half, // thus effecti

Re: [Cocci] please help me with a failing match

2018-02-17 Thread Robert Larice
Julia Lawall <julia.law...@lip6.fr> writes: > On Sat, 17 Feb 2018, Robert Larice wrote: > >> Julia Lawall <julia.law...@lip6.fr> writes: >> >> > On Sat, 10 Feb 2018, Robert Larice wrote: >> > >> >> Julia Lawall <julia.law...@lip6.fr&

Re: [Cocci] please help me with a failing match

2018-02-17 Thread Robert Larice
Julia Lawall <julia.law...@lip6.fr> writes: > On Sat, 10 Feb 2018, Robert Larice wrote: > >> Julia Lawall <julia.law...@lip6.fr> writes: >> >> > On Sat, 10 Feb 2018, Robert Larice wrote: >> > >> >> Dear People, >> >> >&g

Re: [Cocci] please help me with a failing match

2018-02-10 Thread Robert Larice
Julia Lawall <julia.law...@lip6.fr> writes: > On Sat, 10 Feb 2018, Robert Larice wrote: > >> Dear People, >> >> I'm completely new here. >> >> Attached is a small piece of .c and a .cocci file. >> There is a "return 41;" in both

[Cocci] please help me with a failing match

2018-02-10 Thread Robert Larice
help me to undertand and circumvent this issue ? Best Regards, Robert Larice // (compile "spatch --sp-file try-goto-2.cocci try-goto-2.c") @trygoto@ identifier fn, Xp1, Xlabel; @@ int fn (int Xp1) { if (Xp1 > 42) { * goto Xlabel; } // the match fails if I uncomment