lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




Rici Lake escreveu:

You've been told how to do this, several times.

Sorry, it may look like that, but I felt that the question was misunderstood. So I kept on asking and thanks to that, your answer bellow is close to what I need ;-)

For this I believe I need something called a lexical analyser, so that I can allow only a sunset of normal LUA syntax.
Perhaps you should think about the possibility that your belief is incorrect.

I can easyly accept that, thanks for your patiance so far. Please help me find my way.

A lexical analyzer will not tell you which Lua functions a program is using. However, you can arrange for only the functions you truly trust to be available in the Lua runtime.

That is really what I mean. Thanks for understanding me :)) even if you say that I am wrong. The question now is: How do I do it? I am reading about Lex+Yacc+Bison, I hope it can help.

If the function is not loaded into the Lua runtime (or if it is deleted) then it is no longer available. Period.

This is another very important idea. I am planing a static link, so I believe that it would be easy.

It is perhaps slightly surprising that sandboxing Lua is quite simple, compared with other scripting languages. I hope that this feature will continue to receive high priority as the Lua packaging system develops.

I am not sure that sandboxing can help me: I will have one lua state for each screen, many objects will have scripts that are executed according to screen events and may affect variables global to that screen/Lua-state. This should be protection enough because the sum of those events make the application. If I sandbox one script, it will not interact with the rest of the screen, at least this is what I understand.

Alain