Ignore:
Timestamp:
Jul 21, 2014, 11:49:25 AM (5 years ago)
Author:
cameron
Message:

Updates for icgrep-0.9: re simplifications, re names, replimit mods, debugged while loops

File:
1 edited

Legend:

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

    r3850 r3914  
    77#include "printer_re.h"
    88
    9 
    10 Printer_RE::Printer_RE(){}
    119
    1210std::string Printer_RE::PrintRE(RE* re)
     
    4543        //retVal += " is codepoint 47 a member: " + member;
    4644
    47         /*
     45/*
    4846        retVal += "CC \"";
    4947        retVal += re_cc->getName();
     
    6361            retVal += "]";
    6462        }
    65         */
     63*/
     64    }
     65    else if (Name* re_name = dynamic_cast<Name*>(re))
     66    {
     67        retVal += "Name \"";
     68        retVal += re_name->getName();
     69        retVal += "\" ";
    6670    }
    6771    else if (End* re_end = dynamic_cast<End*>(re))
     
    7276    {
    7377        retVal += "Rep("  + PrintRE(re_rep->getRE()) + "," + INT2STRING(re_rep->getLB()) + ",";
    74 
    75         if (Unbounded* unbounded = dynamic_cast<Unbounded*>(re_rep->getUB()))
    76         {
    77             retVal += "Unbounded)";
    78         }
    79         else if (UpperBound* upperbound = dynamic_cast<UpperBound*>(re_rep->getUB()))
    80         {
    81             retVal += "UpperBound " + INT2STRING(upperbound->getUB()) + ")";
    82         }
     78        retVal += (re_rep->getUB() == unboundedRep ? "Unbounded" : "UpperBound(" + INT2STRING(re_rep->getUB()) + ")");
    8379    }
    8480    else if (Seq* re_seq = dynamic_cast<Seq*>(re))
Note: See TracChangeset for help on using the changeset viewer.