Please incrementally reduce your example so that you can send a complete
example that exhibits the problem.
How do you think about the following result?
elfring@Sonne:~/Projekte/Coccinelle/Probe> LINE='------' &&
SCRIPT='py-test2.cocci' && cat $SCRIPT && echo $LINE && ../lokal/spatch.opt
-version && ../lokal/spatch.opt -sp_file $SCRIPT /usr/include/string.h -I
/usr/include -recursive_includes -macro_file_builtins ../lokal/standard.h
-iso_file ../lokal/standard.iso ; echo $LINE && /usr/bin/spatch -version &&
/usr/bin/spatch -sp_file $SCRIPT /usr/include/string.h -I /usr/include
-recursive_includes
@script:python@
@@
fields = []
fields.append("24")
fields.append("ABC")
print(fields)
delimiter = '|'
text=delimiter.join(fields)
print(text)
result = []
result.append(text)
result.insert(0, delimiter.join(("number", "text")))
print("\r\n".join(result))
------
spatch version 1.0.0-rc9 with Python support and with PCRE support
init_defs_builtins: ../lokal/standard.h
ImportError: No module named coccilib.elems
Failure in
Fatal error: exception Pycocci.Pycocciexception
------
spatch version 1.0.0-rc7 with Python support and with Str regexp support
init_defs_builtins: /usr/share/coccinelle/standard.h
HANDLING: /usr/include/string.h
Fatal error: exception Failure("lexical error ~ and :: not allowed in C
identifiers, try -c++ option
=File "/usr/include/sys/cdefs.h", line 106, column 43, charpos = 3508
around = 'std::name', whole content = # define __USING_NAMESPACE_STD(name)
using std::name;")
Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)