Using a metavariable type for function calls?
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
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci
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
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
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_functionget_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
Quoted 5 lines
Review
Quoted 5 lines
@@
my_functionget_content;
@@(quoted diff) +1
-1-old_stuff +get_content
This can be another questionable idea around software extensions for the functions “make_…” by the module “Coccilib”.
Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci