This is the mail archive of the glibc-bugs-regex@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug regex/52] Repeated and nested subexpressions (reproducible in most other engines)


http://sourceware.org/bugzilla/show_bug.cgi?id=52

--- Comment #14 from Rich Felker <bugdal at aerifal dot cx> ---
On Thu, Jul 04, 2013 at 07:42:51AM +0000, bonzini at gnu dot org wrote:
> Unices.  Also, even though it is not POSIX RE, Perl regular expressions have
> the same behavior.

Perl RE's are so different from POSIX that I would not consider them
in this discussion.

> Thanks for mentioning musl's matcher, I'll check it out.

The upstream source we got it from, TRE, is where the magic came from.
The author has some good documentation on how it works.

> Matching backreferences at a decent speed _and_ obeying the POSIX
> leftmost/longest rules is very hard to do.

Currently the speed is somewhat less than glibc, but not horrible by
any means. A large part of the cost is probably mbtowc. I'm planning
to eventually adapt it to compile the UTF-8 RE directly to a
byte-based state machine with actual character identity decoding only
when matching against character classes, but it's low priority right
now.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]