Ignore:
Timestamp:
Oct 3, 2015, 3:31:16 PM (4 years ago)
Author:
nmedfort
Message:

Added union/diff/intersection functionality to RE_Compiler. Removed toUTF8 pass in favour of using the UCD_Compiler.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/UCD/ucd_compiler.hpp

    r4808 r4814  
    1212namespace cc {
    1313    class CC_Compiler;
     14}
     15
     16namespace re {
     17    class Name;
    1418}
    1519
     
    3842    using TargetVector = std::vector<Target>;
    3943
     44    static const RangeList defaultIfHierachy;
     45    static const RangeList noIfHierachy;
     46
    4047public:
     48
     49    #ifdef USE_BOOST
     50    using NameMap = boost::container::flat_map<re::Name *, PabloAST *>;
     51    #else
     52    using NameMap = std::unordered_map<re::Name *, PabloAST *>;
     53    #endif
     54
    4155    UCDCompiler(cc::CC_Compiler & ccCompiler);
    4256
    43     std::vector<PabloAST *> generateWithDefaultIfHierarchy(const std::vector<UnicodeSet> &sets, PabloBuilder & entry);
     57    void generateWithDefaultIfHierarchy(NameMap & names, PabloBuilder & entry);
    4458
    45     std::vector<PabloAST *> generateWithoutIfHierarchy(const std::vector<UnicodeSet> & sets, PabloBuilder & entry);
     59    void generateWithoutIfHierarchy(NameMap & names, PabloBuilder & entry);
     60
     61    PabloAST * generateWithDefaultIfHierarchy(const UnicodeSet * set, PabloBuilder & entry);
     62
     63    PabloAST * generateWithoutIfHierarchy(const UnicodeSet * set, PabloBuilder & entry);
    4664
    4765protected:
     
    7492    static RangeList innerRanges(const RangeList & list);
    7593
    76     void addTargets(const std::vector<UnicodeSet> & sets);
     94    void addTargets(const NameMap & names);
    7795
    78     std::vector<PabloAST *> returnMarkers(const std::vector<UnicodeSet> &sets) const;
     96    void updateNames(NameMap & names);
    7997
    8098private:
Note: See TracChangeset for help on using the changeset viewer.