22 const std::string &src)
26 if(src[0]==
'u' && src[1]==
'8')
28 assert(src[src.size()-1]==
'"');
31 std::basic_string<unsigned int> value=
44 else if(src[0]==
'L' || src[0]==
'u' || src[0]==
'U')
46 assert(src[src.size()-1]==
'"');
54 assert(src[src.size()-1]==
'"');
60 std::basic_string<unsigned int> value;
75 std::basic_string<unsigned int> value;
79 for(std::size_t
i=0;
i<src.size();
i++)
84 if(
ch!=
'L' &&
ch!=
'u' &&
ch!=
'U' &&
ch!=
'"')
89 if((
ch==
'u' ||
ch==
'U') &&
i+1<src.size() && src[
i+1]==
'"')
93 std::size_t
j=src.find(
'"',
i);
97 for(++
j;
j<src.size() && src[
j]!=
'"'; ++
j)
101 INVARIANT(
j < src.size(),
"non-terminated string constant '" + src +
"'");
103 std::string
tmp_src=std::string(src,
i,
j-
i+1);
104 std::basic_string<unsigned int>
tmp_value=
132 result.
operands().resize(value.size());
133 for(std::size_t
i=0;
i<value.size();
i++)
144 for(std::size_t
i=0;
i<value.size();
i++)
unsignedbv_typet char32_t_type()
bitvector_typet wchar_t_type()
bitvector_typet c_index_type()
unsignedbv_typet char16_t_type()
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Base class for all expressions.
typet & type()
Return the type of the expression.
void set(const irep_idt &name, const irep_idt &value)
The type of an expression, extends irept.
const typet & subtype() const
std::basic_string< unsigned int > convert_one_string_literal(const std::string &src)
exprt convert_string_literal(const std::string &src)
C/C++ Language Conversion.
#define CHECK_RETURN(CONDITION)
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
std::basic_string< unsigned int > unescape_wide_string(const std::string &src)
std::string unescape_string(const std::string &src)
ANSI-C Language Conversion.
std::string utf32_native_endian_to_utf8(const std::basic_string< unsigned int > &s)