File: get_used_vars.lua

package info (click to toggle)
lua5.1-policy 20
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 132 kB
  • ctags: 10
  • sloc: sh: 104; ansic: 41; makefile: 39
file content (5 lines) | stat: -rw-r--r-- 159 bytes parent folder | download | duplicates (12)
1
2
3
4
5
f = io.open("policy.txt")
data = f:read("*all")
vars = {}
string.gsub(data,"{[A-Z_]*}",function (s) vars[s] = true end)
for k,v in pairs(vars) do print(k) end