18 #ifndef _DECAF_LANG_CHARACTER_H_
19 #define _DECAF_LANG_CHARACTER_H_
40 static const int MIN_RADIX = 2;
43 static const int MAX_RADIX = 36;
46 static const char MIN_VALUE = (char)0x7F;
49 static const char MAX_VALUE = (char)0x80;
52 static const int SIZE = 8;
70 return this->value < c.value ? -1 : (this->value > c.value) ? 1 : 0;
79 return this->value == c.value;
89 return this->value < c.value;
101 return this->value < c ? -1 : (this->value > c) ? 1 : 0;
110 return this->value == c;
120 return this->value < c;
127 return this->value == c.value;
134 return this->value == c;
140 std::string toString()
const;
147 return (
double)this->value;
155 return (
float)this->value;
163 return (
unsigned char)this->value;
171 return (
short)this->value;
179 return (
int)this->value;
187 return (
long long)this->value;
224 return c >=
'0' && c <=
'9';
232 return c >=
'a' && c <=
'z';
240 return c >=
'A' && c <=
'Z';
248 return isUpperCase(c) || isLowerCase(c);
256 return isLetter(c) || isDigit(c);
266 return ( c >= 0 && c <= 0x1f ) ||
267 ( (
unsigned char)c >= 0x7f && (
unsigned char)c <= 0x9f );
292 static int digit(
char c,
int radix);
305 if (
'A' <= value && value <=
'Z') {
306 return (
char) (value + (
'a' -
'A'));
323 if (
'a' <= value && value <=
'z') {
324 return (
char) (value - (
'a' -
'A'));