On Fri, 7 Jun 2002, Peschko, Edward wrote:
: Let me get this straight. the grammar of Perl is reprogrammable,
: and expressed in perl6. And a script is parsed using this grammar,
: on the fly, hence portions of scripts could have different grammars
: than other parts.

Where have you been for the last two years?  This is not news.

: So exactly how is this going to be fast? I'm assuming that perl
: gets its speed in parsing its own code by having the parser/lexer
: code written in C and compiled to machine code form - as I see it,
: there would be a lot of overhead in running any modifiable on-the-fly
: parser - wouldn't the parser itself have to be recompiled each time
: the script was being parsed, before any compilation pass was made?

No, the standard parser will be distributed as Parrot machine code.
This is a conventional language bootstrap on an unconventional machine.

: And if the syntax of the regex engine *itself* was being modified,
: wouldn't there have to be a 'source' regex engine that was used to
: parse the modified regex engine, bootstrap itself, and which then
: would be used to compile perl?

No, you're confusing the run-time engine with the parser.  The regex
engine is Parrot itself, which is written in C.  There is no separate
regex engine.

: And what's the deal with this caller(MY).parser stuff? 

That indicates in the abstract that we're switching parsers for
the rest of the caller's lexical scope.  Don't take the particular
notation too seriously.  But it's fundamental to Perl 6 that
the "mumble" of

    mumble { ... }

is allowed to have control of how the ... is parsed.

: Oh boy now I've gone and done it. *My* head's exploded.

If your head has exploded, you should avoid sausage factories.

Larry

Reply via email to