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?

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to