CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cscanner.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: C Scanner
4
5Author: Daniel Kroening, dkr@amazon.com
6
7\*******************************************************************/
8
11
12#ifndef CPROVER_CRANGLER_CSCANNER_H
13#define CPROVER_CRANGLER_CSCANNER_H
14
15#include <iosfwd>
16#include <vector>
17
18#include "ctoken.h"
19
21{
22public:
23 explicit cscannert(std::istream &);
24 ~cscannert();
25
27
28 std::istream &in;
29 std::size_t line_number = 1;
30
32
33 void set_token(std::string text, ctokent::kindt kind)
34 {
36 token.text = std::move(text);
37 token.kind = kind;
38 }
39
40 std::vector<ctokent> get_tokens();
41
42protected:
44};
45
47
48#endif // CPROVER_CRANGLER_CSCANNER_H
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
std::size_t line_number
Definition cscanner.h:29
void set_token(std::string text, ctokent::kindt kind)
Definition cscanner.h:33
std::istream & in
Definition cscanner.h:28
bool return_WS_and_comments
Definition cscanner.h:31
std::vector< ctokent > get_tokens()
Definition cscanner.cpp:41
ctokent operator()()
Definition cscanner.cpp:27
ctokent token
Definition cscanner.h:43
std::size_t line_number
Definition ctoken.h:42
kindt kind
Definition ctoken.h:37
std::string text
Definition ctoken.h:40
cscannert * cscanner_ptr
Definition cscanner.cpp:11
ctoken