Re: Regex introduction?
Michael Hendricks <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CAFHuXuYarnq0+d-SVSzytuvfFNLZAS8KONFETVM2XKR=G-fWSA@mail.gmail.com> |
On Mon, Nov 25, 2013 at 12:56 PM, Jan Wielemaker <[email protected]> wrote: > I'm seriously considering to add regular expression support based on the > pcre (Perl Compatible Regular Expressions) library. This seems to be the > library of choice for most modern languages and provides support for the > two internal representations used in SWI-Prolog for Unicode text. > You might consider RE2, if you haven't already. It supports nearly everything that PCRE does but has much better performance characteristics. I don't know what it's like working with the API directly. I've always used RE2 from inside Go. https://code.google.com/p/re2/ > Did I miss something? Any precedence of well balanced interfaces for > Prolog? The YAP interface is rather limited. The XSB one is richer, > but a bit weird due to issues with atom-GC in XSB you should not be > bothered with as a user. > When writing my regex pack, I didn't find any Prolog interfaces to regular expressions that I thought were worth emulating. So I ended up modeling mine on Perl and Haskell. I'm fairly happy with it as a high level interface. -- Michael -------------- next part -------------- HTML attachment scrubbed and removed