Changeset 5717


Ignore:
Timestamp:
Oct 29, 2017, 7:17:12 AM (18 months ago)
Author:
cameron
Message:

Fix for upper bound repetition

File:
1 edited

Legend:

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

    r5716 r5717  
    371371        return repeated;
    372372    }
    373     PabloAST * reachable = pb.createOr(repeated, pb.createAdvance(repeated, 1), "within1");
     373    PabloAST * reachable = nullptr;
     374    if (indexStream == nullptr) reachable = pb.createOr(repeated, pb.createAdvance(repeated, 1), "within1");
     375    else reachable = pb.createOr(repeated, pb.createIndexedAdvance(repeated, indexStream, 1), "within1");
    374376    while ((i * 2) < total_lgth) {
    375377        PabloAST * v = reachable;
     
    453455        // Extend the mask by ub - 1 byte positions to ensure the mask ends on the FinalMatchUnit of the repeated region.
    454456        PabloAST * upperLimitMask = reachable(cursor, 1, ub - 1, mFinal, pb);
    455         PabloAST * masked = pb.createAnd(markerVar(compile(repeated, pb)), upperLimitMask);
     457        PabloAST * masked = pb.createAnd(markerVar(compile(repeated, pb)), upperLimitMask, "masked");
    456458        PabloAST * nonFinal = mNonFinal;
    457459        // MatchStar deposits any cursors on the post position. However those cursors may may land on the initial "byte" of a
Note: See TracChangeset for help on using the changeset viewer.