On Sat, 21 May 2011, Francis Galiegue wrote:

> [...]
> >
> > @script:python nm@
> > c << case2.c;
> > uc;
> > newc1;
> > newc2;
> > @@
> >
> > uc = "%s" % c
> > uc = re.sub(r'^"', r'', uc)
> > uc = re.sub(r'"$', r'', uc)
> > coccinelle.newc1 = "\"%s%%s\"" % uc
> > coccinelle.newc2 = "\"%%s%s\"" % uc
> >
> 
> OK, in case anyone is interested, here is a three-line version of this
> same script, which doesn't require to "import re":
> 
> uc = str(c)[1:-1]
> newc1 = "\"" + uc + "%s\""
> newc2 = "\"%s" + uc + "\""

I think you should still need coccinelle.newc1, coccinelle.newc2

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

Reply via email to