Ignore:
Timestamp:
Oct 4, 2015, 4:59:28 PM (4 years ago)
Author:
nmedfort
Message:

First stage of CC_NameMap removal

File:
1 edited

Legend:

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

    r4809 r4819  
    1616#include <memory>
    1717#include <map>
    18 
     18#include <re/re_memoizer.hpp>
    1919
    2020namespace re {
     
    4343private:
    4444
    45     using NameMap = std::map<std::pair<std::string, std::string>, re::Name *>;
     45    using NameMap = std::map<std::pair<std::string, std::string>, re::RE *>;
    4646
    47     typedef std::string::const_iterator cursor_t;
     47    using cursor_t = std::string::const_iterator;
    4848
    4949    RE_Parser(const std::string & regular_expression);
     
    7373    codepoint_t parse_utf8_codepoint();
    7474
    75     Name * parsePropertyExpression();
     75    RE * parsePropertyExpression();
    7676
    77     CC * parseNamePatternExpression();
     77    RE * parseNamePatternExpression();
    7878
    7979    RE * makeComplement(RE * s);
    8080    RE * makeWordBoundary();
    8181    RE * makeWordNonBoundary();
    82     Name * makeDigitSet();
    83     Name * makeAlphaNumeric();
    84     Name * makeWhitespaceSet();
    85     Name * makeWordSet();
     82    RE * makeDigitSet();
     83    RE * makeAlphaNumeric();
     84    RE * makeWhitespaceSet();
     85    RE * makeWordSet();
    8686
    87     Name * createName(const std::string value);
    88     Name * createName(const std::string prop, const std::string value);
     87    RE * createName(const std::string value);
     88    RE * createName(const std::string prop, const std::string value);
    8989
    9090    CharsetOperatorKind getCharsetOperator();
     
    103103
    104104    // CC insertion dependent on case-insensitive flag.
    105     CC * build_CC(codepoint_t cp);
    106 
    107     void CC_add_codepoint(CC * cc, codepoint_t cp);
    108 
    109     void CC_add_range(CC * cc, codepoint_t lo, codepoint_t hi);
     105    Name * createCC(const codepoint_t cp);
     106    void insert(CC * cc, const codepoint_t cp);
     107    void insert_range(CC * cc, const codepoint_t lo, const codepoint_t hi);
    110108
    111109    static std::string canonicalize(const cursor_t begin, const cursor_t end);
     
    118116    bool                        fNested;
    119117    NameMap                     mNameMap;
     118    Memoizer                    mMemoizer;
    120119};
    121120
Note: See TracChangeset for help on using the changeset viewer.