At 10:48 PM 4/12/2001 +0100, Simon Cozens wrote:
>On Thu, Apr 12, 2001 at 05:39:12PM -0400, Dan Sugalski wrote:
> > [We have FOO:BAR]
> > While this is reasonably true (and reasonably reasonable) it's not 
> entirely
> > to the point. If we're going to provide a mechanism to define the 
> syntax of
> > a mini-language (or a maxi one, I suppose, though there are probably 
> better
> > ways to do it) then the details of colons and constants and what-have-yous
> > are pretty close to irrelevant.
>
>No, I don't think so. The whole thing rests on the fact that class FOO knows
>how to parse string BAR. This, from the tokener's point of view, means that
>class FOO has to tell us when string BAR actually *ends*. For complex BAR (and
>complex FOO) this could be, uh, complex. It means that our parser would have
>to call out to other routines - which can presumably be defined in Perl - to
>assist in parsing Perl code. And hey, if BAR can be defined in Perl, it can be
>defined on-the-fly. Oh dear.

D'oh! I was thinking more along the lines of:

   START(FORTH) {
     $baz $foo $bar + =
   }

where the entire parser was coopted. I wasn't considering the smaller (and 
probably more common) case where only a tiny piece was redefined.

Nevermind....

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to