cprover
Loading...
Searching...
No Matches
format_strings.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: Format String Parser
4
5Author: CM Wintersteiger
6
7\*******************************************************************/
8
11
12#ifndef CPROVER_GOTO_PROGRAMS_FORMAT_STRINGS_H
13#define CPROVER_GOTO_PROGRAMS_FORMAT_STRINGS_H
14
15#include <string>
16#include <list>
17
18#include <util/irep.h>
19#include <util/mp_arith.h>
20#include <util/optional.h>
21
22class typet;
23
25{
26public:
27 enum class token_typet
28 {
29 UNKNOWN,
30 TEXT,
31 INT, // d, i, o, u, x
32 FLOAT, // a, e, f, g
33 CHAR, // c
34 STRING, // s
35 POINTER // p
36 };
37
38 enum class flag_typet
39 {
44 SIGN,
46 };
47
49 {
51 LEN_h,
52 LEN_hh,
53 LEN_l,
54 LEN_ll,
55 LEN_L,
56 LEN_j,
57 LEN_t
58 };
59
68
79
80
82 std::list<flag_typet> flags;
87 irep_idt value; // for text and pattern matching
88};
89
90typedef std::list<format_tokent> format_token_listt;
91
92format_token_listt parse_format_string(const std::string &);
93
95
96#endif // CPROVER_GOTO_PROGRAMS_FORMAT_STRINGS_H
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition dstring.h:39
mp_integer precision
token_typet type
mp_integer field_width
representationt representation
length_modifierst length_modifier
format_tokent(token_typet _type)
std::list< flag_typet > flags
The type of an expression, extends irept.
Definition type.h:29
format_token_listt parse_format_string(const std::string &)
optionalt< typet > get_type(const format_tokent &)
std::list< format_tokent > format_token_listt
nonstd::optional< T > optionalt
Definition optional.h:35
BigInt mp_integer
Definition smt_terms.h:18