Ignore:
Timestamp:
Mar 10, 2018, 6:16:17 PM (14 months ago)
Author:
cameron
Message:

Fixes for Unix line break mode

File:
1 edited

Legend:

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

    r5898 r5899  
    115115        return true;
    116116    } else if (const Seq * seq = dyn_cast<Seq>(re)) {
    117         return (seq->size() == 1) && isByteLength(&seq[0]);
     117        bool byteLengthSeen = false;
     118        for (const RE * e : *seq) {
     119            if (isa<Assertion>(e)) continue;
     120            else if (byteLengthSeen) return false;
     121            else if (isByteLength(e)) byteLengthSeen = true;
     122            else return false;
     123        }
     124        return byteLengthSeen;
    118125    } else if (const Rep * rep = dyn_cast<Rep>(re)) {
    119126        return (rep->getLB() == 1) && (rep->getUB() == 1) && isByteLength(rep->getRE());
Note: See TracChangeset for help on using the changeset viewer.