Ignore:
Timestamp:
Dec 16, 2017, 9:06:44 AM (16 months ago)
Author:
cameron
Message:

Restructuring step/tidy-up for re_passes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/grep_engine.cpp

    r5782 r5784  
    120120    const auto n = REs.size();
    121121    std::vector<std::vector<re::CC *>> charclasses(n);
    122     for (unsigned i = 0; i < n; i++) {
    123         REs[i] = resolveCaseInsensitiveMode(REs[i], grep::IgnoreCaseFlag);
    124         REs[i] = resolveGraphemeMode(REs[i], false /* not in grapheme mode at top level*/);
    125         REs[i] = re::resolveNames(REs[i]);
    126         REs[i] = exclude_CC(REs[i], re::makeCC(re::makeCC(0x0A, 0x0D), re::makeCC(re::makeCC(0x85), re::makeCC(0x2028, 0x2029))));
    127 
    128         const auto UnicodeSets = re::collectUnicodeSets(REs[i]);
    129         std::vector<std::vector<unsigned>> exclusiveSetIDs;
    130         doMultiplexCCs(UnicodeSets, exclusiveSetIDs, charclasses[i]);
    131         REs[i] = multiplex(REs[i], UnicodeSets, exclusiveSetIDs);
    132         REs[i] = regular_expression_passes(REs[i]);
    133   }
    134 
    135122    std::vector<StreamSetBuffer *> MatchResultsBufs(n);
    136123
    137124    for(unsigned i = 0; i < n; ++i){
     125        std::tie<re::RE*, std::vector<re::CC *>>(REs[i], charclasses[i]) = multiplexing_passes(REs[i]);
    138126        const auto numOfCharacterClasses = charclasses[i].size();
    139127        StreamSetBuffer * CharClasses = mGrepDriver->addBuffer<CircularBuffer>(idb, idb->getStreamSetTy(numOfCharacterClasses), segmentSize * bufferSegments);
Note: See TracChangeset for help on using the changeset viewer.