Ignore:
Timestamp:
Dec 15, 2017, 12:44:01 PM (18 months ago)
Author:
nmedfort
Message:

Initial check-in of LookAhead? support; modified LineBreakKernel? to compute CR+LF using LookAhead?(1) + misc. fixes.

File:
1 edited

Legend:

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

    r5781 r5782  
    2222
    2323namespace re {
    24 RE * resolveCaseInsensitiveMode(RE * re, bool inCaseInsensitiveMode) {
     24RE * resolveCaseInsensitiveMode(RE * re, const bool inCaseInsensitiveMode) {
    2525    if (isa<CC>(re)) {
    2626        if (inCaseInsensitiveMode) {
    27             UCD::UnicodeSet cased = caseInsensitize(*cast<CC>(re));
    28             return makeCC(std::move(cased));
     27            return makeCC(std::move(caseInsensitize(*cast<CC>(re))));
    2928        }
    30         else return re;
    31     }
    32     else if (Name * name = dyn_cast<Name>(re)) {
     29        return re;
     30    } else if (Name * name = dyn_cast<Name>(re)) {
    3331        if (!inCaseInsensitiveMode || (name->getDefinition() == nullptr)) return re;
    3432        RE * r = resolveCaseInsensitiveMode(name->getDefinition(), true);
    35         Name * n = makeName(name->getNamespace(), name->getName() + "/i", name->getType());
     33        Name * n = nullptr;
     34        if (name->hasNamespace()) {
     35            n = makeName(name->getNamespace(), name->getName() + "/i", name->getType());
     36        } else {
     37            n = makeName(name->getName() + "/i", name->getType());
     38        }
    3639        n->setDefinition(r);
    3740        return n;
    38     }
    39     else if (Seq * seq = dyn_cast<Seq>(re)) {
     41    } else if (Seq * seq = dyn_cast<Seq>(re)) {
    4042        std::vector<RE*> list;
    4143        for (auto i = seq->begin(); i != seq->end(); ++i) {
Note: See TracChangeset for help on using the changeset viewer.