Changeset 6138


Ignore:
Timestamp:
Aug 5, 2018, 4:50:06 PM (4 months ago)
Author:
cameron
Message:

Unicode decomposition, casefolding: initial check-in

Location:
icGREP/icgrep-devel/icgrep
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/UCD/PropertyObjects.h

    r6134 r6138  
    248248    const UnicodeSet GetCodepointSetMatchingPattern(re::RE * pattern) override;
    249249    const UnicodeSet GetReflexiveSet() override;
     250    const PropertyObject & GetBaseObject() {return mBaseObject;}
     251    const UnicodeSet & GetOverriddenSet() {return mOverriddenSet;}
    250252    const std::string GetStringValue(UCD::codepoint_t cp) override;
    251253
  • icGREP/icgrep-devel/icgrep/re/re_seq.h

    r5835 r6138  
    88#define RE_SEQ_H
    99
    10 #include "re_re.h"
     10#include <string>
     11#include <re/re_cc.h>
     12#include <re/re_re.h>
     13#include <UCD/unicode_set.h>
    1114#include <llvm/Support/Casting.h>
    1215
     
    6568    return llvm::isa<Seq>(s) && llvm::cast<Seq>(s)->empty();
    6669}
     70   
     71inline RE * u32string2re(std::u32string s) {
     72    std::vector<RE *> ccs;
     73    for (auto c : s) {
     74        ccs.push_back(makeCC(UCD::UnicodeSet(c)));
     75    }
     76    return makeSeq(ccs.begin(), ccs.end());
     77}
     78   
    6779}
    6880
Note: See TracChangeset for help on using the changeset viewer.