On Wed, 13 Jan 2010, Michael Stefaniuc wrote:

> Hello Nicolas,
> 
> Nicolas Palix wrote:
> > On Saturday 09 January 2010 17:26:37 Michael Stefaniuc wrote:
> >> coccinelle 0.1.11 introduced regexp support for meta-identifier/function 
> >> and constant. The release notes says it's an OCaml regexp and points to 
> >> "man Str" for details but I don
> >>
> >> I tried to make use of grouping and alternatives but I get errors like:
> >> identifier SPAM ~= "\(WINE_\)?\(ERR\|FIXME\|WARN\)";
> >>    Fatal error: exception Lexer_cocci.Lexical("unrecognised symbol:\(")
> >> identifier SPAM ~= "ERR\|FIXME\|WARN";
> >>    Fatal error: exception Lexer_cocci.Lexical("unrecognised symbol:\|")
> >>
> >> Is this a known limitation or just a bug?
> > 
> > The following patch will fix this bug.
> thanks for the fix; I have tried coccinelle 0.2.0 and it works fine.
> Using the coccinelle/OCaml regexp seems to be way faster than just using
> "identifier SPAM;" and filtering it later on in python. For my script on
> a Wine C file it's the difference between finishing in 12 minutes or
> killing the spatch process after 90+ minutes of burned CPU time (though
> the python variant was timed with coccinelle 0.2.0-rc1).

Thanks for the report.  Previously we had some trouble with Python being 
very slow, due to some memory management problems.  If you have the 
impression that there is one particular file that is the bottleneck, 
perhaps we should look into 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