Ignore:
Timestamp:
Aug 29, 2018, 3:05:38 AM (12 months ago)
Author:
xwa163
Message:

lz4_grep: 1. fix typo 2. analyse the requirement of u8 non final

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/lz4/grep/lz4_grep_base_generator.cpp

    r6152 r6153  
    160160        re::RE* targetRe = mRE;
    161161
    162         bool allCcByteLength = re::isAllCcByteLength(mRE);
     162        bool requireNonFinal = re::isRequireNonFinal(mRE);
     163        std::vector<re::CC*> OriginalUnicodeSets = re::collectCCs(seq, &cc::Unicode, std::set<re::Name *>({re::makeZeroWidth("\\b{g}")}));;
    163164
    164165        linefeedCC = re::makeCC(0x0A);
     
    166167        seq->push_back(targetRe);
    167168        seq->push_back(std::move(linefeedCC));
    168         seq->push_back(u8FinalRe);
     169        if (requireNonFinal) {
     170            seq->push_back(u8FinalRe);
     171        }
     172
    169173
    170174        std::vector<re::CC*> UnicodeSets = re::collectCCs(seq, &cc::Unicode, std::set<re::Name *>({re::makeZeroWidth("\\b{g}")}));;
     
    184188        mGrepDriver->makeKernelCall(ccK, {compressedBitStream}, {CharClasses});
    185189
    186         if (allCcByteLength) {
     190        if (!requireNonFinal) {
    187191            // We do not need to decompress U8 NonFinal Stream is all of the character class in target regular expression is byte length
    188192            uncompressedCharClasses = this->decompressBitStream(compressedByteStream, CharClasses);
     
    210214            Kernel* notK = mGrepDriver->addKernelInstance<LZ4NotKernel>(idb);
    211215            mGrepDriver->makeKernelCall(notK, {u8FinalStream}, {u8NoFinalStream});
    212 
    213216        }
    214217    } else {
     
    301304
    302305    for(unsigned i = 0; i < nREs; ++i) {
    303 
    304306
    305307        if (ccMultiplexing) {
     
    353355                    uncompressedBasisBits = this->s2p(byteStream);
    354356                }
    355                 this->linefeedStreamFromUncompressedBits(uncompressedBasisBits);
     357                LineBreakStream = this->linefeedStreamFromUncompressedBits(uncompressedBasisBits);
    356358                std::vector<std::string> externalStreamNames;
    357359                std::vector<StreamSetBuffer *> icgrepInputSets = {uncompressedBasisBits};
Note: See TracChangeset for help on using the changeset viewer.