On Sat, Nov 27, 2010 at 14:01 +0100, Julia Lawall wrote:
> On Sat, 27 Nov 2010, Vasiliy Kulikov wrote:
> 
> > On Sat, Nov 27, 2010 at 13:27 +0100, Julia Lawall wrote:
> > > position p != r.p;
> > 
> > Well, I wanted to do it, but if "r.p" is not found then the rule is not
> > processed:
> 
> OK good point.  It should work to then have another rule that says 
> depends on !r and doesn't inherit anything.

That helps, thank you!  Btw, you might want to add operator for such case -
either the regexp is not defined (no "r" here) or the identifier doesn't
match the regexp (the symbol combination "?=" is just for example):

@@
identifier f ?= r.f;
@@

This might simplify the rules a lot.


Thanks again,

-- 
Vasiliy
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to