Ignore:
Timestamp:
Oct 16, 2018, 2:29:44 PM (7 months ago)
Author:
nmedfort
Message:

Added RE_Inspector.

Migrated RE passes to RE_Transformer.

Incorporated Memoizer functionality into RE_Transformer/Inspector.

Removed Memoizer.

Bug fix for unicode_set.

File:
1 edited

Legend:

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

    r6169 r6173  
    255255    mCaptureGroupCount++;
    256256    std::string captureName = "\\" + std::to_string(mCaptureGroupCount);
    257     Name * const capture  = mMemoizer.memoize(makeCapture(captureName, captured));
     257    Name * const capture  = makeCapture(captureName, captured);
    258258    auto key = std::make_pair("", captureName);
    259259    mNameMap.insert(std::make_pair(std::move(key), capture));
     
    777777
    778778CC * RE_Parser::createCC(const codepoint_t cp) {
    779     CC * cc = mMemoizer.memoize(makeCC(cp));
    780     return cc;
     779    return makeCC(cp);
    781780}
    782781
     
    817816
    818817Name * RE_Parser::makeDigitSet() {
    819     return mMemoizer.memoize(createName("nd"));
     818    return createName("nd");
    820819}
    821820
    822821Name * RE_Parser::makeAlphaNumeric() {
    823     return mMemoizer.memoize(createName("alnum"));
     822    return createName("alnum");
    824823}
    825824
    826825Name * RE_Parser::makeWhitespaceSet() {
    827     return mMemoizer.memoize(createName("whitespace"));
     826    return createName("whitespace");
    828827}
    829828
    830829Name * RE_Parser::makeWordSet() {
    831     return mMemoizer.memoize(createName("word"));
     830    return createName("word");
    832831}
    833832
     
    838837        return f->second;
    839838    }
    840     Name * const property = mMemoizer.memoize(makeName(value, Name::Type::UnicodeProperty));
     839    Name * const property = makeName(value, Name::Type::UnicodeProperty);
    841840    mNameMap.insert(std::make_pair(std::move(key), property));
    842841    return property;
     
    849848        return f->second;
    850849    }
    851     Name * const property = mMemoizer.memoize(makeName(prop, value, Name::Type::UnicodeProperty));
     850    Name * const property = makeName(prop, value, Name::Type::UnicodeProperty);
    852851    mNameMap.insert(std::make_pair(std::move(key), property));
    853852    return property;
Note: See TracChangeset for help on using the changeset viewer.