src
Main Page
Namespaces
Classes
Files
File List
File Members
codegen
label.cc
Go to the documentation of this file.
1
#include <ostream>
2
3
#include "
src/codegen/label.h
"
4
5
namespace
re2c
{
6
7
const
uint32_t label_t::FIRST = 0;
8
9
label_t::label_t ()
10
: value (FIRST)
11
{}
12
13
void
label_t::inc ()
14
{
15
++value;
16
}
17
18
label_t
label_t::first
()
19
{
20
return
label_t
();
21
}
22
23
bool
label_t::operator <
(
const
label_t
& l)
const
24
{
25
return
value < l.value;
26
}
27
28
uint32_t
label_t::width
()
const
29
{
30
uint32_t v = value;
31
uint32_t n = 0;
32
while
(v /= 10) ++n;
33
return
n;
34
}
35
36
std::ostream &
operator <<
(std::ostream & o,
label_t
l)
37
{
38
o << l.value;
39
return
o;
40
}
41
42
}
// namespace re2c
re2c::label_t::width
uint32_t width() const
Definition:
label.cc:28
re2c::label_t
Definition:
label.h:21
re2c::label_t::operator<
bool operator<(const label_t &l) const
Definition:
label.cc:23
re2c::label_t::first
static label_t first()
Definition:
label.cc:18
re2c::operator<<
std::ostream & operator<<(std::ostream &o, label_t l)
Definition:
label.cc:36
label.h
re2c
Definition:
bitmap.cc:10
Generated by
1.8.10