emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying coccinelle


From: Aurélien Aptel
Subject: Re: Trying coccinelle
Date: Mon, 18 Jun 2012 21:47:34 +0200

On Mon, Jun 18, 2012 at 6:44 PM, Dmitry Antipov <address@hidden> wrote:
> but it seems that this tool opens a lot of other opportunities. For example,
> attached patch was
> generated with the very simple "semantic patch":
>
> @expression@
> identifier I1, I2;
> expression E1, E2;
> @@
> (
> - XVECTOR (I1)->contents[I2++] = E1
> + ASET (I1, I2, E1), I2++
> |
> - XVECTOR (I1)->contents[E1] = E2
> + ASET (I1, E1, E2)
> |
> -XVECTOR (I1)->contents[E1]
> +AREF (I1, E1)
> )
>
> and following minimal manual intervention, so I suspect that more useful
> cleanups may be done
> with this tool.
>
> Dmitry

Nice work! I was the one who posted the link to coccinelle in the
thread you mentioned. It's not the silver bullet to all problems but
it's a great tool nonetheless.
I hope your post convinced other devs to use it in emacs core when possible!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]