Ignore:
Timestamp:
Oct 18, 2017, 9:35:52 AM (21 months ago)
Author:
cameron
Message:

Update scanmatch callback protocol to use line start/end pointers; add finalize callback for buffer end

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/toolchain/grep_pipeline.h

    r5679 r5694  
    1717public:
    1818    MatchAccumulator() {};
    19     virtual void accumulate_match(const size_t lineNum, size_t line_start, size_t line_end) = 0;
     19    virtual void accumulate_match(const size_t lineNum, char * line_start, char * line_end) = 0;
     20    virtual void finalize_match(char * buffer_end) {}  // default: no op
    2021};
    2122
    22 void accumulate_match_wrapper(intptr_t accum_addr, const size_t lineNum, size_t line_start, size_t line_end);
     23void accumulate_match_wrapper(intptr_t accum_addr, const size_t lineNum, char * line_start, char * line_end);
    2324   
    2425void grepBuffer(re::RE * pattern, const char * buffer, size_t bufferLength, MatchAccumulator * accum);
Note: See TracChangeset for help on using the changeset viewer.