Ignore:
Timestamp:
Jan 19, 2017, 2:41:02 PM (3 years ago)
Author:
nmedfort
Message:

Code clean-up. Removed Pablo Call, SetIthBit? and Prototype.

File:
1 edited

Legend:

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

    r5091 r5267  
    2222
    2323using namespace re;
     24using namespace llvm;
    2425
    25 const std::string Printer_RE::PrintRE(const RE * re)
    26 {
     26const std::string Printer_RE::PrintRE(const RE * re) {
    2727    std::string retVal = "";
    2828
    2929    if (re == nullptr) {
    3030        retVal = "<NULL>";
    31     }
    32     else if (const Alt* re_alt = dyn_cast<const Alt>(re))
    33     {
     31    } else if (const Alt* re_alt = dyn_cast<const Alt>(re)) {
    3432        retVal += "(Alt[";
    3533        bool comma = false;
     
    4240        }
    4341        retVal += "])";
    44     }
    45     else if (const CC* re_cc = dyn_cast<const CC>(re))
    46     {
     42    } else if (const CC* re_cc = dyn_cast<const CC>(re)) {
    4743        retVal = "CC \"";
    4844        retVal += re_cc->canonicalName(UnicodeClass);
     
    5551            retVal += "]";
    5652        }
    57     }
    58     else if (const Name* re_name = dyn_cast<const Name>(re))
    59     {
     53    } else if (const Name* re_name = dyn_cast<const Name>(re)) {
    6054        retVal = "Name \"";
    6155        retVal += re_name->getName();
    6256        retVal += "\" ";
    63     }
    64     else if (const Assertion * a = dyn_cast<const Assertion>(re)) {
     57    } else if (const Assertion * a = dyn_cast<const Assertion>(re)) {
    6558        retVal = (a->getSense() == Assertion::Sense::Positive) ? "" : "Negative";
    6659        retVal += (a->getKind() == Assertion::Kind::Lookahead) ? "Lookahead" : "Lookbehind";
     
    6861        retVal += PrintRE(a->getAsserted());
    6962        retVal += ") ";
    70     }
    71     else if (const Diff* diff = dyn_cast<const Diff>(re))
    72     {
     63    } else if (const Diff* diff = dyn_cast<const Diff>(re)) {
    7364        retVal = "Diff (";
    7465        retVal += PrintRE(diff->getLH());
     
    7667        retVal += PrintRE(diff->getRH());
    7768        retVal += ") ";
    78     }
    79     else if (const Intersect* x = dyn_cast<const Intersect>(re))
    80     {
     69    } else if (const Intersect* x = dyn_cast<const Intersect>(re)) {
    8170        retVal = "Intersect (";
    8271        retVal += PrintRE(x->getLH());
     
    8473        retVal += PrintRE(x->getRH());
    8574        retVal += ") ";
    86     }
    87     else if (isa<const End>(re))
    88     {
     75    } else if (isa<const End>(re)) {
    8976        retVal = "End";
    90     }
    91     else if (const Rep* re_rep = dyn_cast<const Rep>(re))
    92     {
     77    } else if (const Rep* re_rep = dyn_cast<const Rep>(re)) {
    9378        retVal = "Rep(";
    9479        retVal.append(PrintRE(re_rep->getRE()));
     
    10388        }
    10489        retVal.append(")");
    105     }
    106     else if (const Seq* re_seq = dyn_cast<const Seq>(re))
    107     {
     90    } else if (const Seq* re_seq = dyn_cast<const Seq>(re)) {
    10891        retVal = "(Seq[";
    10992        bool comma = false;
     
    11699        }
    117100        retVal.append("])");
    118     }
    119     else if (isa<const Start>(re))
    120     {
     101    } else if (isa<const Start>(re)) {
    121102        retVal = "Start";
    122     }
    123     else if (isa<const Any>(re))
    124     {
     103    } else if (isa<const Any>(re)) {
    125104        retVal = "Any";
    126     }
    127     else
    128     {
     105    } else {
    129106        retVal = "???";
    130107    }
Note: See TracChangeset for help on using the changeset viewer.