From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Patch for lookaround assertion in regexp Date: Mon, 30 Jan 2012 02:31:56 +0200 Organization: JURTA Message-ID: <878vkqgm0j.fsf@mail.jurta.org> References: <009001ccd9c0$9bde09f0$d39a1dd0$@cfraizer.com> <874nvm1cnn.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1327884344 25282 80.91.229.3 (30 Jan 2012 00:45:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 30 Jan 2012 00:45:44 +0000 (UTC) Cc: emacs-devel@gnu.org, Andreas Schwab , Stefan Monnier , Tom To: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 30 01:45:42 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RrfNM-00046a-BP for ged-emacs-devel@m.gmane.org; Mon, 30 Jan 2012 01:45:40 +0100 Original-Received: from localhost ([::1]:53143 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrfNL-00083q-SR for ged-emacs-devel@m.gmane.org; Sun, 29 Jan 2012 19:45:39 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:36404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrfNF-00081B-VY for emacs-devel@gnu.org; Sun, 29 Jan 2012 19:45:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RrfNF-0000mV-3k for emacs-devel@gnu.org; Sun, 29 Jan 2012 19:45:33 -0500 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:56116 helo=ps18281.dreamhostps.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrfNE-0000mI-Va for emacs-devel@gnu.org; Sun, 29 Jan 2012 19:45:33 -0500 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id F0F07451C602; Sun, 29 Jan 2012 16:44:20 -0800 (PST) In-Reply-To: <874nvm1cnn.fsf@gmail.com> (=?utf-8?B?IsWgdMSbcMOhbiBOxJtt?= =?utf-8?B?ZWMiJ3M=?= message of "Mon, 23 Jan 2012 19:45:00 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 69.163.218.105 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:148027 Archived-At: > OTOH using something like PCRE would finally fix the currently erroneous > implementation of classes like [:space:], which now is the same as \s-. > (And personally I would gladly forgo the syntax categories for standard > [:classes:], although I imagine the former might be used by the > font-locking or somewhere... I never felt the need for them.) `pcrecallout' could help to translate \c and \s to PCRE. >From `man pcrecallout(3)': PCRE provides a feature called "callout", which is a means of temporarily passing control to the caller of PCRE in the middle of pattern matching. The caller of PCRE provides an external function by putting its entry point in the global variable pcre_callout. By default, this variable contains NULL, which disables all calling out. Within a regular expression, (?C) indicates the points at which the external function is to be called. Different callout points can be identified by putting a number less than 256 after the letter C. For example, this pattern has two callout points: (?C1)abc(?C2)def