1 #ifndef _RE2C_IR_REGEXP_ENCODING_ENC_
2 #define _RE2C_IR_REGEXP_ENCODING_ENC_
59 static const uint32_t asc2ebc[256];
60 static const uint32_t ebc2asc[256];
61 static const uint32_t SURR_MIN;
62 static const uint32_t SURR_MAX;
63 static const uint32_t UNICODE_ERROR;
89 bool encode(uint32_t & c)
const;
99 case ASCII:
return "ASCII";
100 case EBCDIC:
return "EBCDIC";
101 case UTF8:
return "UTF8";
102 case UCS2:
return "USC2";
103 case UTF16:
return "UTF16";
104 case UTF32:
return "UTF32";
105 default:
return "<bad encoding>";
114 case EBCDIC:
return 0x100;
115 case UCS2:
return 0x10000;
119 default:
return 0x110000;
129 case UTF8:
return 0x100;
131 case UTF16:
return 0x10000;
133 default:
return 0x110000;
160 case UTF16:
return 2;
170 else if (type_ !=
ASCII)
197 #endif // _RE2C_IR_REGEXP_ENCODING_ENC_
Range * encodeRange(uint32_t l, uint32_t h) const
Range * fullRange() const
static const char * name(type_t t)
bool encode(uint32_t &c) const
uint32_t szCodeUnit() const
bool operator!=(const Enc &e) const
uint32_t nCodePoints() const
uint32_t nCodeUnits() const
uint32_t szCodePoint() const
uint32_t decodeUnsafe(uint32_t c) const
void setPolicy(policy_t t)