lua-users home
lua-l archive

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

> Everyone here seem to be missing what the OP wants, which is that they
> want to change the *syntax* of Lua, not the functions a user can
> access.
> So, for example the probably don't want them defining function, or using
> loops.
> Of course, I agree with the other replies that this probably isn't something
> that can easily be done in Lua.

Actually, here is a simple way, though it requires a small patch to the
lexer: edit llex.c and in the array token2string just add a space before
the keywords you want to forbid. If you disable all keywords, then you'll
get a Lua subset that only understands assignments and function calls.