Changeset 5890 for icGREP


Ignore:
Timestamp:
Mar 5, 2018, 9:01:10 AM (11 months ago)
Author:
cameron
Message:

Fixes for byte/bit kernel; match results

Location:
icGREP/icgrep-devel/icgrep
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/grep_kernel.cpp

    r5889 r5890  
    148148// output
    149149{Binding{kb->getStreamSetTy(1), "nonFinal", FixedRate()},
    150  Binding{kb->getStreamSetTy(1), "UnicodeLB", FixedRate(), Add1()}}) {
     150 Binding{kb->getStreamSetTy(1), "UnicodeLB", FixedRate()}}) {
    151151
    152152}
     
    308308    cc::Parabix_CC_Compiler ccc(scope1, basis);
    309309    RE_Compiler re_compiler(scope1, ccc);
    310     PabloAST * const matches = re_compiler.compile(mSuffixRE);
     310    PabloAST * const matches = re_compiler.compile(mSuffixRE, prefixMatches);
    311311    Var * const output = getOutputStreamVar("matches");
    312312    pb.createAssign(pb.createExtract(output, pb.getInteger(0)), matches);
     
    322322    PabloAST * notLB = pb.createNot(lineBreaks);
    323323    PabloAST * match_follow = pb.createMatchStar(matchResults, notLB);
     324    PabloAST * unterminatedLineAtEOF = pb.createAtEOF(pb.createAdvance(notLB, 1), "unterminatedLineAtEOF");
    324325    Var * const matchedLines = getOutputStreamVar("matchedLines");
    325     pb.createAssign(pb.createExtract(matchedLines, pb.getInteger(0)), pb.createAnd(match_follow, lineBreaks));
     326    pb.createAssign(pb.createExtract(matchedLines, pb.getInteger(0)), pb.createAnd(match_follow, pb.createOr(lineBreaks, unterminatedLineAtEOF)));
    326327}
    327328
     
    332333,Binding{iBuilder->getStreamSetTy(1), "lineBreaks"}},
    333334// output
    334 {Binding{iBuilder->getStreamSetTy(1), "matchedLines"}}) {
     335{Binding{iBuilder->getStreamSetTy(1), "matchedLines", FixedRate(), Add1()}}) {
    335336
    336337}
  • icGREP/icgrep-devel/icgrep/re/re_compiler.cpp

    r5888 r5890  
    6868    pablo::PabloBuilder mPB(mEntryScope);
    6969    const auto markers = initialCursors ? compile(re, initialCursors, mPB) : compile(re, mPB);
    70     return markerVar(AdvanceMarker(markers, FinalPostPositionUnit, mPB));
     70    return markerVar(markers);
    7171}
    7272
     
    8181    mCompiledName = &nestedMap;
    8282    auto nested = pb.createScope();
    83     MarkerType m1 = process(re, makeMarker(FinalPostPositionUnit, cursors), nested);
     83    MarkerType m1 = process(re, makeMarker(FinalMatchUnit, cursors), nested);
    8484    nested.createAssign(m, markerVar(m1));
    8585    pb.createIf(cursors, nested);
Note: See TracChangeset for help on using the changeset viewer.