[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: finding undefined globals
- From: Norman Ramsey <nr@...>
- Date: Tue, 16 May 2006 18:02:11 -0400
> 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