[Cocci] how to pass a regexp for a virtual identifier

Julia Lawall julia.lawall at lip6.fr
Fri Mar 2 16:02:53 CET 2012


On Fri, 2 Mar 2012, David Wagner wrote:

> Hi all,
>
> I have successfully used a regular expression for a function name but
> I didn't find how to pass it on the command line.
>
> I first tried
>  identifier virtual.func
> with
>  -D func=~"^nvm_"
> but realised that it didn't make sense and then tried
>  identifier func =~ virtual.regexp
> with
>  -D regexp="^nvm_"
> but that doesn't work either.
>
> Does that functionality exists yet and if yes, how should it be used ?

No it doesn't exist.  Regular expressions are not currently metavariables. 
It could probably be added.  Identifier metavariables can be used in fresh 
identifier declarations, for example.

julia


More information about the Cocci mailing list