* [Cocci] Using a metavariable type for function calls?
@ 2019-11-14 14:42 Markus Elfring
2019-11-14 15:33 ` Julia Lawall
0 siblings, 1 reply; 5+ messages in thread
From: Markus Elfring @ 2019-11-14 14:42 UTC (permalink / raw)
To: Coccinelle
Hello,
Some metavariable types are supported by the semantic patch language so far.
Can it become helpful to let a customised function determine the concrete
value which should be used for a source code transformation specification?
Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Cocci] Using a metavariable type for function calls?
2019-11-14 14:42 [Cocci] Using a metavariable type for function calls? Markus Elfring
@ 2019-11-14 15:33 ` Julia Lawall
2019-11-14 16:00 ` Markus Elfring
0 siblings, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2019-11-14 15:33 UTC (permalink / raw)
To: Markus Elfring; +Cc: Coccinelle
On Thu, 14 Nov 2019, Markus Elfring wrote:
> Hello,
>
> Some metavariable types are supported by the semantic patch language so far.
> Can it become helpful to let a customised function determine the concrete
> value which should be used for a source code transformation specification?
I have no idea what you are asking for. You can already write code in
python or ocaml scripts that binds metavariables that you can use in later
rules.
julia
>
> Regards,
> Markus
> _______________________________________________
> Cocci mailing list
> Cocci@systeme.lip6.fr
> https://systeme.lip6.fr/mailman/listinfo/cocci
>
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Cocci] Using a metavariable type for function calls?
2019-11-14 15:33 ` Julia Lawall
@ 2019-11-14 16:00 ` Markus Elfring
2019-11-14 16:02 ` Julia Lawall
0 siblings, 1 reply; 5+ messages in thread
From: Markus Elfring @ 2019-11-14 16:00 UTC (permalink / raw)
To: Julia Lawall; +Cc: Coccinelle
>> Some metavariable types are supported by the semantic patch language so far.
>> Can it become helpful to let a customised function determine the concrete
>> value which should be used for a source code transformation specification?
>
> I have no idea what you are asking for.
@@
my_function get_content;
@@
-old_stuff
+get_content
> You can already write code in python or ocaml scripts that binds metavariables
> that you can use in later rules.
Do you refer to scripted constraints here?
Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Cocci] Using a metavariable type for function calls?
2019-11-14 16:00 ` Markus Elfring
@ 2019-11-14 16:02 ` Julia Lawall
2019-11-14 16:23 ` Markus Elfring
0 siblings, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2019-11-14 16:02 UTC (permalink / raw)
To: Markus Elfring; +Cc: Coccinelle
On Thu, 14 Nov 2019, Markus Elfring wrote:
> >> Some metavariable types are supported by the semantic patch language so far.
> >> Can it become helpful to let a customised function determine the concrete
> >> value which should be used for a source code transformation specification?
> >
> > I have no idea what you are asking for.
>
> @@
> my_function get_content;
> @@
> -old_stuff
> +get_content
>
>
> > You can already write code in python or ocaml scripts that binds metavariables
> > that you can use in later rules.
>
> Do you refer to scripted constraints here?
No. Like in demos/pythontococci.cocci
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-11-14 16:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-14 14:42 [Cocci] Using a metavariable type for function calls? Markus Elfring
2019-11-14 15:33 ` Julia Lawall
2019-11-14 16:00 ` Markus Elfring
2019-11-14 16:02 ` Julia Lawall
2019-11-14 16:23 ` Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).