Leopold Toetsch <[EMAIL PROTECTED]> writes:

> JüRgen" "BöMmels <[EMAIL PROTECTED]> wrote:
> 
> > There are still some things to do:
> > - a global hash is still not totally right. It should be moved to the
> >   interpreter structure
> 
> As Dan already outlined, macros should have some limited scope, probably
> per file. So currently the hash has to be cleared like the other
> (still) global strutures.

Yes, it should be per-file scope.
But the generated flex lexer has some more global state variables like
yyin and yytext.

> Reworking the whole imcc global stuff isn't finished yet. Various
> structures have to be separated and kept per sub and or file. All of
> these should then be in IMCC_INFO hanging off from the interpreter
> structure.

The IMCC_INFO does not need to be part of the interpreter. 

> Anyway, I don't like to have a HASH and parrot Strings inside the lexer
> (when not really needed) just to manage macros. Currently a hash like
> that for SymRegs is just fine.
> It will be replaced  by a still simple but expandable hash finally.

Ok, granted. Parrot-Strings might be a little heavy. But introducing
yet another hash implementation does not seem right to me either. It
would be nice if both the PerlHash.pmc and the macro hash could use
the same base implementation and use callbacks for the details. But on
the other hand malloc/free and gc-memory have so diffrent
requirements.

bye
boe

Reply via email to