From: Thomas Rast Date: Wed, 07 Dec 2011 08:04:27 GMT Subject: Re: [PATCH] userdiff: allow * between cpp funcname words Message-ID: <201112070904.28212.trast@student.ethz.ch> In-Reply-To: <7vfwgxflkv.fsf@alter.siamese.dyndns.org> Junio C Hamano wrote: > Thomas Rast writes: > > > Actually (sadly) I'll have to revise it. It doesn't match much of C++ > > either, and I haven't yet come up with a reasonable regex that > > matches, say, > > > > foo::Bar::t& Baz::operator<<( > > > > which I would call ludicrous, but it's valid C++. > > Heh, I'd rather not see us go that route, which would either end up > implementing a C++ parser or reverting the heuristics back to "non-blank > at the beginning of the line" that was already reasonably useful. Well, there are many things that we deliberately do not match right now and for which that's a good thing: label: public: void declaration_only(...); int global_variable; At some point I was wondering whether it would be better to just declare a non-match for '.*;' and '^[A-Za-z_][A-Za-z_0-9]+:', and otherwise match all '^[A-Za-z].*\(' but I may be missing something. -- Thomas Rast trast@{inf,student}.ethz.ch