Changeset 5747 for icGREP


Ignore:
Timestamp:
Nov 27, 2017, 2:29:22 PM (14 months ago)
Author:
cameron
Message:

Represent the Any symbol as a Name

Location:
icGREP/icgrep-devel/icgrep
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/UCD/resolve_properties.cpp

    r5691 r5747  
    100100        const std::string value = property->getName();
    101101        // Try special cases of Unicode TR #18
    102         if (value == "any") {
    103             property->setDefinition(makeAny());
     102        if ((value == "any") || (value == ".")) {
     103            property->setDefinition(makeCC(0, 0x10FFFF));
    104104            return true;
    105105        } else if (value == "ascii") {
     
    199199            // Now compatibility properties of UTR #18 Annex C
    200200                   
     201            else if (value == ".") return UnicodeSet(0, 0x10FFFF);
    201202            else if (value == "alnum") {
    202203                Name * digit = makeName("nd", Name::Type::UnicodeProperty);
  • icGREP/icgrep-devel/icgrep/re/re_any.h

    r5728 r5747  
    1010#include "re_re.h"
    1111#include "re_cc.h"
     12#include "re_name.h"
    1213#include <UCD/unicode_set.h>
    1314#include <llvm/Support/Casting.h>
     
    2829};
    2930
    30 inline CC * makeAny() {
    31     return makeCC(0, UCD::UNICODE_MAX);
     31inline RE * makeAny() {
     32    return makeName(".", Name::Type::UnicodeProperty);
    3233}
    3334
Note: See TracChangeset for help on using the changeset viewer.