lua-users home
lua-l archive

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


>Is there a way to check if lua files match predifined structure before 
>starting to work with.

Yes. For an example see "Reflexive Facilities" in http://www.lua.org/ddj.html ,
specially http://www.lua.org/ddj.html#L6 and http://www.lua.org/ddj.html#L7 .

You'll have to adapt the scheme to your needs, but the main idea is to describe
what you want in a Lua table and write a Lua function that does the checking.
--lhf