|
CBMC
|
#include "convert_int_literal.h"#include "convert_dint_literal.h"#include "statement_list_types.h"#include <util/arith_tools.h>#include <util/bitvector_types.h>#include <stdexcept>
Include dependency graph for convert_int_literal.cpp:Go to the source code of this file.
Macros | |
| #define | STL_INT_MAX_VALUE 32767LL |
| Maximum value of integer literals. More... | |
| #define | STL_INT_MIN_VALUE -32768LL |
| Minimum value of integer literals. More... | |
| #define | BASE_10 10u |
| Base of decimal integer literals. More... | |
| #define | BASE_16 16u |
| Base of hexadecimal integer literals. More... | |
| #define | BASE_2 2u |
| Base of binary integer literals. More... | |
| #define | PREFIX_SEPARATOR '#' |
| Character between a prefix and another prefix or the actual literal. More... | |
| #define | OUT_OF_RANGE_MSG "Int literal out of range" |
| Message for the case of a literal being out of range. More... | |
Functions | |
| static long long | get_literal_value (const std::string &src, unsigned int base) |
| constant_exprt | convert_int_dec_literal (const std::string &src) |
| Converts a string into the corresponding 'Int' or 'DInt' expression. More... | |
| constant_exprt | convert_int_dec_literal_value (const std::string &src) |
| Converts a string into the corresponding 'Int' expression. More... | |
| constant_exprt | convert_int_hex_literal (const std::string &src) |
| Converts a string into the corresponding 'Int' or 'DInt' expression. More... | |
| constant_exprt | convert_int_hex_literal_value (const std::string &src) |
| Converts a string into the corresponding 'Int' expression. More... | |
| constant_exprt | convert_int_bit_literal (const std::string &src) |
| Converts a string into the corresponding 'Int' or 'DInt' expression. More... | |
| constant_exprt | convert_int_bit_literal_value (const std::string &src) |
| Converts a string into the corresponding 'Int' expression. More... | |
Statement List Language Conversion
Definition in file convert_int_literal.cpp.
| #define BASE_10 10u |
Base of decimal integer literals.
Definition at line 26 of file convert_int_literal.cpp.
| #define BASE_16 16u |
Base of hexadecimal integer literals.
Definition at line 28 of file convert_int_literal.cpp.
| #define BASE_2 2u |
Base of binary integer literals.
Definition at line 30 of file convert_int_literal.cpp.
| #define OUT_OF_RANGE_MSG "Int literal out of range" |
Message for the case of a literal being out of range.
Definition at line 34 of file convert_int_literal.cpp.
| #define PREFIX_SEPARATOR '#' |
Character between a prefix and another prefix or the actual literal.
Definition at line 32 of file convert_int_literal.cpp.
| #define STL_INT_MAX_VALUE 32767LL |
Maximum value of integer literals.
Definition at line 22 of file convert_int_literal.cpp.
| #define STL_INT_MIN_VALUE -32768LL |
Minimum value of integer literals.
Definition at line 24 of file convert_int_literal.cpp.
| constant_exprt convert_int_bit_literal | ( | const std::string & | src | ) |
Converts a string into the corresponding 'Int' or 'DInt' expression.
| src | String returned by the parser (base 2). |
Definition at line 115 of file convert_int_literal.cpp.
| constant_exprt convert_int_bit_literal_value | ( | const std::string & | src | ) |
Converts a string into the corresponding 'Int' expression.
| src | String returned by the parser (base 2). |
Definition at line 132 of file convert_int_literal.cpp.
| constant_exprt convert_int_dec_literal | ( | const std::string & | src | ) |
Converts a string into the corresponding 'Int' or 'DInt' expression.
| src | String returned by the parser (base 10). |
Definition at line 47 of file convert_int_literal.cpp.
| constant_exprt convert_int_dec_literal_value | ( | const std::string & | src | ) |
Converts a string into the corresponding 'Int' expression.
| src | String returned by the parser (base 10). |
Definition at line 64 of file convert_int_literal.cpp.
| constant_exprt convert_int_hex_literal | ( | const std::string & | src | ) |
Converts a string into the corresponding 'Int' or 'DInt' expression.
| src | String returned by the parser (base 16). |
Definition at line 81 of file convert_int_literal.cpp.
| constant_exprt convert_int_hex_literal_value | ( | const std::string & | src | ) |
Converts a string into the corresponding 'Int' expression.
| src | String returned by the parser (base 16). |
Definition at line 98 of file convert_int_literal.cpp.
|
static |
Definition at line 36 of file convert_int_literal.cpp.