Julia Lawall wrote:
>> @ r @
>> identifier f;
>> expression str;
>> position p;
>> @@
>> f ( ... ) {
>> <+...
>> fi...@p( str, ...);
>> ...+>
>> }
>
> I this, you don't need the +s. They are to ensure there is at least one
> match. But the position variable is only bound if there is a match, so
> the + is redundant. There is a bit of extra work for managing it, so that
> could explain some of the performance difference.
I started simple and used only "..." but that matched only the FIXME
that appeared on all the code flow branches of a fuction. I looked for
examples and stumbled over those with the "<+...". As it worked in about
50 seconds for the simple rule looking only for the FIXME (I was still
building the SmPL rules) and as I didn't have a baseline the 50 seconds
seemed reasonable.
> Thanks for the further information. I will look at it more carefully
> later today.
I have found now the solution for the problem I was trying to solve but
if you want I'll redo the tests tonight without the "+".
thanks
bye
michael
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)