(Keep in mind that there are always variables that i can be ignoring).
The problem with lua is that the script is free to do calls like "os.fopen".
worse, we can call arbitrary libraries.
Solving this would equal to rewriting the whole lua library.
Its doable ? Yes, but who will spare his time to do this ?
I wont.
On the other hand, we might very well stumble upon someone else's work in that area. That would be a lot of luck.
PS.: I am currently divided between emulating a processor and them running a interpreter inside that processor, or, using something like this
http://xmojmr.ohmygod.cz/software/Chip/ to have a interpreter in native x86 code (so removing the slow 6502 emulation).
chipmunk basic would be much better than 6502 mbasic running in a emulator.
Even better, any interpreter that can be called via a library call can be embedded inside lua via luaffi. Thats where i am planning right now.
I can even write a interpreter for a new language, provided you or someone else give me a EBNF description (it must be a simple language due to time to code constraints), embeded it on a .so/.dll and package it into a mod.