Ignore:
Timestamp:
Dec 9, 2017, 4:37:51 PM (19 months ago)
Author:
cameron
Message:

Restructure to eliminate unnecessary dependencies on RegExpCompiler? and UCDLIB

File:
1 edited

Legend:

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

    r5736 r5770  
    1212#include <re/re_intersect.h>
    1313#include <re/re_assertion.h>
     14#include <re/re_group.h>
    1415#include <re/re_nullable.h>
    1516#include <re/printer_re.h>
     
    5253    } else if (isa<CC>(re)) {
    5354        return false;
     55    } else if (const Group * g = dyn_cast<Group>(re)) {
     56        return matchesEmptyString(g->getRE());
    5457    } else if (const Name * n = dyn_cast<Name>(re)) {
    5558        return matchesEmptyString(n->getDefinition());
     
    368371    } else if (isa<Start>(re) || isa<End>(re) || isa<Assertion>(re)) {
    369372        return true;
     373    } else if (const Group * g = dyn_cast<Group>(re)) {
     374        if ((g->getMode() == Group::Mode::GraphemeMode) && (g->getSense() == Group::Sense::On)) {
     375            return true;
     376        }
     377        else {
     378            return hasAssertion(g->getRE());
     379        }
    370380    }
    371381    else llvm_unreachable("Unknown RE type");
Note: See TracChangeset for help on using the changeset viewer.