Am 29.09.2016 um 21:41 schrieb Patrick R. Michaud:
On Thu, Sep 29, 2016 at 01:30:29PM +0200, Joachim Durchholz wrote:
Can you tell me where the sources for the regex engine live? At the
detailed-technical-spec level, I found S05, and I can find the NQP spec, but
I don't know my way around the interpreter sources yet.
The regex engine lives in src/QRegex of the nqp repository.
https://github.com/perl6/nqp/tree/master/src/QRegex
Thanks, going to look into it.
My hope is that it's possible to use the JVM port of Rakudo to compile the
regex engine to JVM bytecode.
I'm not entirely familiar with Rakudo's JVM implementation, but I
believe that the regex engine portion (supplied by NQP) is
_already_ in JVM bytecode.
My bad - with "Rakudo", I meant whatever is compiling the regex NQP
sources to bytecode.
What is the NQP compiler, anyway?
Unlike PCRE, the NQP regex library isn't a C-based library that
is magically linked into the runtime engine with glue.
Indeed. It's a pretty portable design.
This should provide quite some synergies.
1) An NQP-based PCRE will be almost guaranteed to have a 100% exact
semantics, no excuses.
2) It will even follow the future evolution of Perl regexen.
3) The Perl crowd won't have to deal with subtle corner cases that a
PCRE library misimplemented.
4) This provides another incentive to write a backend for yet another
platform: beyond Perl6, they also get a pretty powerful and
well-designed regex library for any programming language available on
that platform.
This has all the marks of awesome written over it.
Now let's see whether I can make this happen... ;-)
Thanks for all the feedback, I think I have enough to get me started.
I'll surely be back with more questions as they arise :-D
Regards,
Jo