src
split.cc
Go to the documentation of this file.
1 #include "src/util/c99_stdint.h"
2 #include <set>
3 
4 #include "src/ir/regexp/regexp.h"
11 #include "src/util/range.h"
12 
13 namespace re2c {
14 
15 void AltOp::split (std::set<uint32_t> & cs)
16 {
17  exp1->split (cs);
18  exp2->split (cs);
19 }
20 
21 void CatOp::split (std::set<uint32_t> & cs)
22 {
23  exp1->split (cs);
24  exp2->split (cs);
25 }
26 
27 void CloseOp::split (std::set<uint32_t> & cs)
28 {
29  exp->split (cs);
30 }
31 
32 void MatchOp::split (std::set<uint32_t> & cs)
33 {
34  for (Range *r = match; r; r = r->next ())
35  {
36  cs.insert (r->lower ());
37  cs.insert (r->upper ());
38  }
39 }
40 
41 void NullOp::split (std::set<uint32_t> &) {}
42 
43 void RuleOp::split (std::set<uint32_t> & cs)
44 {
45  exp->split (cs);
46  ctx->split (cs);
47 }
48 
49 } // namespace re2c
Range * match
Definition: regexp_match.h:13
void split(std::set< uint32_t > &)
Definition: split.cc:32
void split(std::set< uint32_t > &)
Definition: split.cc:27
virtual void split(std::set< uint32_t > &)=0
void split(std::set< uint32_t > &)
Definition: split.cc:43
RegExp * ctx
Definition: regexp_rule.h:22
void split(std::set< uint32_t > &)
Definition: split.cc:41
void split(std::set< uint32_t > &)
Definition: split.cc:21
void split(std::set< uint32_t > &)
Definition: split.cc:15
Definition: bitmap.cc:10
Range * next() const
Definition: range.h:39