From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: don@donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#1260: marked as done (regex.c and RE_FRUGAL) Date: Tue, 28 Oct 2008 07:40:03 -0700 Message-ID: References: <20081027155611.GA7082@night.netis.ru> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1225204803-26203-0" X-Trace: ger.gmane.org 1225205440 21174 80.91.229.12 (28 Oct 2008 14:50:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Oct 2008 14:50:40 +0000 (UTC) To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 28 15:51:41 2008 connect(): Connection refused Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kupv2-0006QU-Nu for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Oct 2008 15:51:41 +0100 Original-Received: from localhost ([127.0.0.1]:45785 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kuptw-000478-Qy for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Oct 2008 10:50:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kuptb-0003z2-0r for bug-gnu-emacs@gnu.org; Tue, 28 Oct 2008 10:50:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KuptY-0003ws-Ol for bug-gnu-emacs@gnu.org; Tue, 28 Oct 2008 10:50:09 -0400 Original-Received: from [199.232.76.173] (port=39817 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KuptY-0003wp-BP for bug-gnu-emacs@gnu.org; Tue, 28 Oct 2008 10:50:08 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:39299) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KuptX-00032i-9Y for bug-gnu-emacs@gnu.org; Tue, 28 Oct 2008 10:50:07 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9SEo37A028637; Tue, 28 Oct 2008 07:50:04 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m9SEe3fu026241; Tue, 28 Oct 2008 07:40:03 -0700 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com X-Emacs-PR-Message: closed 1260 X-Emacs-PR-Package: emacs X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:21970 Archived-At: This is a multi-part message in MIME format... ------------=_1225204803-26203-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Tue, 28 Oct 2008 10:31:29 -0400 with message-id and subject line Re: bug#1260: regex.c and RE_FRUGAL has caused the Emacs bug report #1260, regarding regex.c and RE_FRUGAL to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact don@donarmstrong.com immediately.) --=20 1260: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D1260 Emacs Bug Tracking System Contact don@donarmstrong.com with problems ------------=_1225204803-26203-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.0 required=4.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 27 Oct 2008 15:56:35 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9RFuURl012919 for ; Mon, 27 Oct 2008 08:56:32 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KuUSE-0002qB-K0 for bug-gnu-emacs@gnu.org; Mon, 27 Oct 2008 11:56:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KuUSD-0002px-Qr for bug-gnu-emacs@gnu.org; Mon, 27 Oct 2008 11:56:30 -0400 Received: from [199.232.76.173] (port=33503 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KuUSD-0002pm-Ci for bug-gnu-emacs@gnu.org; Mon, 27 Oct 2008 11:56:29 -0400 Received: from star.netis.ru ([213.187.127.146]:47399) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KuUSC-0002Io-U0 for bug-gnu-emacs@gnu.org; Mon, 27 Oct 2008 11:56:29 -0400 Received: from night.yars.free.net (night.yars.free.net [193.233.48.54]) by star.netis.ru (8.14.2/8.14.2) with ESMTP id m9RFtvB0013939 for ; Mon, 27 Oct 2008 18:56:00 +0300 Received: (from lav@localhost) by night.yars.free.net (8.11.6+Sun/8.11.6) id m9RFuCn07085 for bug-gnu-emacs@gnu.org; Mon, 27 Oct 2008 18:56:12 +0300 (MSK) X-Authentication-Warning: night.yars.free.net: lav set sender to lav@netis.ru using -f Date: Mon, 27 Oct 2008 18:56:11 +0300 From: "Alexander V. Lukyanov" To: bug-gnu-emacs@gnu.org Subject: regex.c and RE_FRUGAL Message-ID: <20081027155611.GA7082@night.netis.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.11 X-NETIS-MailScanner-Information: Please contact NETIS Telecom for more information (+7 4852 797797) X-NETIS-MailScanner-ID: m9RFtvB0013939 X-NETIS-MailScanner: Found to be clean X-NETIS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=0, required 6, autolearn=disabled) X-NETIS-MailScanner-From: lav@netis.ru X-NETIS-MailScanner-To: bug-gnu-emacs@gnu.org X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Hello! This bug report is not quite for emacs, but for its regex library. It features RE_FRUGAL flag (very useful), but it does not seem to work. I have tried this rather simple program and it prints 0-12 instead of expected 0-6. Please advice. #include "config.h" #include #include #include #include "regex.h" int main() { const char *rexp="<.*?>"; static struct re_pattern_buffer rexp_c; static struct re_registers regs; re_syntax_options = RE_FRUGAL; re_compile_pattern(rexp,strlen(rexp),&rexp_c); if(re_search(&rexp_c,"",12,0,12,®s)==-1) { printf("search failed\n"); return 1; } printf("%d-%d\n",regs.start[0],regs.end[0]); return 0; } -- Alexander. ------------=_1225204803-26203-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.0 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1260-done) by emacsbugs.donarmstrong.com; 28 Oct 2008 14:31:43 +0000 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9SEVZuh024938 for <1260-done@emacsbugs.donarmstrong.com>; Tue, 28 Oct 2008 07:31:36 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhAFAH2/BklMCqyo/2dsb2JhbACBdsgfg0+BDQ X-IronPort-AV: E=Sophos;i="4.33,499,1220241600"; d="scan'208";a="28958410" Received: from 76-10-172-168.dsl.teksavvy.com (HELO pastel.home) ([76.10.172.168]) by ironport2-out.teksavvy.com with ESMTP; 28 Oct 2008 10:31:29 -0400 Received: by pastel.home (Postfix, from userid 20848) id 9D60E8E6F; Tue, 28 Oct 2008 10:31:29 -0400 (EDT) From: Stefan Monnier To: "Alexander V. Lukyanov" Cc: 1260-done@emacsbugs.donarmstrong.com Subject: Re: bug#1260: regex.c and RE_FRUGAL Message-ID: References: <20081027155611.GA7082@night.netis.ru> <20081028115739.GA7702@night.netis.ru> Date: Tue, 28 Oct 2008 10:31:29 -0400 In-Reply-To: <20081028115739.GA7702@night.netis.ru> (Alexander V. Lukyanov's message of "Tue, 28 Oct 2008 14:57:39 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> > This bug report is not quite for emacs, but for its regex library. >> > It features RE_FRUGAL flag (very useful), but it does not seem to work. >> > I have tried this rather simple program and it prints 0-12 instead of >> > expected 0-6. >> >> IIRC you'll need to set RE_NO_POSIX_BACKTRACKING as well, otherwise the >> match returned will always be the longest. > Thank you! The flag RE_NO_POSIX_BACKTRACKING did the trick. > Is there a reason for RE_SYNTAX_EMACS including RE_FRUGAL and not including > RE_NO_POSIX_BACKTRACKING? Emacs passes RE_NO_POSIX_BACKTRACKING explicitly depending on whether it wants posix behavior or not (it has matching functions like "string-match" and "posix-string-match"). Stefan ------------=_1225204803-26203-0--