Changeset 4308 for icGREP


Ignore:
Timestamp:
Nov 22, 2014, 2:36:26 PM (5 years ago)
Author:
cameron
Message:

Intersect and Diff support

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

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/cc/cc_namemap.cpp

    r4255 r4308  
    66#include <re/re_rep.h>
    77#include <re/re_diff.h>
     8#include <re/re_intersect.h>
    89#include <re/printer_re.h>
    910#include <iostream>
     
    4142        diff->setLH(process(diff->getLH()));
    4243    }
     44    else if (Intersect * e = dyn_cast<Intersect>(re)) {
     45        e->setRH(process(e->getRH()));
     46        e->setLH(process(e->getLH()));
     47    }
    4348    else if (Name * name = dyn_cast<Name>(re)) {
    4449        RE * cc = name->getCC();
  • icGREP/icgrep-devel/icgrep/re/re_compiler.cpp

    r4298 r4308  
    108108        marker = process(diff, marker, pb);
    109109    }
     110    else if (Intersect * ix = dyn_cast<Intersect>(re)) {
     111        marker = process(ix, marker, pb);
     112    }
    110113    else if (isa<Start>(re)) {
    111114        PabloAST * const sol = pb.createNot(pb.createAdvance(pb.createNot(mLineFeed), 1));
  • icGREP/icgrep-devel/icgrep/re/re_simplifier.cpp

    r4249 r4308  
    77#include "re_alt.h"
    88#include "re_rep.h"
     9#include "re_diff.h"
     10#include "re_intersect.h"
    911#include <algorithm>
    1012#include <memory>
     
    3335        re = makeRep(simplify(rep->getRE()), rep->getLB(), rep->getUB());
    3436    }
     37    else if (Diff * diff = dyn_cast<Diff>(re)) {
     38        re = makeDiff(simplify(diff->getLH()), diff->getRH());
     39    }
     40    else if (Intersect * e = dyn_cast<Intersect>(re)) {
     41        re = makeIntersect(simplify(e->getLH()), e->getRH());
     42    }
    3543    return re;
    3644}
Note: See TracChangeset for help on using the changeset viewer.