emacs-devel
[Top][All Lists]
Advanced

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

Re: Regular expression libraries


From: Eli Zaretskii
Subject: Re: Regular expression libraries
Date: Thu, 15 Dec 2016 22:10:00 +0200

> From: Clément Pit--Claudel <address@hidden>
> Date: Thu, 15 Dec 2016 14:00:25 -0500
> 
> * Emacs has special regexp features based on syntax classes, or the position 
> of the point.  These features don't seem to be supported in gnulib nor glibc
> * Emacs uses a gap buffer, whereas gnulib and glibc expects a char* for the 
> subject string

There's one other important aspect: Emacs doesn't use the locale to
implement the likes of [:alnum:], [:print:], etc.  We use our own
functions that access Unicode data stored in specialized char-tables,
see the uni-*.el files.  We also use our own macros to fetch multibyte
characters from buffers and strings, instead of functions from the
standard C library.

> If I understand our current implementation, our regexp.c functions take the 
> moral equivalent of two strings, and match over that, pretending that it's 
> just one large string.  In practice, these two strings are the two halves of 
> the gap buffer.  Correct?

Yes.



reply via email to

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