[Cocci] "TODO: FunCall" in python match printing
c-d.hailfinger.devel.2006 at gmx.net
Fri Mar 6 12:00:53 CET 2009
On 06.03.2009 11:03, Julia Lawall wrote:
> On Fri, 6 Mar 2009, Carl-Daniel Hailfinger wrote:
>> On 06.03.2009 08:56, Julia Lawall wrote:
>>> Below is a patch for Coccinelle-0.1.5 that solves the Funcall problem. It
>>> also solves a problem with casts.
>> It seems your copy of 0.1.5 differs from my downloaded source copy of
>> 0.1.5 (coccinelle-0.1.5.tgz).
>> The hunk affecting coccinelle-0.1.5/python/pycocci.ml does not apply
>> here and the code it refers to lives in
>> coccinelle-0.1.5/python/yes_pycocci.ml instead. I changed the patch
>> accordingly and installed current menhir, but now I get this error:
> Right. This was my comment about the links and the need perhaps to start
> from scratch. But perhaps I got it backwards - there are the yes
> and no versions in the distribution and pycocci and pycocci_aux after
> running ./configure...
>> ocamlc -I ../commons -I ../commons/ocamlextra -I ../globals -I
>> ../pycaml -I ../parsing_c -I ../parsing_cocci -c pycocci.ml
>> File "pycocci.ml", line 203, characters 45-51:
>> This expression has type
>> Ast_c.expression = (Ast_c.expressionbis * Ast_c.exp_info ref) * Ast_c.il
>> but is here used with type Ast_c.expressionbis
>> make: *** [pycocci.cmo] Error 2
>> make: Leaving directory `/sources/tmptrees/coccinelle-0.1.5/python'
>> make: *** [python] Error 2
>> make: Leaving directory `/sources/tmptrees/coccinelle-0.1.5'
>> make: *** [all] Error 2
>> If you have an updated patch, I'll test.
> I think the patch is ok as is, except for the file name problem. Could
> you try starting over, but first edit the patch to replace all occurrences
> of pycocci_aux.ml with yes_pycocci_aux.ml and all occurrences of
> pycocci.ml by yes_pycocci.ml?
patching file parsing_cocci/parser_cocci_menhir.mly
patching file python/yes_pycocci_aux.ml
Hunk #1 FAILED at 22.
Hunk #2 FAILED at 32.
2 out of 2 hunks FAILED -- saving rejects to file
patching file python/yes_pycocci.ml
I downloaded Coccinelle 0.1.6beta2 and tried to apply the patch there,
but that failed as well.
If there is any tarball or source repo where I can get a version that
works with your patch, please tell me about it.
By the way, Coccinelle 0.1.6beta2 requires psycopg2 which is a rather
rare package, but the add_ticket functionality seems to be the only user
and add_ticket seems to be unused yet. PostgreSQL is installed on my
machine, so installing psycopg2 is OK. Using add_ticket would still
require to set up a PostgreSQL user with sufficient access rights,
though. Another unusual requirement is trac.util.datefmt.
I can see where you're going, and it would be great to make these
requirements not mandatory.
More information about the Cocci