Re: Regex introduction?
Abramo Bagnara <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Organization | BUGSENG srl |
| Message-ID | <[email protected]> |
Il 25/11/2013 23:02, Michael Hendricks ha scritto: > 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. Why you say that? AFAIK this is not true nowadays. > 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. > -- Abramo Bagnara BUGSENG srl - http://bugseng.com mailto:[email protected]