Changeset 4095


Ignore:
Timestamp:
Aug 29, 2014, 4:11:22 PM (4 years ago)
Author:
cameron
Message:

Introduce USE_IF_FOR_NONFINAL for experimental option.

File:
1 edited

Legend:

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

    r4086 r4095  
    7272        PabloE * u8pfx4 = new Var(m_name_map.find("UTF8-Prefix4")->second);
    7373        PabloE * u8pfx = new Or(new Or(u8pfx2, u8pfx3), u8pfx4);
    74         cg_state.stmtsl.push_back(new Assign(gs_initial, new Or(u8pfx, u8single)));
    75 
    76 #if 0
    77         cg_state.stmtsl.push_back(new Assign(gs_initial, new Or(new Or( new Or( new And(new Var(m_name_map.find("UTF8-Prefix2")->second),
    78             new Var(cg_state.newsym)),  new And(new Var(m_name_map.find("UTF8-SingleByte")->second), new Var(cg_state.newsym))),
    79             new And(new Var(m_name_map.find("UTF8-Prefix3")->second), new Var(cg_state.newsym))),
    80             new And(new Var(m_name_map.find("UTF8-Prefix4")->second), new Var(cg_state.newsym)))));
     74#ifdef USE_IF_FOR_NONFINAL
     75        cg_state.stmtsl.push_back(new Assign(gs_initial, new Or(u8pfx, u8single)));
    8176#endif
    82         cg_state.newsym = gs_initial;
     77      cg_state.newsym = gs_initial;
    8378
    8479        //Set the 'internal.nonfinal' bit stream for the utf-8 multi-byte encoding.
     
    9186        PabloE * u8scope43 = new Advance(u8scope42);
    9287        PabloS * assign_non_final = new Assign(gs_nonfinal, new Or(new Or(u8pfx, u8scope32), new Or(u8scope42, u8scope43)));
     88#ifdef USE_IF_FOR_NONFINAL
    9389        std::list<PabloS *> * if_body = new std::list<PabloS *> ();
    9490        if_body->push_back(assign_non_final);
    9591        cg_state.stmtsl.push_back(new If(u8pfx, *if_body));
    96 #if 0
    97         cg_state.stmtsl.push_back(new Assign(gs_nonfinal, new Or(new Or(new Or(new Or(new Or( new And(new Var(m_name_map.find("UTF8-Prefix3")->second),
    98             new Var(cg_state.newsym)),  new And(new Var(m_name_map.find("UTF8-Prefix2")->second), new Var(cg_state.newsym))),
    99             new Advance( new And(new Var(m_name_map.find("UTF8-Prefix3")->second), new Var(cg_state.newsym)))),
    100             new And(new Var(m_name_map.find("UTF8-Prefix4")->second), new Var(cg_state.newsym))), new Advance(
    101             new And(new Var(m_name_map.find("UTF8-Prefix4")->second), new Var(cg_state.newsym)))), new Advance(
    102             new Advance( new And(new Var(m_name_map.find("UTF8-Prefix4")->second), new Var(cg_state.newsym)))))));
    10392#endif
    104         cg_state.newsym = gs_nonfinal;
     93#ifndef USE_IF_FOR_NONFINAL
     94        cg_state.stmtsl.push_back(assign_non_final);
     95#endif
     96        cg_state.newsym = gs_nonfinal;
    10597    }
    10698
Note: See TracChangeset for help on using the changeset viewer.