lua-users home
lua-l archive

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


 > Motivated by a thread in the chat room (#lua) last week, I wrote a quick
 > hack for doing static analysis of Lua programs and flagging the use of
 > undefined globals. See the attached script, globals.lua. Since this
 > script performs static analysis based on the bytecode, it cannot find
 > all uses of undefined globals. For a tool that does that at run time,
 > see etc/strict.lua in the distribution. Enjoy.

Sweet.  To make it work for 5.0, change '%d+,%d+' to '[%d,]+'.


Norman