cprover
Loading...
Searching...
No Matches
mini_c_parser.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: Mini C Parser
4
5Author: Daniel Kroening, dkr@amazon.com
6
7\*******************************************************************/
8
11
12#ifndef CPROVER_CRANGLER_MINI_C_PARSER_H
13#define CPROVER_CRANGLER_MINI_C_PARSER_H
14
15#include <util/optional.h>
16
17#include "ctoken.h"
18
19#include <iosfwd>
20#include <vector>
21
23{
24 // could be C++20 std::span to avoid copying
25 using tokenst = std::vector<ctokent>;
26
31
32 void print(std::ostream &) const;
33 bool is_function() const;
34 bool has_body() const;
36};
37
38using c_translation_unitt = std::vector<c_declarationt>;
39
40c_translation_unitt parse_c(std::istream &);
41
42std::ostream &operator<<(std::ostream &, const c_declarationt &);
43
44#endif // CPROVER_CRANGLER_MINI_C_PARSER_H
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:563
ctoken
c_translation_unitt parse_c(std::istream &)
std::ostream & operator<<(std::ostream &, const c_declarationt &)
std::vector< c_declarationt > c_translation_unitt
bool has_body() const
bool is_function() const
void print(std::ostream &) const
tokenst post_declarator
tokenst initializer
optionalt< ctokent > declared_identifier() const
tokenst pre_declarator
std::vector< ctokent > tokenst