cprover
|
Statement List Language Conversion. More...
#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 <algorithm>
#include <stdexcept>
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 27 of file convert_int_literal.cpp.
#define BASE_16 16u |
Base of hexadecimal integer literals.
Definition at line 29 of file convert_int_literal.cpp.
#define BASE_2 2u |
Base of binary integer literals.
Definition at line 31 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 35 of file convert_int_literal.cpp.
#define PREFIX_SEPARATOR '#' |
Character between a prefix and another prefix or the actual literal.
Definition at line 33 of file convert_int_literal.cpp.
#define STL_INT_MAX_VALUE 32767LL |
Maximum value of integer literals.
Definition at line 23 of file convert_int_literal.cpp.
#define STL_INT_MIN_VALUE -32768LL |
Minimum value of integer literals.
Definition at line 25 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 116 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 133 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 48 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 65 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 82 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 99 of file convert_int_literal.cpp.
|
static |
Definition at line 37 of file convert_int_literal.cpp.