Thanks, it works
--------------------------------------------------------------------------------
From: SF Markus Elfring
Sent: Wednesday, June 13, 2012 2:55 PM
To: yafo lee
Cc: Coccinelle
Subject: Re: [Cocci] Re: Deletion of some macro calls
#spatch --sp-file c2.cocci alx_main.c -o aaa.c
init_defs_builtins: /usr/local/share/coccinelle/standard.h
19 26
Fatal error: exception Failure("meta: parse error:
= File "c2.cocci", line 2, column 16, charpos = 19
around = 'MODULE_', whole content = declarer xyz =~
MODULE_(AUTHOR|DESCRIPTION|LICENSE);
")
[...]
spatch version 1.0.0-rc12 with Python support and with PCRE support
[...]
FreeBSD yafo-freebsd 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3
07:15:25 UTC
2012
[email protected]:/usr/obj/usr/src/sys/GENERIC i386
Does the following approach (with quotes around the regular expression) work
as
expected on your source files?
@@
declarer xyz =~ "MODULE_(AUTHOR|DESCRIPTION|LICENSE)";
@@
-xyz(...);
http://coccinelle.lip6.fr/docs/main_grammar010.html#regexp
Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)