CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cpp_parser.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: C++ Parser
4
5Author: Daniel Kroening, kroening@cs.cmu.edu
6
7\*******************************************************************/
8
11
12#ifndef CPROVER_CPP_CPP_PARSER_H
13#define CPROVER_CPP_CPP_PARSER_H
14
15#include <util/parser.h>
16
18
19#include "cpp_parse_tree.h"
20#include "cpp_token_buffer.h"
21
22#include <optional>
23
24class cpp_parsert:public parsert
25{
26public:
28
29 virtual bool parse() override;
30
31 explicit cpp_parsert(message_handlert &message_handler)
32 : parsert(message_handler),
33 mode(configt::ansi_ct::flavourt::ANSI),
35 token_buffer(message_handler),
38 {
39 }
40
41public:
42 // internal state
44
45 // We can furthermore twiddle the recognition of various
46 // keywords. This is honored in particular modes.
48
50
55
61
62 // scanner
65
66protected:
67 std::optional<bool> support_float16;
68};
69
70#endif // CPROVER_CPP_CPP_PARSER_H
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
Globally accessible architectural configuration.
Definition config.h:138
bool asm_block_following
Definition cpp_parser.h:64
cpp_tokent & current_token()
Definition cpp_parser.h:51
cpp_token_buffert token_buffer
Definition cpp_parser.h:49
cpp_parse_treet parse_tree
Definition cpp_parser.h:27
void add_location()
Definition cpp_parser.h:56
std::optional< bool > support_float16
Definition cpp_parser.h:67
virtual bool parse() override
ansi_c_parsert::modet mode
Definition cpp_parser.h:43
bool recognize_wchar_t
Definition cpp_parser.h:47
cpp_parsert(message_handlert &message_handler)
Definition cpp_parser.h:31
unsigned parenthesis_counter
Definition cpp_parser.h:63
cpp_tokent & current_token()
irep_idt filename
Definition cpp_token.h:26
unsigned line_no
Definition cpp_token.h:25
const source_locationt & source_location()
Definition parser.h:111
unsigned get_line_no() const
Definition parser.h:96
C++ Parser.
C++ Parser: Token Buffer.
STL namespace.
Parser utilities.