comp.lang.ada
 help / color / mirror / Atom feed
From: briot.emmanuel@gmail.com
Subject: Re: Benchmarks Game - regex-redux - help needed
Date: Thu, 21 Mar 2019 09:17:08 -0700 (PDT)
Date: 2019-03-21T09:17:08-07:00	[thread overview]
Message-ID: <30bfef4b-d568-4f38-a016-082c432eb8e4@googlegroups.com> (raw)
In-Reply-To: <caa71b80-f0b4-4c06-b120-bd3e3f7a99a1@googlegroups.com>


GNAT.Regexp is a very basic package that only handles a subset of regexps. It does so without backtracking, so it has a fairly predictable run time.

GNAT.Regpat is more capable (translated from an earlier version of the perl regexp engine). It is however not as optimized or as extended as pcre is. The big lacking thing, to my mind, is support for unicode, in this day and age (wasn't an issue 17 years ago :-).

I always wanted to add a binding to pcre in either the GNAT runtime (likely replacing GNAT.Regpat) or GNATCOLL. This should be fairly simple, as the API itself is fairly limited. That would give Ada much more powerful regexps, similar to what all other languages out there have.

Once thing that made it difficult in the beginning was building and packaging an extra external library, but I believe pcre is now a mandatory dependency for gcc anyway, so it is already distributed...

pcre is the de-facto standard for pcre nowadays. Maybe even Perl has now moved to it, though I am not sure. Every one else uses pcre.


  reply	other threads:[~2019-03-21 16:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-21 12:58 Benchmarks Game - regex-redux - help needed gautier_niouzes
2019-03-21 16:17 ` briot.emmanuel [this message]
2019-03-21 22:04   ` Simon Wright
2019-03-22  8:11     ` Simon Wright
2019-04-08 18:29       ` igouy2
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox