CBMC
cpp_token.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: C++ Parser: Token
4 
5 Author: Daniel Kroening, kroening@cs.cmu.edu
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_CPP_CPP_TOKEN_H
13 #define CPROVER_CPP_CPP_TOKEN_H
14 
15 #include <algorithm>
16 
17 #include <util/expr.h>
18 
20 {
21 public:
22  int kind;
24  std::string text;
25  unsigned line_no;
27 
28  void clear()
29  {
30  kind=0;
31  data.clear();
32  text.clear();
33  line_no=0;
34  filename.clear();
35  }
36 
37  void swap(cpp_tokent &token)
38  {
39  std::swap(kind, token.kind);
40  data.swap(token.data);
41  text.swap(token.text);
42  std::swap(line_no, token.line_no);
43  filename.swap(token.filename);
44  }
45 };
46 
47 #endif // CPROVER_CPP_CPP_TOKEN_H
exprt data
Definition: cpp_token.h:23
int kind
Definition: cpp_token.h:22
void swap(cpp_tokent &token)
Definition: cpp_token.h:37
irep_idt filename
Definition: cpp_token.h:26
void clear()
Definition: cpp_token.h:28
unsigned line_no
Definition: cpp_token.h:25
std::string text
Definition: cpp_token.h:24
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:38
void swap(dstringt &b)
Definition: dstring.h:162
void clear()
Definition: dstring.h:159
Base class for all expressions.
Definition: expr.h:56
void clear()
Definition: irep.h:444
void swap(irept &irep)
Definition: irep.h:434