Dan Sugalski wrote:
> 
> I'm not so sure about that. (Not that it won't be replaced, but that 
> it needs the grammar engine) I'm pretty sure that grammars as Larry's 
> defined 'em are recursive-descent, and if that's true then I've this 
> really nasty feeling we're going to find it insufficiently fast to 
> parse perl. Could be wrong, but even if we pick up two orders of 
> magnitude in speed over Parse::RecDescent things'll still be 
> significantly more sluggish than the current perl 5 parser.
> 
> (OTOH, if the grammar engine's not required to be recursive-descent 
> that makes things rather faster, which is fine with me :)

That's a question with multiple layers of answers. :)

The abstraction we need to meet is: a) everything that can be done in
the parser that ships with Perl 6 can be done in Perl 6; and b) it is
possible to change the way Perl 6 is parsed within Perl 6 code (by
loading a custom grammar module, for example).

But, there's some flexibility in how we satisfy that abstraction. It
might be reasonable to have "fast parsing" that merely comes close to
simulating recursive-descent, as long as we also provide a (slower) full
recursive-descent parser that produces the same PIR output.

Certainly some things won't be recursive-descent anyway (operator
precedence).

Also, it may be a little too early to decide that one method of parsing
will be fast or slow. IIRC we nearly ditched CPS because it was too
slow, then found a way to speed it up.

Allison

Reply via email to