Skip to contentSkip to conversation

Using a metavariable type for function calls?

Cocci Markus Elfring 2 participants 5 messages Nov 14, 2019

lore
Share & tools
lore
#1 lore raw
Quoted 5 lines · Markus Elfring

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

Quoted 8 lines

Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

#2 lore raw
Quoted 5 lines
Quoted 3 lines

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

Quoted 2 lines

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
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

#3 lore raw
Quoted 13 lines · Markus Elfring
Quoted 5 lines
Quoted 3 lines

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;
@@

(quoted diff) +1 -1
-old_stuff
+get_content
Quoted 4 lines
Quoted 2 lines

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
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci