cprover
|
#include "format_strings.h"
#include <util/std_types.h>
#include <util/std_expr.h>
#include <util/c_types.h>
#include <cctype>
Go to the source code of this file.
Functions | |
void | parse_flags (std::string::const_iterator &it, format_tokent &curtok) |
void | parse_field_width (std::string::const_iterator &it, format_tokent &curtok) |
void | parse_precision (std::string::const_iterator &it, format_tokent &curtok) |
void | parse_length_modifier (std::string::const_iterator &it, format_tokent &curtok) |
void | parse_conversion_specifier (const std::string &arg_string, std::string::const_iterator &it, format_tokent &curtok) |
format_token_listt | parse_format_string (const std::string &arg_string) |
typet | get_type (const format_tokent &token) |
Format String Parser.
Definition in file format_strings.cpp.
typet get_type | ( | const format_tokent & | token | ) |
Definition at line 221 of file format_strings.cpp.
References format_tokent::CHAR, char_type(), double_type(), format_tokent::FLOAT, float_type(), format_tokent::INT, format_tokent::LEN_h, format_tokent::LEN_hh, format_tokent::LEN_l, format_tokent::LEN_L, format_tokent::LEN_ll, format_tokent::length_modifier, long_double_type(), format_tokent::POINTER, pointer_type(), format_tokent::representation, signed_char_type(), format_tokent::SIGNED_DEC, signed_int_type(), signed_long_int_type(), signed_long_long_int_type(), signed_short_int_type(), format_tokent::STRING, format_tokent::type, unsigned_char_type(), unsigned_int_type(), unsigned_long_int_type(), unsigned_long_long_int_type(), unsigned_short_int_type(), void_type(), and wchar_t_type().
Referenced by create_vtable_pointer(), create_vtable_symbol(), goto_convertt::do_scanf(), java_bytecode_vtable_factoryt::get_vt_type_symbol(), has_vtable_info(), java_bytecode_vtable_factoryt::is_class_with_vt(), make_vtable_function(), and java_bytecode_vtable_factoryt::set_vtable_value().
void parse_conversion_specifier | ( | const std::string & | arg_string, |
std::string::const_iterator & | it, | ||
format_tokent & | curtok | ||
) |
Definition at line 118 of file format_strings.cpp.
References format_tokent::CHAR, format_tokent::FLOAT, format_tokent::INT, format_tokent::POINTER, format_tokent::representation, format_tokent::SIGNED_DEC, format_tokent::STRING, format_tokent::TEXT, format_tokent::type, format_tokent::UNSIGNED_DEC, format_tokent::UNSIGNED_HEX, format_tokent::UNSIGNED_OCT, and format_tokent::value.
Referenced by parse_format_string().
void parse_field_width | ( | std::string::const_iterator & | it, |
format_tokent & | curtok | ||
) |
Definition at line 46 of file format_strings.cpp.
References format_tokent::ASTERISK, format_tokent::field_width, format_tokent::flags, and string2integer().
Referenced by parse_format_string().
void parse_flags | ( | std::string::const_iterator & | it, |
format_tokent & | curtok | ||
) |
Definition at line 21 of file format_strings.cpp.
References format_tokent::ALTERNATE, format_tokent::flags, format_tokent::LEFT_ADJUST, format_tokent::SIGN, format_tokent::SIGNED_SPACE, and format_tokent::ZERO_PAD.
Referenced by parse_format_string().
format_token_listt parse_format_string | ( | const std::string & | arg_string | ) |
Definition at line 183 of file format_strings.cpp.
References parse_conversion_specifier(), parse_field_width(), parse_flags(), parse_length_modifier(), parse_precision(), and format_tokent::TEXT.
Referenced by string_instrumentationt::do_format_string_read(), string_instrumentationt::do_format_string_write(), and goto_convertt::do_scanf().
void parse_length_modifier | ( | std::string::const_iterator & | it, |
format_tokent & | curtok | ||
) |
Definition at line 83 of file format_strings.cpp.
References format_tokent::LEN_h, format_tokent::LEN_j, format_tokent::LEN_l, format_tokent::LEN_L, and format_tokent::length_modifier.
Referenced by parse_format_string().
void parse_precision | ( | std::string::const_iterator & | it, |
format_tokent & | curtok | ||
) |
Definition at line 61 of file format_strings.cpp.
References format_tokent::ASTERISK, format_tokent::flags, format_tokent::precision, and string2integer().
Referenced by parse_format_string().