Ignore:
Timestamp:
Oct 6, 2017, 2:51:57 PM (2 years ago)
Author:
cameron
Message:

Fix upper vs title case confusion

File:
1 edited

Legend:

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

    r5673 r5674  
    360360        (decval, digitval, numval) = (m.group(7), m.group(8), m.group(9))
    361361        (na1, isc) = (m.group(10), m.group(11))
    362         (suc, slc, stc) = (m.group(13), m.group(14), m.group(15))
     362        (upper, lower, title) = (m.group(13), m.group(14), m.group(15))
    363363        rangeMatch = NameRange_regexp.match(name)
    364364        if rangeMatch:
     
    376376        if not na1 == '':
    377377            property_object_map['na1'].addDataRecord(cp, cp, na1)
    378         if not suc == '':
    379             property_object_map['suc'].addDataRecord(cp, cp, suc)
    380             if stc == '':
    381                 property_object_map['stc'].addDataRecord(cp, cp, uc)
    382         if not slc == '':
    383             property_object_map['slc'].addDataRecord(cp, cp, slc)
    384         if not stc == '':
    385             property_object_map['stc'].addDataRecord(cp, cp, stc)
     378        if not upper == '':
     379            property_object_map['suc'].addDataRecord(cp, cp, upper)
     380        if not lower == '':
     381            property_object_map['slc'].addDataRecord(cp, cp, lower)
     382        if not title == '':
     383            property_object_map['stc'].addDataRecord(cp, cp, title)
     384        elif not upper == '':
     385            property_object_map['stc'].addDataRecord(cp, cp, upper)
    386386        if not decval == '':
    387387            property_object_map['nv'].addDataRecord(cp, cp, decval)
     
    409409        if len(fields) != 4: continue   #  Ignore context-dependent casing
    410410        if fields[3] != '': continue
    411         (lc, uc, tc) = (fields[0], fields[1], fields[2])
    412         if not uc == '':
    413             property_object_map['uc'].addDataRecord(cp, cp, uc)
    414         if not lc == '':
    415             property_object_map['lc'].addDataRecord(cp, cp, lc)
    416         if not tc == '':
    417             property_object_map['tc'].addDataRecord(cp, cp, tc)
     411        (lower, title, upper) = (fields[0], fields[1], fields[2])
     412        if not lower == '':
     413            property_object_map['lc'].addDataRecord(cp, cp, lower)
     414        if not title == '':
     415            property_object_map['tc'].addDataRecord(cp, cp, title)
     416        if not upper == '':
     417            property_object_map['uc'].addDataRecord(cp, cp, upper)
    418418    property_object_map['lc'].finalizeProperty()
     419    property_object_map['tc'].finalizeProperty()
    419420    property_object_map['uc'].finalizeProperty()
    420     property_object_map['tc'].finalizeProperty()
    421421
    422422
Note: See TracChangeset for help on using the changeset viewer.