Ignore:
Timestamp:
Sep 24, 2014, 7:41:30 AM (5 years ago)
Author:
cameron
Message:

Generate missing sets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/charsetcompiler/UCD/UCD_properties.py

    r4190 r4191  
    332332           print "%s: %s bytes" % (basename, sum([value_map[v].bytes() for v in value_map.keys()]))
    333333           f.write("  namespace %s {\n" % property_code.upper())
     334           all_explicit_values = empty_uset()
     335           for v in self.property_value_list[property_code]:
     336             all_explicit_values = uset_union(all_explicit_values, value_map[v])
     337           missing_values = uset_complement(all_explicit_values)
     338           if self.missing_specs.has_key(property_code):
     339             default = canonicalize(self.missing_specs[property_code])
     340             if not self.property_value_lookup_map[property_code].has_key(default): raise Exception("Cannot process default specification '%s'" % default)
     341             default_key = self.property_value_lookup_map[property_code][default]
     342             value_map[default_key] = uset_union(value_map[default_key], missing_values) 
    334343           for v in self.property_value_list[property_code]:
    335344             f.write("    const UnicodeSet %s_Set \n" % v.lower())
    336345             f.write(value_map[v].showC(6) + ";\n")
     346           if not self.missing_specs.has_key(property_code):
     347             f.write("    const UnicodeSet Missing_Set \n")
     348             f.write(missing_values.showC(6) + ";\n")
    337349           set_list = ['%s_Set' % v.lower() for v in self.property_value_list[property_code]]
    338350           f.write("    const EnumeratedPropertyObject property_object\n")
Note: See TracChangeset for help on using the changeset viewer.