Changeset 5737


Ignore:
Timestamp:
Nov 15, 2017, 4:55:52 PM (15 months ago)
Author:
cameron
Message:

Remove experimental property-class mode expressions

Location:
icGREP/icgrep-devel
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/QA/greptest.xml

    r5648 r5737  
    845845<grepcase regexp="\p{script=/(kata|Hira).ana/}" datafile="hiragana_and_katakana" grepcount="3"/>
    846846<grepcase regexp="(?:\p{greek}\p{greek}\p{greek})" datafile="upper_lower_greek" grepcount="3"/>
    847 <grepcase regexp="(?\p{upper}:\p{greek}\p{greek}\p{greek})" datafile="upper_lower_greek" grepcount="1"/>
    848 <grepcase regexp="(?\p{lower}:\p{greek}\p{greek}\p{greek})" datafile="upper_lower_greek" grepcount="1"/>
    849 <grepcase regexp="(?\p{upper}:\p{greek})" datafile="upper_lower_greek" grepcount="2"/>
    850847
    851848<grepcase regexp="\N{AIRPLANE}" datafile="../All_good" grepcount="8"/>
  • icGREP/icgrep-devel/icgrep/re/re_parser.cpp

    r5698 r5737  
    9999
    100100RE * RE_Parser::parse_alt() {
    101     return parse_alt_with_intersect(nullptr);
    102 }
    103 
    104 RE * RE_Parser::parse_alt_with_intersect(RE* reToBeIntersected) {
    105101    std::vector<RE *> alt;
    106102    for (;;) {
    107         alt.push_back(parse_seq_with_intersect(reToBeIntersected));
     103        alt.push_back(parse_seq());
    108104        if (*mCursor != '|') {
    109105            break;
     
    118114
    119115RE * RE_Parser::parse_seq() {
    120     return parse_seq_with_intersect(nullptr);
    121 }
    122 
    123 RE * RE_Parser::parse_seq_with_intersect(RE* reToBeIntersected) {
    124116    std::vector<RE *> seq;
     117    if (!mCursor.more() || (*mCursor == '|') || (*mCursor == ')')) return makeSeq();
    125118    for (;;) {
    126119        RE * re = parse_next_item();
     
    131124            }
    132125            break;
    133         }
    134         if (reToBeIntersected) {
    135             re = makeIntersect(reToBeIntersected, re);
    136126        }
    137127        re = extend_item(re);
     
    283273                    return parse_next_item();
    284274                }
    285             case '\\': {
    286                 ++mCursor;
    287                 if (*mCursor == 'p' || *mCursor == 'P') {
    288                     RE* reToBeIntersected = parseEscapedSet();
    289                     if (*mCursor == ':') {
    290                         ++mCursor;
    291                         group_expr = parse_alt_with_intersect(reToBeIntersected);
    292                         fModeFlagSet = modeFlagSet;
    293                         break;
    294                     } else {  // if *_cursor == ')'
    295                         ++mCursor;
    296                         return parse_next_item();
    297                     }
    298                 }
    299                 break;
    300             }
    301275            default:
    302276                ParseFailure("Illegal (? syntax.");
  • icGREP/icgrep-devel/icgrep/re/re_parser.h

    r5732 r5737  
    112112    virtual RE * parse_alt();
    113113
    114     virtual RE * parse_alt_with_intersect(RE* reToBeIntersected);
    115 
    116114    virtual RE * parse_seq();
    117 
    118     RE * parse_seq_with_intersect(RE* reToBeIntersected);
    119115
    120116    virtual RE * parse_next_item();
  • icGREP/icgrep-devel/icgrep/re/re_parser_bre.cpp

    r5679 r5737  
    3535    }
    3636
    37     RE * RE_Parser_BRE::parse_alt_with_intersect(RE *reToBeIntersected) {
     37    RE * RE_Parser_BRE::parse_alt() {
    3838        std::vector<RE *> alt;
    3939        for (;;) {
    40             alt.push_back(parse_seq_with_intersect(reToBeIntersected));
     40            alt.push_back(parse_seq());
    4141
    4242            if (!isEscapedCharAhead('|')) {
  • icGREP/icgrep-devel/icgrep/re/re_parser_bre.h

    r5206 r5737  
    2020        virtual bool isSetEscapeChar(char c) override;
    2121        virtual bool isUnsupportChartsetOperator(char c) override;
    22         virtual RE * parse_alt_with_intersect(RE* reToBeIntersected) override;
     22        virtual RE * parse_alt() override;
    2323        virtual RE * parse_next_item() override ;
    2424        virtual RE * parse_escaped() override;
Note: See TracChangeset for help on using the changeset viewer.