On Sun, 14 Jan 2018, SF Markus Elfring wrote:
> > Well, you didn't keep the semantic patch in the message.
>
> You can take another look in other information systems (if desired).
> https://systeme.lip6.fr/pipermail/cocci/2018-January/004848.html
>
>
> >> How do you think about to avoid the extra initialisation
> >> when only the operation mode “context” or “patch” would be active?
> >
> > context and patch use the regular expression too.
>
> Where?
Look at the script code just under the comment "For context mode" and just
under the comment "For patch mode". Both of them use m. m is declared in
the initialize.
>
>
> > All forms of the rule need it, to keep the casts that contain sparse
> > annotations.
>
> How do “annotations” matter here?
>
>
> Is a specific variable used only by two SmPL rules?
>
> …
> > +m = re.compile(pattern)
> …
> > @script:python depends on report@
> …
> > +if m.search(t) != None:
> …
>
>
> Why are two underscores used as a search pattern in this use case?
How about just removing the script code and looking your self at what
happens in eg the patch case if it is not there.
__ are typically used in sparse annotations.
julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci