Ignore:
Timestamp:
Jun 29, 2015, 1:46:55 PM (4 years ago)
Author:
nmedfort
Message:

Preliminary changes to inclusion of UCD Compiler into the RE Compiler.

File:
1 edited

Legend:

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

    r4609 r4622  
    1111#include <re/re_seq.h>
    1212#include <cc/cc_compiler.h>
    13 
     13#include <pablo/builder.hpp>
    1414#include <string>
    1515#include <list>
     
    1818namespace cc {
    1919class CC_NameMap;
    20 }
    21 
    22 namespace pablo {
    23 class PabloBlock;
    24 class PabloAST;
    25 class Assign;
    26 class Var;
    2720}
    2821
     
    5851public:
    5952
    60     RE_Compiler(pablo::PabloBlock & baseCG);
    61     void initializeRequiredStreams(cc::CC_Compiler & ccc);
     53    RE_Compiler(cc::CC_Compiler & ccCompiler);
     54    void initializeRequiredStreams();
    6255    void finalizeMatchResult(MarkerType match_result);
    6356    MarkerType compile(RE * re) {
     
    6760private:
    6861
    69     MarkerType compile(RE * re, pablo::PabloBlock & cg);
    70     MarkerType AdvanceMarker(MarkerType m, MarkerPosition newpos, pablo::PabloBlock & pb);
     62    MarkerType compile(RE * re, pablo::PabloBuilder & cg);
     63    MarkerType AdvanceMarker(MarkerType m, MarkerPosition newpos, pablo::PabloBuilder & pb);
    7164   
    72     void AlignMarkers(MarkerType & m1, MarkerType & m2, pablo::PabloBlock & pb);
     65    void AlignMarkers(MarkerType & m1, MarkerType & m2, pablo::PabloBuilder & pb);
    7366   
    74     pablo::PabloAST * getNamedCharacterClassStream(Name * name);
    75     pablo::PabloAST * nextUnicodePosition(MarkerType m, pablo::PabloBlock & pb);
    76     MarkerType process(RE * re, MarkerType marker, pablo::PabloBlock & pb);
    77     MarkerType process(Name * name, MarkerType marker, pablo::PabloBlock & pb);
    78     MarkerType process(Seq * seq, MarkerType marker, pablo::PabloBlock & pb);
    79     MarkerType processSeqTail(Seq::iterator current, Seq::iterator end, int matchLenSoFar, MarkerType marker, pablo::PabloBlock & pb);
    80     MarkerType process(Alt * alt, MarkerType marker, pablo::PabloBlock & pb);
    81     MarkerType process(Assertion * a, MarkerType marker, pablo::PabloBlock & pb);
    82     MarkerType process(Rep * rep, MarkerType marker, pablo::PabloBlock & pb);
    83     MarkerType process(Diff * diff, MarkerType marker, pablo::PabloBlock & cg);
    84     MarkerType process(Intersect * x, MarkerType marker, pablo::PabloBlock & cg);
    85     pablo::PabloAST *consecutive1(pablo::PabloAST *repeated,  int repeated_lgth, int repeat_count, pablo::PabloBlock & pb);
    86     pablo::PabloAST * reachable(pablo::PabloAST * repeated,  int repeated_lgth, int repeat_count, pablo::PabloBlock & pb);
     67    pablo::PabloAST * getNamedCharacterClassStream(Name * name, pablo::PabloBuilder & pb);
     68    pablo::PabloAST * nextUnicodePosition(MarkerType m, pablo::PabloBuilder & pb);
     69    MarkerType process(RE * re, MarkerType marker, pablo::PabloBuilder & pb);
     70    MarkerType process(Name * name, MarkerType marker, pablo::PabloBuilder & pb);
     71    MarkerType process(Seq * seq, MarkerType marker, pablo::PabloBuilder & pb);
     72    MarkerType processSeqTail(Seq::iterator current, Seq::iterator end, int matchLenSoFar, MarkerType marker, pablo::PabloBuilder & pb);
     73    MarkerType process(Alt * alt, MarkerType marker, pablo::PabloBuilder & pb);
     74    MarkerType process(Assertion * a, MarkerType marker, pablo::PabloBuilder & pb);
     75    MarkerType process(Rep * rep, MarkerType marker, pablo::PabloBuilder & pb);
     76    MarkerType process(Diff * diff, MarkerType marker, pablo::PabloBuilder & cg);
     77    MarkerType process(Intersect * x, MarkerType marker, pablo::PabloBuilder & cg);
     78    pablo::PabloAST *consecutive1(pablo::PabloAST *repeated,  int repeated_lgth, int repeat_count, pablo::PabloBuilder & pb);
     79    pablo::PabloAST * reachable(pablo::PabloAST * repeated,  int repeated_lgth, int repeat_count, pablo::PabloBuilder & pb);
    8780    static bool isFixedLength(RE * regexp);
    88     MarkerType processLowerBound(RE * repeated,  int lb, MarkerType marker, pablo::PabloBlock & pb);
    89     MarkerType processUnboundedRep(RE * repeated, MarkerType marker, pablo::PabloBlock & pb);
    90     MarkerType processBoundedRep(RE * repeated, int ub, MarkerType marker, pablo::PabloBlock & pb);
     81    MarkerType processLowerBound(RE * repeated,  int lb, MarkerType marker, pablo::PabloBuilder & pb);
     82    MarkerType processUnboundedRep(RE * repeated, MarkerType marker, pablo::PabloBuilder & pb);
     83    MarkerType processBoundedRep(RE * repeated, int ub, MarkerType marker, pablo::PabloBuilder & pb);
    9184
    92     pablo::PabloBlock &                             mPB;
     85private:
     86
     87    cc::CC_Compiler &                               mCCCompiler;
     88    pablo::PabloBuilder                             mPB;
    9389    pablo::Assign *                                 mLineFeed;
    9490    pablo::PabloAST *                               mCRLF;
Note: See TracChangeset for help on using the changeset viewer.