On Sat, 17 Feb 2018, SF Markus Elfring wrote:
> >> I would appreciate if the place for the desired predicate will be better
> >> explained.
> >>
> >> May they refer to a predefined function?
> >
> > When you write eg
> >
> > identifier x : script:python(...) { ... };
> >
> > or
> >
> > identifier x : script:ocaml(...) { ... };
> >
> > Between the { ... } you can put any code that you could put in a python or
> > ocaml script, respectively.
>
> Which parameters should be passed to the selected function?
You can always pass the declared metavariable. You can put a
comma-separated list of inherited metavariables (r.a, r.b, ...) between
the parentheses, and then use a, b, etc in the script code. If there are
no disjunctions in the rule and if the declared metavariable is no
seprated by ... from a metavariable previously declared in the same rule,
then the latter variable can be included in the () as well, with no rule
name, and then used in the script code.
julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci