On Thu, Apr 12, 2001 at 06:02:16PM -0400, Dan Sugalski wrote:
> 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.

Don't worry, it is under control. :) I'm trying to get the parser API
together, (yes, I am actually working on that) and it will have "overrides" on
several levels, where you can jump out to "external"[1] C functions to get
your parsing done. These "overrides" can be called at the absolute top level:

        PerlOpTree* parse_from_string(STRING* string)

will call either

        PerlOpTree* (*PL_parse_override)(STRING* string, void* data)

or yyparse(); alternatively, you can override things at the yyparse() and
yytoke() level. It's complex, but it does work, and it ensures us the
flexibility we need.

[1] That is, external to the parser

-- 
BITTERNESS:
    Never be Afraid to Share Your Dreams with the World,
    Because there's Nothing the World Loves More Than The Taste of
    Really Sweet Dreams                              http://www.despair.com

Reply via email to