Changeset 5896 for icGREP


Ignore:
Timestamp:
Mar 9, 2018, 2:59:59 PM (10 months ago)
Author:
cameron
Message:

Start-of-text and End-of-text boundary assertions

Location:
icGREP/icgrep-devel/icgrep/re
Files:
3 edited

Legend:

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

    r5881 r5896  
    139139   
    140140    // Break at the start and end of text.
    141     RE * GCB_1 = makeStart();
    142     RE * GCB_2 = makeEnd();
     141    RE * GCB_1 = makeSOT();
     142    RE * GCB_2 = makeEOT();
    143143    // Do not break between a CR and LF.
    144144    RE * GCB_3 = makeSeq({Behind(GCB_CR), Ahead(GCB_LF)});
  • icGREP/icgrep-devel/icgrep/re/re_assertion.cpp

    r5725 r5896  
    66
    77#include "re_assertion.h"
     8#include "re_cc.h"
    89#include "re_seq.h"
    910#include "re_alt.h"
     
    1314
    1415namespace re {
     16   
     17RE * makeSOT () {
     18    return makeNegativeLookBehindAssertion(makeByte(0x00,0xFF));
     19}
     20
     21RE * makeEOT () {
     22    return makeNegativeLookAheadAssertion(makeByte(0x00,0xFF));
     23}
    1524
    1625RE * expandBoundaryAssertion (RE * re) {
  • icGREP/icgrep-devel/icgrep/re/re_assertion.h

    r5806 r5896  
    9090}
    9191
     92// Start-of-text boundary assertion.
     93RE * makeSOT();
     94   
     95// End-of-text boundary assertion.
     96RE * makeEOT();
     97   
    9298RE * expandBoundaryAssertion(RE * r);
    9399}
Note: See TracChangeset for help on using the changeset viewer.