Ignore:
Timestamp:
Oct 21, 2014, 9:54:49 AM (5 years ago)
Author:
nmedfort
Message:

Added Diff to RE Compiler/Parser?. Removed CC.negate()

File:
1 edited

Legend:

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

    r4245 r4255  
    88
    99//Regular Expressions
    10 #include "re/re_re.h"
    11 #include "re/re_alt.h"
    12 #include "re/re_any.h"
    13 #include "re/re_cc.h"
    14 #include "re/re_name.h"
    15 #include "re/re_end.h"
    16 #include "re/re_rep.h"
    17 #include "re/re_seq.h"
    18 #include "re/re_start.h"
     10#include <re/re_re.h>
     11#include <re/re_alt.h>
     12#include <re/re_any.h>
     13#include <re/re_cc.h>
     14#include <re/re_name.h>
     15#include <re/re_end.h>
     16#include <re/re_rep.h>
     17#include <re/re_seq.h>
     18#include <re/re_start.h>
     19#include <re/re_diff.h>
    1920
    2021using namespace re;
     
    2526
    2627    if (re == nullptr) {
    27         retVal = "--> RE NullPtr! <--";
     28        retVal = "<NULL>";
    2829    }
    2930    else if (const Alt* re_alt = dyn_cast<const Alt>(re))
     
    5960        retVal += re_name->getName();
    6061        retVal += "\" ";
     62    }
     63    else if (const Diff* diff = dyn_cast<const Diff>(re))
     64    {
     65        retVal = "Diff (";
     66        retVal += PrintRE(diff->getLH());
     67        retVal += " , ";
     68        retVal += PrintRE(diff->getRH());
     69        retVal += ") ";
    6170    }
    6271    else if (isa<const End>(re))
     
    102111    else
    103112    {
    104         retVal = "--> RE Unknown <--";
     113        retVal = "???";
    105114    }
    106115    return std::move(retVal);
Note: See TracChangeset for help on using the changeset viewer.