Ignore:
Timestamp:
Dec 18, 2017, 1:56:51 PM (11 months ago)
Author:
cameron
Message:

RE parser restructuring; parsing symbolic ranges, collation and equivalence exprs

File:
1 edited

Legend:

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

    r5754 r5787  
    1212namespace re {
    1313
    14 bool FixedStringParser::accept_alt_mark() {
    15     if (!mCursor.more() || (*mCursor != '\n')) return false;
    16     mCursor++;
    17     return true;
     14RE * FixedStringParser::parse_alt() {
     15    std::vector<RE *> alt;
     16    do {
     17        alt.push_back(parse_seq());
     18    }
     19    while (accept('\n'));
     20    return makeAlt(alt.begin(), alt.end());
    1821}
    1922
    2023RE * FixedStringParser::parse_seq() {
    2124    std::vector<RE *> seq;
    22     while (mCursor.more() && (*mCursor != '\n')) {
     25    while (mCursor.more() && (!at('\n'))) {
    2326        seq.push_back(createCC(parse_literal_codepoint()));
    2427    }
Note: See TracChangeset for help on using the changeset viewer.