Version 0.2.3rc1 has been released.  Some particularly interesting 
features in this version are as follows:

* An expression metavariable can be declared to be a subexpression of the 
value of an expression metavariable defined in a previous rule.  This can 
be useful with when to check that no subexpression of a subexpression has 
been redefined.  For example:

@r@
expression E;
@@

f(E);

@@
expression subE <= r.E;
expression E1;
@@

f(E);
... when != subE = E1
return E;

* An identifier metavariable can be constrained to be different than a 
previously defined identifier metavariable.  For example:

@r@
identifier f;
@@

f(3);

@@
identifier g != {r.f,something};
@@

- g(27);

* The pretty printer now attempts to add newlines when a created function 
call passes column 80.  For example,

@@
expression E1,E2,E3;
@@

- f(E1,E2,E3)
+ g(E1,E1,E1,E2,E2,E2,E3,E3,E3)

In this case, if the arguments to f are fairly large, newlines and 
appropriate indentation will be introduced in the call to g such that the 
call does not go past column 80.

There is some information about the first two points in the wiki.

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

Reply via email to