src
regexp_rule.h
Go to the documentation of this file.
1 #ifndef _RE2C_IR_REGEXP_REGEXP_RULE_
2 #define _RE2C_IR_REGEXP_REGEXP_RULE_
3 
4 #include <string>
5 
6 #include "src/ir/regexp/regexp.h"
7 #include "src/ir/rule_rank.h"
8 #include "src/parse/code.h"
9 
10 namespace re2c
11 {
12 
13 class RuleOp: public RegExp
14 {
15 public:
16  const Loc loc;
17 
18 private:
19  RegExp * exp;
20 
21 public:
24  const Code * code;
25  const std::string newcond;
26 
27  inline RuleOp
28  ( const Loc & l
29  , RegExp * r1
30  , RegExp * r2
31  , rule_rank_t r
32  , const Code * c
33  , const std::string * cond
34  )
35  : loc (l)
36  , exp (r1)
37  , ctx (r2)
38  , rank (r)
39  , code (c)
40  , newcond (cond ? *cond : "")
41  {}
42  void display (std::ostream & o) const;
43  void split (std::set<uint32_t> &);
44  uint32_t calc_size() const;
46 
48 };
49 
50 } // end namespace re2c
51 
52 #endif // _RE2C_IR_REGEXP_REGEXP_RULE_
const std::string newcond
Definition: regexp_rule.h:25
nfa_state_t * compile(nfa_t &nfa, nfa_state_t *n)
Definition: nfa.cc:58
const Code * code
Definition: regexp_rule.h:24
Definition: loc.h:11
void split(std::set< uint32_t > &)
Definition: split.cc:43
uint32_t calc_size() const
Definition: calc_size.cc:42
RegExp * ctx
Definition: regexp_rule.h:22
FORBID_COPY(RuleOp)
rule_rank_t rank
Definition: regexp_rule.h:23
void display(std::ostream &o) const
Definition: display.cc:45
const Loc loc
Definition: regexp_rule.h:16
Definition: bitmap.cc:10
RuleOp(const Loc &l, RegExp *r1, RegExp *r2, rule_rank_t r, const Code *c, const std::string *cond)
Definition: regexp_rule.h:28