public inbox for glibc-bugs-regex@sourceware.org
help / color / mirror / Atom feed
From: "bugdal at aerifal dot cx" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs-regex@sourceware.org
Subject: [Bug regex/52] Repeated and nested subexpressions (reproducible in most other engines)
Date: Thu, 04 Jul 2013 07:51:00 -0000	[thread overview]
Message-ID: <bug-52-132-COtDEXPSmV@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-52-132@http.sourceware.org/bugzilla/>

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.


  parent reply	other threads:[~2013-07-04  7:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-52-132@http.sourceware.org/bugzilla/>
2012-03-08  4:59 ` carlos at systemhalted dot org
2013-07-03 21:25 ` eblake at redhat dot com
2013-07-04  0:28 ` bugdal at aerifal dot cx
2013-07-04  3:37 ` carlos at redhat dot com
2013-07-04  3:38 ` carlos at redhat dot com
2013-07-04  7:22 ` bonzini at gnu dot org
2013-07-04  7:35 ` bugdal at aerifal dot cx
2013-07-04  7:42 ` bonzini at gnu dot org
2013-07-04  7:51 ` bugdal at aerifal dot cx [this message]
2013-07-04  8:04 ` bonzini at gnu dot org
2013-07-04 15:05 ` eggert at gnu dot org
2014-01-31  9:15 ` afaq.ahmed at agilosoft dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-52-132-COtDEXPSmV@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs-regex@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).