Ignore:
Timestamp:
Dec 30, 2017, 4:43:19 PM (13 months ago)
Author:
cameron
Message:

Parsing of byte CCs

File:
1 edited

Legend:

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

    r5805 r5814  
    348348    else if (atany("xo0")) {
    349349        codepoint_t cp = parse_escaped_codepoint();
    350         if ((cp >= 0x80) && (cp <= 0xFF)) {
     350        if ((cp <= 0xFF)) {
    351351            return makeByte(cp);
    352352        }
     
    715715RE * RE_Parser::parse_escaped_char_item() {
    716716    if (accept('N')) return parseNamePatternExpression();
     717    else if (atany("xo0")) {
     718        codepoint_t cp = parse_escaped_codepoint();
     719        if ((cp <= 0xFF)) {
     720            return makeByte(cp);
     721        }
     722        else return createCC(cp);
     723    }
    717724    else return makeCC(parse_escaped_codepoint());
    718725}
     
    811818}
    812819
    813 Name * RE_Parser::createCC(const codepoint_t cp) {
    814     CC * cc = makeCC(cp);
    815     return mMemoizer.memoize(cc);
    816 }
    817 
    818 void RE_Parser::insert(CC * cc, const codepoint_t cp) {
    819     cc->insert(cp);
    820 }
    821 
    822 void RE_Parser::insert_range(CC * cc, const codepoint_t lo, const codepoint_t hi) {
    823     cc->insert_range(lo, hi);
     820CC * RE_Parser::createCC(const codepoint_t cp) {
     821    CC * cc = mMemoizer.memoize(makeCC(cp));
     822    return cc;
    824823}
    825824
     
    828827}
    829828
    830            
    831 
    832                            
    833829RE * RE_Parser::makeWordBoundary() {
    834830    Name * wordC = makeWordSet();
Note: See TracChangeset for help on using the changeset viewer.