On Sat, 27 Nov 2010, Vasiliy Kulikov wrote:

> Hi,
> 
> I've found in wiki that there is no way to find an identifier that doesn't
> equals to _any_ binding of another identifier (Constraints on identifiers):
> http://cocci.ekstranet.diku.dk/wiki/doku.php?id=metavariables
> 
> Is it still true?

Yes, it is still true.  But I think you could again pass through position 
variables:

@r@
identifier i;
@@

f(i)

@s@
identifier r.i;
position p;
@@

i...@p

@@
position p != s.p
identifier i;
@@

h(i)

This should give calls to h where the argument is an identifier that was 
never used as an argument to f.

Note that there is no notion of scope for identifiers across rule 
boundaries.  They are just their names.

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

Reply via email to