Ignore:
Timestamp:
Jul 9, 2017, 6:32:44 PM (21 months ago)
Author:
cameron
Message:

Unix lines mode and support for 'Byte' character classes

File:
1 edited

Legend:

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

    r5267 r5558  
    4646    friend Name * makeZeroWidth(const std::string & name, RE * zerowidth);
    4747    friend Name * makeName(CC * const cc);
     48    friend Name * makeByte(CC * const cc);
    4849    friend Name * makeName(const std::string &, Type);
    4950    friend Name * makeName(const std::string &, const std::string &, Type);
     
    161162}
    162163
    163 inline Name * makeCapture(const std::string & name, RE * captured) {
     164inline Name * makeByte(CC * const cc) {
     165    assert(cc->max_codepoint() <= 0xFF);
     166    const std::string name = cc->canonicalName(CC_type::ByteClass);
     167    return new Name(nullptr, 0, name.c_str(), name.length(), Name::Type::Byte, cc);
     168}
     169   
     170    inline Name * makeCapture(const std::string & name, RE * captured) {
    164171    return new Name(nullptr, 0, name.c_str(), name.length(), Name::Type::Capture, captured);
    165172}
Note: See TracChangeset for help on using the changeset viewer.