Re: [Cocci] Replacing #define directives with the help of SmPL

2021-03-28 Thread Julia Lawall
On Sun, 28 Mar 2021, Markus Elfring wrote: > >> Would you like to help any more with attempts to achieve support for > >> a transformation pattern like “#define ⇒ enum” according to the semantic > >> patch language? > >> https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/981 > >>

Re: [Cocci] Replacing #define directives with the help of SmPL

2021-03-28 Thread Julia Lawall
On Sun, 28 Mar 2021, Markus Elfring wrote: > > And what is the problem here? > > Would you like to discuss further software development ideas > according to another SmPL script example like the following? The following looks like what one might want to do to find #defines that are near each

Re: [Cocci] Replacing #define directives with the help of SmPL

2021-03-28 Thread Julia Lawall
On Sun, 28 Mar 2021, Markus Elfring wrote: > >> Another SmPL script example: > >> > >> @display2@ > >> identifier i; > >> expression e; > >> @@ > >> *#define i e > >> > >> > >> elfring@Sonne:~/Projekte/Coccinelle/janitor> spatch > >> show_define_usage2.cocci

Re: [Cocci] Replacing #define directives with the help of SmPL

2021-03-28 Thread Julia Lawall
On Sun, 28 Mar 2021, Markus Elfring wrote: > >> @display@ > >> @@ > >> *#define > > > > Obviously this doesn't work. Just like > > > > @@ > > @@ > > *if > > > > doesnt' work. > > Can it become possible to find such key words in the source code > (by such SmPL search approaches)? No. As has

Re: [Cocci] Replacing #define directives with the help of SmPL

2021-03-28 Thread Julia Lawall
On Sun, 28 Mar 2021, Markus Elfring wrote: > > If you find that something does not work satisfactorily, propose a > > semantic patch and show what doesn't work. > > @display@ > @@ > *#define Obviously this doesn't work. Just like @@ @@ *if doesnt' work. > > I'm not going to try to solve a

Re: [Cocci] Replacing #define directives with the help of SmPL

2021-03-28 Thread Julia Lawall
On Sun, 28 Mar 2021, Markus Elfring wrote: > >> https://github.com/coccinelle/coccinelle/issues/139 > > > > I looked at the link, but there is no concrete example of something that > > does not work, so I have no idea what the problem is. > > You expressed another bit of better understanding of

Re: [Cocci] Replacing #define directives with the help of SmPL

2021-03-28 Thread Julia Lawall
On Sun, 28 Mar 2021, Markus Elfring wrote: > Hello, > > Will the software development interests ever evolve in ways so that #define > directives > can be replaced with the help of the semantic patch language for special > source code > analysis and transformation approaches? >

[Cocci] Replacing #define directives with the help of SmPL

2021-03-28 Thread Markus Elfring
Hello, Will the software development interests ever evolve in ways so that #define directives can be replaced with the help of the semantic patch language for special source code analysis and transformation approaches? https://github.com/coccinelle/coccinelle/issues/139 Regards, Markus