Ignore:
Timestamp:
Mar 10, 2018, 6:16:17 PM (14 months ago)
Author:
cameron
Message:

Fixes for Unix line break mode

File:
1 edited

Legend:

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

    r5897 r5899  
    130130            nextPos = pb.createAdvance(nextPos, 1);
    131131        }
    132         return makeMarker(FinalMatchUnit, pb.createAnd(nextPos, mCCCompiler.compileCC(cc, pb)));
     132        return makeMarker(FinalMatchUnit, pb.createAnd(nextPos, pb.createInFile(mCCCompiler.compileCC(cc, pb))));
    133133    } else if (a == &cc::Unicode) {
    134134        MarkerType m = compile(toUTF8(cc), pb);
     
    266266        }
    267267        else UnsupportedRE("Unsupported boundary assertion");
     268    } else if (isByteLength(asserted)) {
     269        MarkerType lookahead = compile(asserted, pb);
     270        if (LLVM_LIKELY(markerPos(lookahead) == FinalMatchUnit)) {
     271            PabloAST * la = markerVar(lookahead);
     272            if (a->getSense() == Assertion::Sense::Negative) {
     273                la = pb.createNot(la);
     274            }
     275            MarkerType fbyte = AdvanceMarker(marker, InitialPostPositionUnit, pb);
     276            return makeMarker(InitialPostPositionUnit, pb.createAnd(markerVar(fbyte), la, "lookahead"));
     277        }
    268278    } else if (isUnicodeUnitLength(asserted)) {
    269279        MarkerType lookahead = compile(asserted, pb);
Note: See TracChangeset for help on using the changeset viewer.