CBMC
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
c
d
e
f
g
j
l
m
r
t
w
Functions
a
c
d
f
g
r
t
w
Typedefs
Enumerations
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
i
k
l
m
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
v
Related Symbols
b
c
d
e
g
i
j
m
n
o
s
t
u
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
w
y
Typedefs
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerations
_
a
b
c
d
f
g
i
l
m
p
r
s
t
u
v
w
Enumerator
_
a
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Macros
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
cscanner.cpp
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module: C Scanner
4
5
Author: Daniel Kroening, dkr@amazon.com
6
7
\*******************************************************************/
8
9
#include "
cscanner.h
"
10
11
cscannert
*
cscanner_ptr
;
12
13
int
yyclex
();
14
int
yyclex_destroy
();
15
void
initialize_yyc_scanner
();
16
17
cscannert::cscannert
(std::istream &
_in
) : in(
_in
)
18
{
19
initialize_yyc_scanner
();
20
}
17
cscannert::cscannert
(std::istream &
_in
) : in(
_in
) {
…
}
21
22
cscannert::~cscannert
()
23
{
24
yyclex_destroy
();
25
}
22
cscannert::~cscannert
() {
…
}
26
27
ctokent
cscannert::operator()
()
28
{
29
cscanner_ptr
=
this
;
30
31
if
(
yyclex
() == 0)
// EOF
32
{
33
token
.
kind
= ctokent::END_OF_FILE;
34
token
.
text
.clear();
35
token
.
line_number
=
line_number
;
36
}
37
38
return
std::move(
token
);
39
}
27
ctokent
cscannert::operator()
() {
…
}
40
41
std::vector<ctokent>
cscannert::get_tokens
()
42
{
43
std::vector<ctokent> result;
44
45
do
46
{
47
result.push_back(this->
operator
()());
48
}
while
(!
is_eof
(result.back()));
49
50
return
result;
51
}
41
std::vector<ctokent>
cscannert::get_tokens
() {
…
}
ait
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition
ai.h:562
cscannert
Definition
cscanner.h:21
cscannert::line_number
std::size_t line_number
Definition
cscanner.h:29
cscannert::~cscannert
~cscannert()
Definition
cscanner.cpp:22
cscannert::get_tokens
std::vector< ctokent > get_tokens()
Definition
cscanner.cpp:41
cscannert::cscannert
cscannert(std::istream &)
Definition
cscanner.cpp:17
cscannert::operator()
ctokent operator()()
Definition
cscanner.cpp:27
cscannert::token
ctokent token
Definition
cscanner.h:43
ctokent
Definition
ctoken.h:19
ctokent::line_number
std::size_t line_number
Definition
ctoken.h:42
ctokent::kind
kindt kind
Definition
ctoken.h:37
ctokent::text
std::string text
Definition
ctoken.h:40
yyclex_destroy
int yyclex_destroy()
yyclex
int yyclex()
cscanner_ptr
cscannert * cscanner_ptr
Definition
cscanner.cpp:11
initialize_yyc_scanner
void initialize_yyc_scanner()
cscanner.h
cscanner
cscanner_ptr
cscannert * cscanner_ptr
Definition
cscanner.cpp:11
is_eof
static bool is_eof(const ctokent &t)
Definition
ctoken.h:88
src
crangler
cscanner.cpp
Generated by
1.9.8