On Sat, 27 Nov 2010, Jani Monoses wrote:

> 
> > Perhaps we could organize a project to connect the two.  If anyone has
> > some good arguments as to why the kinds of transformations Coccinelle is
> > good at would be useful in C++ code, that could be helpful.  Actually, I
> 
> I think many of the simple non C++ specific evolutions Coccinelle already does
> could be useful on C++ codebases as well. Just as I suppose it can already be
> used for non-linux-kernel C projects.
> 
> Also maybe new kinds of transformations can be written, if Coccinelle provides
> a good foundation (I only started reading about it so not sure if this is the
> case at the moment)
> 
> I started looking at Coccinelle and Pork after seeing many of the new
> LibreOffice project's easy contribution tasks are simple to do, but are
> slightly more complex than sed can handle, or in any case would be much
> cleaner expressed in spatch syntax than using convoluted regexps.
> 
> They have tasks like changing
> Type v = function(id)
> into
> Type v = macro(id)
> only when id is a constant string and not a variable, with hundreds of
> occurences across the codebase.
> 
> Coccinelle handles this easily in C code but does not parse C++ and does not
> understand namespaced or class qualified identifiers so it cannot be used.

Thanks for the suggestions.  I will think more about it.

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

Reply via email to