src
Main Page
Namespaces
Classes
Files
File List
File Members
ir
nfa
calc_size.cc
Go to the documentation of this file.
1
#include "
src/util/c99_stdint.h
"
2
3
#include "
src/ir/regexp/regexp.h
"
4
#include "
src/ir/regexp/regexp_alt.h
"
5
#include "
src/ir/regexp/regexp_cat.h
"
6
#include "
src/ir/regexp/regexp_close.h
"
7
#include "
src/ir/regexp/regexp_match.h
"
8
#include "
src/ir/regexp/regexp_null.h
"
9
#include "
src/ir/regexp/regexp_rule.h
"
10
11
namespace
re2c
12
{
13
14
uint32_t
AltOp::calc_size
()
const
15
{
16
return
exp1->
calc_size
()
17
+ exp2->
calc_size
()
18
+ 1;
19
}
20
21
uint32_t
CatOp::calc_size
()
const
22
{
23
return
exp1->
calc_size
()
24
+ exp2->
calc_size
();
25
}
26
27
uint32_t
CloseOp::calc_size
()
const
28
{
29
return
exp->
calc_size
() + 1;
30
}
31
32
uint32_t
MatchOp::calc_size
()
const
33
{
34
return
1;
35
}
36
37
uint32_t
NullOp::calc_size
()
const
38
{
39
return
0;
40
}
41
42
uint32_t
RuleOp::calc_size
()
const
43
{
44
const
uint32_t n =
ctx
->
calc_size
();
45
return
exp->
calc_size
()
46
+ (n > 0 ? n + 1 : 0)
47
+ 1;
48
}
49
50
}
// end namespace re2c
re2c::CloseOp::calc_size
uint32_t calc_size() const
Definition:
calc_size.cc:27
re2c::CatOp::calc_size
uint32_t calc_size() const
Definition:
calc_size.cc:21
regexp_null.h
regexp_close.h
regexp_cat.h
regexp_match.h
re2c::AltOp::calc_size
uint32_t calc_size() const
Definition:
calc_size.cc:14
regexp_rule.h
re2c::MatchOp::calc_size
uint32_t calc_size() const
Definition:
calc_size.cc:32
re2c::RuleOp::calc_size
uint32_t calc_size() const
Definition:
calc_size.cc:42
re2c::RuleOp::ctx
RegExp * ctx
Definition:
regexp_rule.h:22
re2c::NullOp::calc_size
uint32_t calc_size() const
Definition:
calc_size.cc:37
regexp.h
c99_stdint.h
re2c::RegExp::calc_size
virtual uint32_t calc_size() const =0
regexp_alt.h
re2c
Definition:
bitmap.cc:10
Generated by
1.8.10