<+... ...+> is not suuported in structure declarations. You should have the same effect with plain ...

julia

On Sat, 31 Dec 2011, Markus Elfring wrote:

@is_member_function@
identifier f, s;
type t;
@@
 struct s
 {
  ...
  t (*f)(...);
  ...
 }

I have tried out the SmPL construct "nest" a few times.
http://coccinelle.lip6.fr/docs/main_grammar004.html

Now I wonder why it does not work as expected with the following variant of a filter pattern.


@is_member_function@
identifier f, s;
type t;
position p;
@@
struct s
{
 <+...
 t@p (*f)(...);
 ...+>
}


elfring@Sonne:~/Projekte/Coccinelle/lokal/demos/return_values> spatch -sp_file select_non_void_functions3.cocci example1b.c
init_defs_builtins: /usr/share/coccinelle/standard.h
679 684
Fatal error: exception Failure("minus: parse error:
= File "select_non_void_functions3.cocci", line 30, column 2,  charpos = 679
   around = '<+...', whole content =   <+...
")


Regards,
Markus

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

Reply via email to