Ignore:
Timestamp:
Aug 4, 2014, 9:46:49 AM (5 years ago)
Author:
daled
Message:

icGREP now uses scanthru for multibyte unicode character classes.

File:
1 edited

Legend:

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

    r3940 r3955  
    6767    t1_list->assign(re_list->begin(), re_list->end());
    6868    if (t1_list->size() > 0)
    69     {
     69    { 
    7070        std::list<RE*>* t2_list = mkSeqList(t1_list);
    7171        if (t2_list->size() > 1)
     
    104104    else if (Seq* seq = dynamic_cast<Seq*>(re_list->back()))
    105105    {
    106         re_list->pop_back();
    107         seq->GetREList()->reverse();
    108         re_list->insert(re_list->end(), seq->GetREList()->begin(), seq->GetREList()->end());
    109 
    110         return mkSeqList_helper(ret_list, re_list);
     106        if (seq->getType() == Seq::Byte)
     107        {
     108            ret_list->push_front(re_list->back());
     109            re_list->pop_back();
     110            return mkSeqList_helper(ret_list, re_list);
     111        }
     112        else
     113        {
     114            re_list->pop_back();
     115            seq->GetREList()->reverse();
     116            re_list->insert(re_list->end(), seq->GetREList()->begin(), seq->GetREList()->end());
     117
     118            return mkSeqList_helper(ret_list, re_list);
     119        }
    111120    }
    112121    else
Note: See TracChangeset for help on using the changeset viewer.