Dan Sugalski <[EMAIL PROTECTED]> wrote:On Thu, 2 Oct 2003, Leopold Toetsch wrote:
$ parrot examples/assembly/pcre.imc "abcdef12" 'bc(.)([a-z]+)' abcdef12 =~ /bc(.)([a-z]+)/
Given that, for perl 5 code, we're going to have perl 5's real regex engine, and for perl 6 in perl 5 compatibility mode PCRE is inadequate, I don't think there's much point in PCRE as a long-term solution for anything. Like it or not, we're going to have to reimplement perl 5's regex compiler so it emits parrot bytecode.
I dunno yet, how unusable PCRE is for perl5 compat, but pcre 4.4 has utf8 support, and even kind of ?{code} syntax called "callout".
The biggest issue is embedded code--it's perfectly acceptable for a perl regex to have executable blocks in it. Not all that used at the moment, in part because the docs for it are really bad, but it is in there.
I don't see PCRE as a long term solution but it would be a nice to have in the meantime and it could be useful to boot the real regex machine, be it perl5 or perl6 rules.
Fair enough, but I don't want to ship the PCRE sources, nor require them for parrot to build, so there's something of a problem there, unfortunately. When Arthur gets Ponie going we can just use perl's regex engine, and we could write a perl regex compiler in pasm/pir, but that's a bit of an undertaking.
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk