Jeff 'japhy' Pinyan writes:
> I am currently completing work on an extensible regex-specific parsing
> module, Regexp::Parser.  It should appear on CPAN by early July
> (hopefully under my *new* CPAN ID "JAPHY").
> 
> Once it is completed, I will be starting work on writing a subclass
> that matches Perl 6 regexes, Regexp::Perl6 (or Perl6::Regexp, or
> Perl6::Regexp::Parser).

Or Regexp::Parser::Perl6 :-)

> I think this might be of some use to the Perl 6 dev crew, but I'm not
> sure how.

It surely would.

The grammar for Perl 6 is going to be specified with Perl 6 patterns.
That presents us a little bootstrapping problem.  So the original goal
of Damian's Perl6::Rules was to transform this grammar back into Perl 5
patterns so they can parse the simplified Perl 6 code for Perl 6 and
compile a bootstrap.

But Perl6::Rules failed.  Due to serious bugs in the Perl 5 regex engine
having to do with executing code within regexes, Perl6::Rules couldn't
do its job properly.  So, for the bootstrap, we need something else, and
you're giving us an in.

My personal, nondivine plan would be to use your module to create a
driver-based parser.  That could then be used for the bootstrap instead.

A driver-based parser has a couple of advantages over regexes and even
Parse::RecDescent.  First, the parsing algorithm can be easily
customized, so we can play with hybrid models and see how the time
complexity works out.  Also, you can suspend the parsing in the middle
of execution, go somewhere else, and continue, which the Perl 6 parser
might just want to do (something like simulated coroutines).

In any case, such a parser would be really, really useful.

Luke

Reply via email to