Ignore:
Timestamp:
Dec 8, 2017, 6:16:53 PM (22 months ago)
Author:
cameron
Message:

Range RE objects

File:
1 edited

Legend:

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

    r5706 r5763  
    44#include <re/re_seq.h>
    55#include <re/re_rep.h>
     6#include <re/re_range.h>
    67#include <re/re_diff.h>
    78#include <re/re_intersect.h>
     
    5455}
    5556
     57inline bool lessThan(const Range * const lh, const Range * const rh) {
     58    return compare(lh->getLo(), rh->getLo()) || compare(lh->getHi(), rh->getHi());
     59}
     60
    5661static bool lessThan(const Intersect * const lh, const Intersect * const rh) {
    5762    return compare(lh->getLH(), rh->getLH()) || compare(lh->getRH(), rh->getRH());
     
    8590        case Type::Name:
    8691            return *cast<Name>(lh) < *cast<Name>(rh);
     92        case Type::Range:
     93            return lessThan(cast<Range>(lh), cast<Range>(rh));
    8794        case Type::Diff:
    8895            return lessThan(cast<Diff>(lh), cast<Diff>(rh));
Note: See TracChangeset for help on using the changeset viewer.