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
19
class
cpp_tokent
20
{
21
public
:
22
int
kind
;
23
exprt
data
;
24
std::string
text
;
25
unsigned
line_no
;
26
irep_idt
filename
;
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
cpp_tokent
Definition:
cpp_token.h:20
cpp_tokent::data
exprt data
Definition:
cpp_token.h:23
cpp_tokent::kind
int kind
Definition:
cpp_token.h:22
cpp_tokent::swap
void swap(cpp_tokent &token)
Definition:
cpp_token.h:37
cpp_tokent::filename
irep_idt filename
Definition:
cpp_token.h:26
cpp_tokent::clear
void clear()
Definition:
cpp_token.h:28
cpp_tokent::line_no
unsigned line_no
Definition:
cpp_token.h:25
cpp_tokent::text
std::string text
Definition:
cpp_token.h:24
dstringt
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition:
dstring.h:38
dstringt::swap
void swap(dstringt &b)
Definition:
dstring.h:162
dstringt::clear
void clear()
Definition:
dstring.h:159
exprt
Base class for all expressions.
Definition:
expr.h:56
irept::clear
void clear()
Definition:
irep.h:444
irept::swap
void swap(irept &irep)
Definition:
irep.h:434
expr.h
src
cpp
cpp_token.h
Generated by
1.9.1