24 for (
const char *p = token.c_str(); *p != 0; p++)
26 if (*p >=
'0' && *p <=
'7') val = val * 8 + *p -
'0';
34 for (
const char *p = token.c_str(); *p != 0; p++)
36 if (*p >=
'0' && *p <=
'9') val = val * 10 + *p -
'0';
44 for (
const char *p = token.c_str(); *p != 0; p++)
46 if (*p >=
'0' && *p <=
'9') val = val * 16 + *p -
'0';
47 else if (*p >=
'a' && *p <=
'f') val = val * 16 + *p -
'a' + 10;
48 else if (*p >=
'A' && *p <=
'F') val = val * 16 + *p -
'A' + 10;
57 for (
const char *p = token.c_str(); *p != 0; p++)
59 if (*p >=
'0' && *p <=
'1') val = val * 2 + *p -
'0';
92 default: printf(
"Invalid escape sequence %s found!\n",token.c_str());
static CPPValue parseOctal(const std::string &token)
static CPPValue parseDecimal(const std::string &token)
static CPPValue parseHexadecimal(const std::string &token)
static CPPValue parseCharacter(const std::string &token)
static CPPValue parseFloat(const std::string &token)
static CPPValue parseBinary(const std::string &token)