At 11:44 AM +1100 on 6/1/99, spierings wrote:
>Anthony,
>
>From first glance at you interpreter, I have a few problems. You have a lot of
>code in the header files that are specifically for MPW.
Most of it is not. I think I've got most of the workarounds now #ifdef'd,
too. But if you'd like to point some out, please do.
>Can you please take
>this out in future releases.
I'll do so. I plan to compile this with gcc, after all.
>It is a pain. And are those two header files you
>attached alterations to the Standard Template Library. It won't be the most
>standard library if you start messing around with it.
They change no functionality. They make it compile under MrCpp. MrCpp seems
to have some problems with a templated function recursivly calling itself.
It does not like:
template<class T>inline func(T *x) {
...
func(x);
}
so I changed it to:
template<class T>inline func(T *x) {
...
func<T>(x);
}
This just makes it a tad bit more explicit, which pleases the latest MrCpp.
[ Note: I have not tested things this simple. But this is what is boils down
to ]
>
>It seems good otherwise. I get the feeling that there is quite a bit of code
>for what needs to be a rather simple interpreter.
Most of the code is the STL, actually. I'm going to write my own string and
get rid of that pesky STL which added ~150K to the executable size (if I
remember correctly).
Only the tester, not the interpreter itself, needs the STL.
BTW: The heart of the interpreter is Tokenizer.y and NullCPU.
>I haven't had enough time to
>get it to compile under CodeWarrior yet. But will try harder latter in the
>week.
Please tell me any changes you make. That way I can integrate them with the
next release.
>
>Sorry for being so critical when your work on the interpreter has been
>outstanding. I'm just a bit scared it is not as portable as it should be. I
>should be able to drop it into CodeWarrior with no alterations, or compile it
>on a PC without changing a line of code. This is the aim, isn't it?
Absolutely.