bsw@1071: #!/usr/bin/env lua bsw@1071: for line in io.lines() do bsw@1071: local ident, code = line:match("^#define[ \t]+LDAP_([A-Z][A-Z_]*)[ \t]+([^ \t/]+)") bsw@1071: if ident then bsw@1071: io.stdout:write(' {"', ident:lower(), '", ', tonumber(code) or code, '},\n') bsw@1071: end bsw@1071: end