[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] net.venge.monotone.deregexp
From: |
Zack Weinberg |
Subject: |
Re: [Monotone-devel] net.venge.monotone.deregexp |
Date: |
Tue, 27 Feb 2007 18:43:32 -0800 |
On 2/27/07, Nathaniel Smith <address@hidden> wrote:
On Sun, Feb 25, 2007 at 01:32:36AM -0800, Zack Weinberg wrote:
> Specifically, uri.cc no longer uses 'em, and a
> spurious #include of <boost/regex.hpp> has been removed from
> netsync.cc. This could probably be flushed to mainline all by itself,
> but I didn't.
Any reason why not?
I wanted another pair of eyes on it, especially now that there's a
conversion of packet.cc too (which code I am not entirely happy with).
> * diff_patch.cc: for the show-containing-function feature.
...How can we possibly eliminate this? It's necessary if we want to
be consistent with diff(1), and I can't think of any other approach
that would be nearly as convenient anyway... (i.e., trying to use
globs here does not seem like a winning plan).
We *could* make this operation a lua hook (more of one than it is now,
anyway) and use lua's string.match thing. That implements a very
basic regular expression, as far as I can tell. It has some odd
syntax (% instead of \) but the big thing it seems to be missing is
alternation.
I'm not all that enthusiastic about this idea, but I think it's worth
considering.
if we are keeping some regexp engine around, that
might simplify some other things. (Don't have to rewrite the globish
matcher by hand, etc.)
I was thinking about grabbing the fnmatch() implementation from gnulib for that.
[ http://www.gnu.org/software/gnulib/MODULES.html#module=fnmatch ]
Weren't you worried about unbounded recursion with pcre?
zw