src
Main Page
Namespaces
Classes
Files
File List
File Members
ir
regexp
fixed_length.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_match.h
"
7
#include "
src/ir/regexp/regexp_null.h
"
8
9
namespace
re2c
10
{
11
12
uint32_t
RegExp::fixedLength
()
13
{
14
return
~0u;
15
}
16
17
uint32_t
AltOp::fixedLength
()
18
{
19
uint32_t l1 = exp1->
fixedLength
();
20
uint32_t l2 = exp1->
fixedLength
();
21
22
if
(l1 != l2 || l1 == ~0u)
23
{
24
return
~0u;
25
}
26
27
return
l1;
28
}
29
30
uint32_t
CatOp::fixedLength
()
31
{
32
const
uint32_t l1 = exp1->
fixedLength
();
33
if
(l1 != ~0u)
34
{
35
const
uint32_t l2 = exp2->
fixedLength
();
36
if
(l2 != ~0u)
37
{
38
return
l1 + l2;
39
}
40
}
41
return
~0u;
42
}
43
44
uint32_t
MatchOp::fixedLength
()
45
{
46
return
1;
47
}
48
49
uint32_t
NullOp::fixedLength
()
50
{
51
return
0;
52
}
53
54
}
// end namespace re2c
55
re2c::MatchOp::fixedLength
uint32_t fixedLength()
Definition:
fixed_length.cc:44
regexp_null.h
regexp_cat.h
regexp_match.h
re2c::NullOp::fixedLength
uint32_t fixedLength()
Definition:
fixed_length.cc:49
re2c::AltOp::fixedLength
uint32_t fixedLength()
Definition:
fixed_length.cc:17
re2c::RegExp::fixedLength
virtual uint32_t fixedLength()
Definition:
fixed_length.cc:12
regexp.h
c99_stdint.h
regexp_alt.h
re2c
Definition:
bitmap.cc:10
re2c::CatOp::fixedLength
uint32_t fixedLength()
Definition:
fixed_length.cc:30
Generated by
1.8.10