Ignore:
Timestamp:
May 30, 2017, 10:55:14 AM (2 years ago)
Author:
cameron
Message:

Refactoring grepEngine: separate out codepoint/property value grep

File:
1 edited

Legend:

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

    r5473 r5481  
    2222#include <re/re_assertion.h>
    2323#include <re/printer_re.h>
     24#include <UCD/UnicodeNameData.h>
    2425#include <UCD/resolve_properties.h>
    2526#include <UCD/CaseFolding_txt.h>
     
    643644RE * RE_Parser::parseRegexPropertyValue(const std::string & propName, const std::string& regexValue) {
    644645    RE * propValueRe = RE_Parser::parse("^" + regexValue + "$", fModeFlagSet, mReSyntax);
    645     grep::GrepEngine engine;
    646     engine.grepCodeGen({ propValueRe }, grep::NormalMode, false, GrepSource::Internal, GrepType::PropertyValue);
    647     const auto matches = engine.grepPropertyValues(propName);
     646    const auto matches = grep::grepPropertyValues(propName, propValueRe);
    648647    if (matches.empty()) {
    649648        ParseFailure("regex " + regexValue + " match no property values");
     
    676675    RE * embedded = makeSeq({mMemoizer.memoize(makeCC(0x3B)), makeRep(makeAny(), 0, Rep::UNBOUNDED_REP), nameRE});
    677676   
    678     grep::GrepEngine engine;
    679     engine.grepCodeGen({ embedded }, grep::NormalMode, false, GrepSource::Internal, GrepType::NameExpression);
    680     CC * codepoints = engine.grepCodepoints();
     677    CC * codepoints = grep::grepCodepoints(embedded, getUnicodeNameDataPtr(), getUnicodeNameDataSize());
    681678   
    682679    if (codepoints) {
Note: See TracChangeset for help on using the changeset viewer.