[EMAIL PROTECTED] wrote:

> Likewise, could we please have a modifier that makes <> literal, and
aliases
> <> as something else so *ml can match easier?

> I very much doubt it.

> But I'm sure someone will eventually write the five-line (!) module that
> changes 
> <assertion> to <<assertion>>, thereby freeing up single < and > to be
literals:

>       grammar Grammar::SingleAngles is Perl {
>               rule regex_metachar  { \<\< | <![\<\>]>
<Perl::regex_metachar> }
>               rule regex_assertion { \< <Perl::regex_assertion> \> }   #
require <<..>>
>       }
>
>       caller{MY}.parser = Grammar::SingleAngles;
>
> ;-)

Ok, put your hands down and step away from the keyboard - slowly. I'm pretty
sure you've
blown half the minds here on perl6-language, and that's got to be some sort
of crime.
 ;-)

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.

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?

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?

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

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

Ed

Reply via email to