Changeset 6271


Ignore:
Timestamp:
Jan 4, 2019, 5:08:21 PM (3 months ago)
Author:
cameron
Message:

ShowREs: transformations whose name begins '.' are hidden, e.g., .ToUTF8; can show with -ShowAllREs

Location:
icGREP/icgrep-devel/icgrep/re
Files:
2 edited

Legend:

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

    r6268 r6271  
    292292    RE * initialRE = re;
    293293    RE * finalRE = transform(re);
    294     if ((!mTransformationName.empty()) && (PrintOptions.isSet(ShowAllREs) || (PrintOptions.isSet(ShowREs) && (initialRE != finalRE))))  {
     294    bool ShowRE = PrintOptions.isSet(ShowAllREs) && !mTransformationName.empty();
     295    if (PrintOptions.isSet(ShowREs) && (initialRE != finalRE)) {
     296        ShowRE |= !mTransformationName.empty() && (mTransformationName[0] != '.');
     297    }
     298    if (ShowRE)  {
    295299        errs() << mTransformationName << ":\n" << Printer_RE::PrintRE(finalRE) << '\n';
    296300    }
  • icGREP/icgrep-devel/icgrep/re/to_utf8.h

    r6170 r6271  
    1616class UTF8_Transformer : public RE_Transformer {
    1717public:
    18     UTF8_Transformer(NameTransformationMode m = NameTransformationMode::None) : RE_Transformer("ToUTF8", m) {}
     18    UTF8_Transformer(NameTransformationMode m = NameTransformationMode::None) : RE_Transformer(".ToUTF8", m) {}
    1919    RE * transformCC(CC * cc) override;
    2020};
Note: See TracChangeset for help on using the changeset viewer.