Replacing libgnuregex

Kyle Evans kevans91 at ksu.edu
Sun Apr 16 14:50:31 UTC 2017


On Sun, Apr 16, 2017 at 8:47 AM, Jilles Tjoelker <jilles at stack.nl> wrote:

> On Tue, Apr 11, 2017 at 03:20:58PM -0500, Kyle Evans wrote:
> > On the other hand, I think I could fairly easily implement most of these
> > into libc/regex. Here's a summary of what this option entails adding to
> > libc/regex, from what I've found:
>
> > [snip]
> > * Add backreferences (\1 through \9) to EREs
> > [snip]
>
> Adding this enforces that EREs, like BREs, may sometimes require
> exponential time to match. I would prefer to avoid that.
>
> --
> Jilles Tjoelker
>

I played with it a little bit more, and it looks like I could lib'ify what
I have and have libc include a POSIX-strict version of the lib source
fairly easily to keep the default implementation clean as it is now. Would
this be acceptable?

OTOH, one doesn't need to actually use backreferences in EREs and the
matcher works the same as it does now. I kind of like the look of the 'lib'
implementation now that I've seen it, though.


More information about the freebsd-hackers mailing list