20infile_name = sys.argv[1]
21id_out_name = sys.argv[2]
22name_out_name = sys.argv[3]
27with open(infile_name)
as infile:
31 if not re.match(
r'[A-Z][a-zA-Z0-9]*$', line):
32 sys.exit(
"Error: invalid character in property '{}'".format(line))
33 props[line] =
"PROP_" + line
37idfile = open(id_out_name,
'w')
38namefile = open(name_out_name,
'w')
41for token
in sorted(props.keys()):
42 idfile.write(
"const sal_Int32 {} = {};\n".format(props[token], i))
43 namefile.write(
"/* {} */ \"{}\",\n".format(i, token))
46idfile.write(
"const sal_Int32 PROP_COUNT = {};\n".format(i))
47idfile.write(
"const sal_Int32 PROP_INVALID = -1;\n" )