src
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"
8 
9 namespace re2c
10 {
11 
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 
45 {
46  return 1;
47 }
48 
50 {
51  return 0;
52 }
53 
54 } // end namespace re2c
55 
uint32_t fixedLength()
Definition: fixed_length.cc:44
uint32_t fixedLength()
Definition: fixed_length.cc:49
uint32_t fixedLength()
Definition: fixed_length.cc:17
virtual uint32_t fixedLength()
Definition: fixed_length.cc:12
Definition: bitmap.cc:10
uint32_t fixedLength()
Definition: fixed_length.cc:30