> > coccinelle/demos/first.cocci may be helpful.
>
> I have got the impression that this small SmPL script demonstrates the usage
> of the mentioned function from your software library only for a simple 
> position variable.
> I do not see the way so far how desired data could be extracted from a 
> function
> (or expression?) parameter. Would you like to make the introspection options 
> a bit
> clearer for the SmPL interface?

You can inherit and test properties of anything you like in python or
ocaml code.  If you inherit some kind of metavariable other than a
position variable, the term will be represented as a string.  But that
should be fine for detecting eg if a string has only one character.  If it
has multiple characters, you can do the include match false call, so that
in the last rule when yu inherit again the metavariable containing th
string, it won't be seen.

julia
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to