Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31314 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52282 invoked by uid 1010); 30 Jul 2007 05:39:00 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 52265 invoked from network); 30 Jul 2007 05:39:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jul 2007 05:39:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=ceo@l-i-e.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ceo@l-i-e.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain l-i-e.com from 67.139.134.202 cause and error) X-PHP-List-Original-Sender: ceo@l-i-e.com X-Host-Fingerprint: 67.139.134.202 o2.hostbaby.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Received: from [67.139.134.202] ([67.139.134.202:1416] helo=o2.hostbaby.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C9/E2-17243-0797DA64 for ; Mon, 30 Jul 2007 01:38:58 -0400 Received: (qmail 49401 invoked by uid 98); 30 Jul 2007 05:39:01 -0000 Received: from 127.0.0.1 by o2.hostbaby.com (envelope-from , uid 1013) with qmail-scanner-2.01 (clamdscan: 0.88.7/3804. Clear:RC:1(127.0.0.1):. Processed in 0.094881 secs); 30 Jul 2007 05:39:01 -0000 Received: from localhost (HELO l-i-e.com) (127.0.0.1) by localhost with SMTP; 30 Jul 2007 05:39:01 -0000 Received: from 24.12.13.192 (SquirrelMail authenticated user ceo@l-i-e.com) by www.l-i-e.com with HTTP; Mon, 30 Jul 2007 00:39:01 -0500 (CDT) Message-ID: <3429.24.12.13.192.1185773941.squirrel@www.l-i-e.com> In-Reply-To: <1184590056.3352.10.camel@localhost.localdomain> References: <1184590056.3352.10.camel@localhost.localdomain> Date: Mon, 30 Jul 2007 00:39:01 -0500 (CDT) To: jani.taskinen@iki.fi Cc: internals@lists.php.net Reply-To: ceo@l-i-e.com User-Agent: Hostbaby Webmail MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: [PHP-DEV] POSIX regex From: ceo@l-i-e.com ("Richard Lynch") On Mon, July 16, 2007 7:47 am, Jani Taskinen wrote: > Now only places using the POSIX regex functions (ext/ereg/ excluded) > are > ext/standard/browscap.c and ext/pgsql/pgsql.c. As you may know, I'm working on converting ext/pgsql/pgsql.c to use PCRE instead of POSIX regex. It's actually going fairly well, believe it or not, though I have a ton of debug printf's in my C code at the moment, to be sure I'm hitting all the lines I want to hit to test everything. [Yeah, I know, there are way more fancy tools available this decade, but I'm old.] At any rate, I've hit a bit of a snag, and either I'm being stupid, or there's been a bad regex pattern in there for awhile now... Does not this line: http://lxr.php.net/source/php-src/ext/pgsql/pgsql.c#5021 have an "extra" closing paren at the end of the pattern? [I am making my patch against PHP 5; it just hasn't changed since 4] My PCRE patch is telling me it's broken there: Warning: pg_convert(): Compilation failed: unmatched parentheses at offset 47 in /home/lynch/pg_pcre.php on line 28 [Seems weird how I get a PHP error out of my C code, but there it is...] My eyes and counting up/down on my fingers like I learned in Lisp class in college does. The Regex Coach says it does. Does POSIX regex not generate some kind of error on an extra paren at the end? Or am I missing something particularly arcane or abstract here? If it's actually broken: My PCRE patch will just not have that extra closing paren, so don't rush a patch through just for this, unless you really want to. I expect to wrap up in a couple days, unless something totally unexpected crops up. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?