On Sun, 29 Nov 2020, Markus Elfring wrote:

> >> Would any more software extensions be needed for the discussed use case
> >> if the same function call would be repeated at subsequent places?
> >
> > I think it would suffice to iterate over a rule that ensures that the
> > pattern of interest does not occur before the place where it is matched.
>
> It seems that I stumble still on understanding difficulties for the 
> application
> of “iteration” according to the SmPL meaning.
>
> Something should provide elements with which an iteration step can work 
> finally.
> I find it challenging to extract such information from mentioned demo scripts.
> https://github.com/coccinelle/coccinelle/blob/730dbb034559b3e549ec0b2973cd0400a3fa072f/docs/manual/cocci_syntax.tex#L1981

When you rule matches, ie you make a change, then you can run Coccinelle
again on the result, by calling something like the add_if_not_present
function shown in the example.

julia
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to