From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=BAYES_20,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:ad4:4c0f:: with SMTP id bz15mr43052247qvb.10.1609067687888; Sun, 27 Dec 2020 03:14:47 -0800 (PST) X-Received: by 2002:a05:6214:a03:: with SMTP id dw3mr42590091qvb.24.1609067687526; Sun, 27 Dec 2020 03:14:47 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 27 Dec 2020 03:14:47 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=87.88.29.208; posting-account=6yLzewoAAABoisbSsCJH1SPMc9UrfXBH NNTP-Posting-Host: 87.88.29.208 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Easiest way to use redular expressions? From: Emmanuel Briot Injection-Date: Sun, 27 Dec 2020 11:14:47 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:60947 List-Id: On Sunday, December 27, 2020 at 9:36:51 AM UTC+1, J-P. Rosen wrote: > AdaControl uses Gnat.Regpat, and is quite happy with it... GNAT.Regpat is a package I wrote 18 years ago or so (time flies..), basically manually translating C code from the Perl implementation of regular expressions. Nowadays, I think it would be better to write a small binding to the pcre library (which has quite a simple API, so the binding should not be too hard). This will provide much better performance, support for unicode, and a host of regexp features that are not supported by GNAT.Regpat. Never did that while I was working for AdaCore because we would have ended up with too many regexp packages (there is also GNAT.Regexp, which is very efficient but limited in features because it is based on a definite state machine). I think libpcre might even be distributed with gcc nowadays, although I did not double-check so might be wrong. This binding would be a nice small project for someone who wants to get started with writing Ada bindings Emmanuel