Ignore:
Timestamp:
Jul 31, 2017, 12:41:52 PM (20 months ago)
Author:
xuedongx
Message:

use multiplexed character classes as the input to grep kernel, restructure the icGrep pipeline: Matches = RE_compiler<regexp>(CharacterClasses?, LineBreaks?)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/re/re_compiler.cpp

    r5565 r5585  
    4242namespace re {
    4343
    44 
    4544RE * RE_Compiler::resolveUnicodeProperties(RE * re) {
    4645    Name * ZeroWidth = nullptr;
    4746    mCompiledName = &mBaseMap;
    4847
    49     re = resolveNames(re);
    5048    auto nameMap = gatherNames(re, ZeroWidth);
    51     if (LLVM_LIKELY(nameMap.size() > 0)) {
    52         UCD::UCDCompiler ucdCompiler(mCCCompiler);
    53         if (LLVM_UNLIKELY(AlgorithmOptionIsSet(DisableIfHierarchy))) {
    54             ucdCompiler.generateWithoutIfHierarchy(nameMap, mPB);
    55         } else {
    56             ucdCompiler.generateWithDefaultIfHierarchy(nameMap, mPB);
    57         }
    58         for (auto t : nameMap) {
    59             if (t.second) {
    60                 mCompiledName->add(t.first, makeMarker(MarkerPosition::FinalMatchUnit, mPB.createAnd(t.second, mAny)));
    61             }
    62         }
    63     }
    6449
    6550    // Now precompile any grapheme segmentation rules
     
    130115        nextPos = AdvanceMarker(marker, MarkerPosition::FinalPostPositionUnit, pb);
    131116    }
    132     return makeMarker(MarkerPosition::FinalMatchUnit, pb.createAnd(markerVar(marker), pb.createAnd(mCCCompiler.compileCC(cc), mFinal)));
     117    return makeMarker(MarkerPosition::FinalMatchUnit, pb.createAnd(markerVar(marker), pb.createAnd(mCCCompiler.compileCC(cc), mAny)));
    133118}
    134119
Note: See TracChangeset for help on using the changeset viewer.