emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regular expression libraries


From: Clément Pit--Claudel
Subject: Re: Regular expression libraries
Date: Fri, 16 Dec 2016 15:06:13 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

On 2016-12-16 10:42, Lars Ingebrigtsen wrote:
> Clément Pit--Claudel <address@hidden> writes:
> 
>> Wait, now I'm confused.  The master branch of glibc *does* include the 
>> following in regex.h:
>>
>> extern int __re_search_2
>>   (struct re_pattern_buffer *buffer, const char *string1,
>>    int length1, const char *string2, int length2,
>>    int start, int range, struct re_registers *regs, int stop);
>>
>> … but the implementation just allocates a large buffer and concatenates both 
>> strings?
> 
> Yes.  If I remember correctly, a glibc developer popped up here a couple
> of years ago announcing that they were going to do that change (thereby
> making __re_search_2 incredibly slow, but retained for compatibility).

I see, thanks.  This code seems a bit beyond my abilities to easily extend :/
Eli started listing things that we would need from an external library before 
we could move to it.  AFAICT, there is:

* Support for searching a gap buffer (essentially two strings).
* Support for Emacs' internal utf-8 based encoding
* Support for Emacs' regexp syntax (though we could imagine writing a 
translator)
* Support for Emacs' syntax properties, and Emacs-specific extensions like 
matching the position of the point, etc.

An I missing anything else? Which ones of these things does gnulib already have?

Thanks!
Clément.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]