On Sat, 8 Mar 2014, SF Markus Elfring wrote:

> > In declaratin a parameter list, you can also say;
> > 
> > parameter list[n] ps;
> > 
> > and then n is the number of parameters that are matched.
> 
> Thanks for your interesting details.
> 
> I find the use of the element "n" (the name in square brackets) not obvious 
> from
> the Coccinelle manual so far.

It is the number of elements that have been matched.  You can use it in 
python code (as a string, I think), in ocaml code (as an integer), or 
inherit it into another list-typed metavariable.

> But I would like to try more analysis with the data that is passed by the
> metavariable type "parameter list". I have started to look a bit into it by 
> the
> function "pickle.dumps". This kind of display is not so useful for me yet.
> I am missing documentation for corresponding data structures I can depend on 
> in
> further reports.

What analysis do you want to do?  If you write an ocaml script, you can 
have access to the comple abstract syntax trees.  Python code only 
receives a string representation.

julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to