Ignore:
Timestamp:
Dec 21, 2017, 9:42:16 PM (15 months ago)
Author:
cameron
Message:

Use Alphabet=Byte in to_utf8, u8u32, UCD compiler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/u8u32_kernel.cpp

    r5549 r5798  
    5353    Var * error_mask = main.createVar("error_mask", zeroes);
    5454   
    55     PabloAST * ASCII = ccc.compileCC("ASCII", re::makeCC(0x0, 0x7F), main);
     55    PabloAST * ASCII = ccc.compileCC("ASCII", re::makeByte(0x0, 0x7F), main);
    5656    PabloBuilder ascii = PabloBuilder::Create(main);
    5757    for (int i = 1; i <= 7; i++) {
     
    6060    main.createIf(ASCII, ascii);
    6161   
    62     PabloAST * u8pfx = ccc.compileCC("u8pfx", re::makeCC(0xC0, 0xFF), main);
    63     PabloAST * nonASCII = ccc.compileCC("u8pfx", re::makeCC(0x80, 0xFF), main);
     62    PabloAST * u8pfx = ccc.compileCC("u8pfx", re::makeByte(0xC0, 0xFF), main);
     63    PabloAST * nonASCII = ccc.compileCC("u8pfx", re::makeByte(0x80, 0xFF), main);
    6464    PabloBuilder it = PabloBuilder::Create(main);
    6565    main.createIf(nonASCII, it);
    6666   
    6767    Var * u8invalid = it.createVar("u8invalid", zeroes);
    68     PabloAST * u8pfx2 = ccc.compileCC(re::makeCC(0xC2, 0xDF), it);
    69     PabloAST * u8pfx3 = ccc.compileCC(re::makeCC(0xE0, 0xEF), it);
    70     PabloAST * u8pfx4 = ccc.compileCC(re::makeCC(0xF0, 0xF4), it);
    71     PabloAST * u8suffix = ccc.compileCC("u8suffix", re::makeCC(0x80, 0xBF), it);
     68    PabloAST * u8pfx2 = ccc.compileCC(re::makeByte(0xC2, 0xDF), it);
     69    PabloAST * u8pfx3 = ccc.compileCC(re::makeByte(0xE0, 0xEF), it);
     70    PabloAST * u8pfx4 = ccc.compileCC(re::makeByte(0xF0, 0xF4), it);
     71    PabloAST * u8suffix = ccc.compileCC("u8suffix", re::makeByte(0x80, 0xBF), it);
    7272   
    7373    //
     
    101101    PabloAST * u8scope33 = it3.createAdvance(u8scope32, 1, "u8scope33");
    102102    it3.createAssign(u8scope3X, it3.createOr(u8scope32, u8scope33));
    103     PabloAST * E0_invalid = it3.createAnd(it3.createAdvance(ccc.compileCC(re::makeCC(0xE0), it3), 1), ccc.compileCC(re::makeCC(0x80, 0x9F), it3));
    104     PabloAST * ED_invalid = it3.createAnd(it3.createAdvance(ccc.compileCC(re::makeCC(0xED), it3), 1), ccc.compileCC(re::makeCC(0xA0, 0xBF), it3));
     103    PabloAST * E0_invalid = it3.createAnd(it3.createAdvance(ccc.compileCC(re::makeByte(0xE0), it3), 1), ccc.compileCC(re::makeByte(0x80, 0x9F), it3));
     104    PabloAST * ED_invalid = it3.createAnd(it3.createAdvance(ccc.compileCC(re::makeByte(0xED), it3), 1), ccc.compileCC(re::makeByte(0xA0, 0xBF), it3));
    105105    it3.createAssign(EX_invalid, it3.createOr(E0_invalid, ED_invalid));
    106106   
     
    134134    it4.createAssign(u8scope4nonfinal, it4.createOr(u8scope42, u8scope43));
    135135    it4.createAssign(u8scope4X, it4.createOr(u8scope4nonfinal, u8scope44));
    136     PabloAST * F0_invalid = it4.createAnd(it4.createAdvance(ccc.compileCC(re::makeCC(0xF0), it4), 1), ccc.compileCC(re::makeCC(0x80, 0x8F), it4));
    137     PabloAST * F4_invalid = it4.createAnd(it4.createAdvance(ccc.compileCC(re::makeCC(0xF4), it4), 1), ccc.compileCC(re::makeCC(0x90, 0xBF), it4));
     136    PabloAST * F0_invalid = it4.createAnd(it4.createAdvance(ccc.compileCC(re::makeByte(0xF0), it4), 1), ccc.compileCC(re::makeByte(0x80, 0x8F), it4));
     137    PabloAST * F4_invalid = it4.createAnd(it4.createAdvance(ccc.compileCC(re::makeByte(0xF4), it4), 1), ccc.compileCC(re::makeByte(0x90, 0xBF), it4));
    138138    it4.createAssign(FX_invalid, it4.createOr(F0_invalid, F4_invalid));
    139139
     
    172172    it.createAssign(error_mask, u8invalid);
    173173   
    174     it.createAssign(delmask, it.createOr(it.createOr(del3, del4), ccc.compileCC(re::makeCC(0xC0, 0xFF), it)));
     174    it.createAssign(delmask, it.createOr(it.createOr(del3, del4), ccc.compileCC(re::makeByte(0xC0, 0xFF), it)));
    175175   
    176176    Var * output = this->getOutputStreamVar("u32bit");
Note: See TracChangeset for help on using the changeset viewer.