def main(): global ALIAS_SETS, ALIAS_SETS_BY_FUNCTION, EXTENSIONS_BY_FUNCTION xml_dir = "/home/pberry/mesa/src/mapi/glapi/gen" xml_files = [file for file in os.listdir(xml_dir) if file.endswith(".xml")] for file in xml_files: tree = etree.parse(os.path.join(xml_dir, file)) assert tree.getroot().tag == "OpenGLAPI" process_OpenGLAPI(tree.getroot()) ALIAS_SETS, ALIAS_SETS_BY_FUNCTION = alias_sets.compute_alias_sets(FUNCTIONS) for alias_set in ALIAS_SETS: collect_alias_data(alias_set) EXTENSIONS_BY_FUNCTION = relation.invert(FUNCTIONS_BY_EXTENSION, FUNCTIONS.keys())