Changeset 3995


Ignore:
Timestamp:
Aug 12, 2014, 9:02:33 AM (4 years ago)
Author:
cameron
Message:

Restructuring - not quite ready

File:
1 edited

Legend:

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

    r3994 r3995  
    118118        }
    119119        if (name->isNegated()) {
    120             ccExpr = new Not(new Or(ccExpr, new CharClass(m_name_map.find("LineFeed")->second)));
     120            ccExpr = new And(new Not(new Or(ccExpr, new CharClass(m_name_map.find("LineFeed")->second))),
     121                             new CharClass(m_name_map.find("internal.initial")->second));
    121122        }
    122123        cg_state.stmtsl.push_back(new Assign(gs_retVal, new Advance(new And(ccExpr, markerExpr))));
    123124        cg_state.newsym = gs_retVal;
    124125
    125         std::cout << "\n" << "(" << StatementPrinter::PrintStmts(cg_state) << ")" << "\n" << std::endl;
     126        //std::cout << "\n" << "(" << StatementPrinter::PrintStmts(cg_state) << ")" << "\n" << std::endl;
    126127    }
    127128    else if (Start* start = dynamic_cast<Start*>(re))
     
    176177            std::string gs_retVal = symgen.gensym("marker");
    177178
    178 std::cout << "MatchStar pattern found!" << std::endl;
    179179            PabloE* ccExpr;
    180             if (name->getType() == Name::UnicodeCategory)
    181             {
    182 std::cout << "MatchStar pattern External!" << std::endl;
    183                 ccExpr = new Call(name->getName());
     180            if (rep_name->getType() == Name::UnicodeCategory)
     181            {
     182                ccExpr = new Call(rep_name->getName());
    184183            }
    185184            else
    186185            {
    187 std::cout << "MatchStar pattern internal!" << std::endl;
    188                 ccExpr = new CharClass(name->getName());
    189             }
    190 
    191             if (name->isNegated()) {
    192 std::cout << "MatchStar pattern Negated!" << std::endl;               
    193                 ccExpr = new Not(new Or(ccExpr, new CharClass(m_name_map.find("LineFeed")->second)));
     186                ccExpr = new CharClass(rep_name->getName());
     187            }
     188
     189            if (rep_name->isNegated()) {
     190                ccExpr = new And(new Not(new Or(ccExpr, new CharClass(m_name_map.find("LineFeed")->second))),
     191                                 new CharClass(m_name_map.find("internal.initial")->second));
    194192            }
    195193            if (rep_name->getType() == Name::FixedLength)
     
    199197            else //Name::Unicode and Name::UnicodeCategory
    200198            {
    201 std::cout << "MatchStar pattern Unicode!" << std::endl;               
    202199                cg_state.stmtsl.push_back(new Assign(gs_retVal,
    203200                    new And(new MatchStar(new Var(cg_state.newsym), new Or(new CharClass(m_name_map.find("internal.nonfinal")->second),
Note: See TracChangeset for help on using the changeset viewer.