Ignore:
Timestamp:
Oct 4, 2014, 1:14:35 PM (5 years ago)
Author:
nmedfort
Message:

First stage of code generator revamp

File:
1 edited

Legend:

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

    r4207 r4210  
    1010#include <pablo/codegenstate.h>
    1111#include <re/re_re.h>
    12 #include <re/symbol_generator.h>
    1312
    1413#include <string>
     
    1918class RE_Compiler {
    2019public:
    21     RE_Compiler(std::map<std::string, std::string> name_map);
    22     pablo::CodeGenState compile(RE *re);
    23     pablo::CodeGenState compile_subexpressions(const std::map<std::string, RE*>& re_map);
     20
     21    RE_Compiler(pablo::CodeGenState & baseCG, std::map<std::string, std::string> name_map);
     22
     23    void compile(RE * re);
     24
    2425private:
    25     void compile(RE * re, pablo::CodeGenState & cg_state);
    26     void compile(Alt * alt, pablo::CodeGenState & cg_state);
    27     void compile(Seq * seq, pablo::CodeGenState & cg_state);
    28     void compile(Rep * rep, pablo::CodeGenState & cg_state);
    29     void compileUnboundedRep(RE * repeated, int lb, pablo::CodeGenState & cg_state);
    30     void compileBoundedRep(RE * repeated, int lb, int ub, pablo::CodeGenState &cg_state);
    31     void compile(Name * name, pablo::CodeGenState & cg_state);
     26    void process(RE * re, pablo::CodeGenState & cg_state);
     27    void process(Alt * alt, pablo::CodeGenState & cg_state);
     28    void process(Seq * seq, pablo::CodeGenState & cg_state);
     29    void process(Rep * rep, pablo::CodeGenState & cg_state);
     30    void processUnboundedRep(RE * repeated, int lb, pablo::CodeGenState & cg_state);
     31    void processBoundedRep(RE * repeated, int lb, int ub, pablo::CodeGenState & cg_state);
     32    void process(Name * name, pablo::CodeGenState & cg_state);
    3233
    3334    static bool hasUnicode(const RE *re);
    3435
    35     SymbolGenerator symgen;
    36     std::map<std::string, std::string> m_name_map;
     36    pablo::CodeGenState &               mBaseCG;
     37    std::map<std::string, std::string>  m_name_map;
    3738};
    3839
Note: See TracChangeset for help on using the changeset viewer.