Changeset 5671 for icGREP


Ignore:
Timestamp:
Oct 5, 2017, 1:51:59 PM (19 months ago)
Author:
cameron
Message:

Name_Alias property

Location:
icGREP/icgrep-devel
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/UCD-scripts/UCD_parser.py

    r5670 r5671  
    315315        else:
    316316            (cp_lo, cp_hi, fields) = parse_data_record(t)
    317             if len(fields) != len(prop_code_list): raise Exception("Mutlicolumn field count mismatch, expecting %i: " % len(prop_code_list) + t)
     317            if len(fields) != len(prop_code_list): raise Exception("Multicolumn field count mismatch, expecting %i: " % len(prop_code_list) + t)
    318318            for i in range(len(fields)):
    319                 if fields[i] != '':
     319                if fields[i] != '' and prop_code_list[i] in property_object_map:
    320320                    property_object_map[prop_code_list[i]].addDataRecord(cp_lo, cp_hi, fields[i])
    321321    for p in prop_code_list:
    322         property_object_map[p].finalizeProperty()
     322        if prop_code_list[i] in property_object_map:
     323            property_object_map[p].finalizeProperty()
    323324
    324325UnicodeData_txt_regexp = re.compile("^([0-9A-F]{4,6});([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);(.*)$")
  • icGREP/icgrep-devel/UCD-scripts/UCD_properties.py

    r5670 r5671  
    282282        f.write("\nnamespace UCD {\n")
    283283        for p in prop_code_list:
    284             self.emit_property(f, p)
    285             property_object = self.property_object_map[p]
     284            if p in self.property_object_map: self.emit_property(f, p)
    286285        f.write("}\n\n")
    287286        cformat.close_header_file(f)
     
    389388    ucd.generate_SpecialCasing_h()
    390389   
     390    ucd.generate_multicolumn_properties_file('NameAliases', ['Name_Alias', 'Alias_Kind'])
     391
    391392    #
    392393    # The Age property
  • icGREP/icgrep-devel/icgrep/UCD/PropertyObjectTable.h

    r5670 r5671  
    3434#include "Jamo.h"
    3535#include "LineBreak.h"
     36#include "NameAliases.h"
    3637#include "PropList.h"
    3738#include "ScriptExtensions.h"
     
    7879    &NA_ns::property_object,
    7980    &NA1_ns::property_object,
    80     new UnsupportedPropertyObject(Name_Alias, PropertyObject::ClassTypeId::StringProperty),
     81    &NAME_ALIAS_ns::property_object,
    8182    &SCX_ns::property_object,
    8283    &AGE_ns::property_object,
Note: See TracChangeset for help on using the changeset viewer.