Ignore:
Timestamp:
Jul 10, 2015, 4:51:39 PM (4 years ago)
Author:
nmedfort
Message:

Initial introduction of a PabloFunction? type.

File:
1 edited

Legend:

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

    r4650 r4657  
    2121#include <cc/cc_namemap.hpp>
    2222#include <pablo/codegenstate.h>
     23#include <pablo/function.h>
    2324#include <resolve_properties.h>
    2425#include <assert.h>
     
    175176}
    176177
    177 void RE_Compiler::finalizeMatchResult(MarkerType match_result) {
     178void RE_Compiler::finalizeMatchResult(PabloFunction & function, MarkerType match_result) {
    178179    //These three lines are specifically for grep.
    179180    PabloAST * lb = UNICODE_LINE_BREAK ? mUnicodeLineBreak : mLineFeed;
    180     PabloAST * v = markerVar(match_result);
    181     mPB.createAssign("matches", mPB.createAnd(mPB.createMatchStar(v, mPB.createNot(lb)), lb), 0);
    182     mPB.createAssign("lf", mPB.createAnd(lb, mPB.createNot(mCRLF)), 1);
     181    PabloAST * v = markerVar(match_result);   
     182    function.addResult(mPB.createAssign("matches", mPB.createAnd(mPB.createMatchStar(v, mPB.createNot(lb)), lb)));
     183    function.addResult(mPB.createAssign("lf", mPB.createAnd(lb, mPB.createNot(mCRLF))));
    183184}
    184185
Note: See TracChangeset for help on using the changeset viewer.