Changeset 5537


Ignore:
Timestamp:
Jun 29, 2017, 11:06:23 PM (2 years ago)
Author:
cameron
Message:

Enable ?m and ?x mode flags

File:
1 edited

Legend:

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

    r5515 r5537  
    144144RE * RE_Parser::parse_next_item() {
    145145    RE * re = nullptr;
    146     if (mCursor.more()) {       
     146    if (fModeFlagSet & IGNORE_SPACE_MODE_FLAG) {
     147        while (*mCursor == ' ') mCursor++;
     148    }
     149    if (mCursor.more()) {
    147150        switch (*mCursor) {
    148151            case '(':
     
    251254                        case 'i': modeBit = CASE_INSENSITIVE_MODE_FLAG; break;
    252255                        case 'g': modeBit = GRAPHEME_CLUSTER_MODE; break;
    253                         //case 'm': modeBit = MULTILINE_MODE_FLAG; break;
     256                        case 'm': modeBit = MULTILINE_MODE_FLAG; break;
    254257                        //case 's': modeBit = DOTALL_MODE_FLAG; break;
    255                         //case 'x': modeBit = IGNORE_SPACE_MODE_FLAG; break;
     258                        case 'x': modeBit = IGNORE_SPACE_MODE_FLAG; break;
    256259                        //case 'd': modeBit = UNIX_LINES_MODE_FLAG; break;
    257260                        default: ParseFailure("Unsupported mode flag.");
Note: See TracChangeset for help on using the changeset viewer.