Changeset 4146


Ignore:
Timestamp:
Sep 10, 2014, 7:03:10 AM (4 years ago)
Author:
cameron
Message:

Parse various UCD files and generate header files

Location:
proto/charsetcompiler/UCD
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • proto/charsetcompiler/UCD/DerivedGeneralCategory.txt

    r4071 r4146  
    1   Unicode_def_regexp = "^([0-9A-F]{4,6})(\.\.[0-9A-F]{4,6})\s;\s[A-Z][a-z0-9]\s#"
    2 
    3 
    4 
    5 
    6 # DerivedGeneralCategory-6.3.0.txt
     1\# DerivedGeneralCategory-6.3.0.txt
    72# Date: 2013-07-05, 14:08:45 GMT [MD]
    83#
  • proto/charsetcompiler/UCD/unicode_set.py

    r4142 r4146  
    5757      runtype = {-1:"Full", 0:"Empty", 1: "Mixed"}
    5858      setrep = (" " * indent) + ("%s.runs = {" % name)
     59      if len(self.runs) >= entries_per_line: setrep += "\n" + (" " * (indent+1))
    5960      setrep += '{%s, %i}' % (runtype[self.runs[0][0]], self.runs[0][1])
    6061      for i in range(1, len(self.runs)):
     
    6465      setrep += '};\n'
    6566      setrep += (" " * indent) + ("%s.quads = {" % name)
     67      if len(self.quads) >= entries_per_line: setrep += "\n" + (" " * (indent+1))
    6668      if self.quads != []:
    6769         setrep += "%#018x" % self.quads[0]
Note: See TracChangeset for help on using the changeset viewer.