Changeset 3968 for proto/charsetcompiler


Ignore:
Timestamp:
Aug 7, 2014, 9:48:34 AM (5 years ago)
Author:
cameron
Message:

Bug fixes

Location:
proto/charsetcompiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • proto/charsetcompiler/inputs/Digit_and_Hex

    r914 r3968  
    1 lex.Digit = [0-9]
    2 lex.Hex = [0-9A-Fa-f]
     1LP = [(]
     2RP=[)]
     3
     4
  • proto/charsetcompiler/unicode_category_compiler.py

    r3967 r3968  
    154154     targetVar = "bytetest_%x_%x" % (lbyte, hbyte)
    155155     cgo.chardef2py(CanonicalCharSetDef(targetVar, [(lbyte, hbyte)]))
    156      return
     156     return targetVar
    157157   #
    158158   # One or more bytes of the lower and upper bound may be the same.
     
    162162     targetVar = "bytetest_%x" % (lbyte)
    163163     cgo.chardef2py(CanonicalCharSetDef(targetVar, [(lbyte, hbyte)]))
    164      cgo.add_assignment(targetVar, cgo.expr2py(make_and(make_shift_forward(Var(targetVar), 1), Var(sfxVar))))
    165      return targetVar
     164     var2 = targetVar+"_adv"
     165     cgo.add_assignment(var2, cgo.expr2py(make_and(make_shift_forward(Var(targetVar), 1), Var(sfxVar))))
     166     return var2
    166167   # We now have a range involving different bytes at position n.
    167168   following_suffix_mask = (1 << ((hlen - n) * 6)) - 1
     
    334335(0x10000, 0x10FFFF)]
    335336
    336 Unicode_CC_struct = "class category_%s:\n\tcc = 0\n\n"
     337Unicode_CC_struct = "class struct_%s:\n\tcc = 0\n\n"
    337338Unicode_CC_header = "def %s(basis_bits, struct_%s):\n"
    338339Unicode_dummy_main = "\n\ndef Main(basis_bits):\n    pass\n"
Note: See TracChangeset for help on using the changeset viewer.