#include <bitmap.h>
Definition at line 16 of file bitmap.h.
re2c::BitMap::BitMap |
( |
const Go * |
g, |
|
|
const State * |
x |
|
) |
| |
re2c::BitMap::~BitMap |
( |
| ) |
|
const BitMap * re2c::BitMap::find |
( |
const Go * |
g, |
|
|
const State * |
x |
|
) |
| |
|
static |
Definition at line 30 of file bitmap.cc.
34 if (
matches(b->go->span, b->go->nSpans, b->on, g->span, g->nSpans, x))
BitMap(const Go *, const State *)
bool matches(const Span *b1, uint32_t n1, const State *s1, const Span *b2, uint32_t n2, const State *s2)
Definition at line 43 of file bitmap.cc.
BitMap(const Go *, const State *)
re2c::BitMap::FORBID_COPY |
( |
BitMap |
| ) |
|
void re2c::BitMap::gen |
( |
OutputFile & |
o, |
|
|
uint32_t |
ind, |
|
|
uint32_t |
lb, |
|
|
uint32_t |
ub |
|
) |
| |
|
static |
Definition at line 75 of file bitmap.cc.
79 o.wind(ind).ws(
"static const unsigned char ").wstring(
opts->
yybm).ws(
"[] = {");
81 uint32_t c = 1, n = ub - lb;
84 while((cb = cb->next) != NULL) {
89 uint32_t *bm =
new uint32_t[n];
91 for (uint32_t
i = 0, t = 1; b;
i += n, t += 8)
93 memset(bm, 0, n *
sizeof(uint32_t));
95 for (uint32_t
m = 0x80; b &&
m; m >>= 1)
99 doGen(b->go, b->on, bm, lb, m);
100 b =
const_cast<BitMap*
>(b->next);
105 o.ws(
"\n").wind(ind+1).ws(
"/* table ").wu32(t).ws(
" .. ").wu32(std::min(c, t+7)).ws(
": ").wu32(
i).ws(
" */");
108 for (uint32_t j = 0; j < n; ++j)
112 o.ws(
"\n").wind(ind+1);
121 o.wu32_width(bm[j], 3);
127 o.ws(
"\n").wind(ind).ws(
"};\n");
BitMap(const Go *, const State *)
static void doGen(const Go *g, const State *s, uint32_t *bm, uint32_t f, uint32_t m)
BitMap * re2c::BitMap::first = NULL |
|
static |
const Go* re2c::BitMap::go |
const BitMap* re2c::BitMap::next |
const State* re2c::BitMap::on |
The documentation for this class was generated from the following files: