src
dfa.h
Go to the documentation of this file.
1 #ifndef _RE2C_IR_DFA_DFA_
2 #define _RE2C_IR_DFA_DFA_
3 
4 #include "src/util/c99_stdint.h"
5 #include <vector>
6 
7 #include "src/ir/regexp/regexp.h"
8 #include "src/parse/rules.h"
9 #include "src/util/forbid_copy.h"
10 
11 namespace re2c
12 {
13 
14 struct nfa_t;
15 class RuleOp;
16 
18 {
19  size_t *arcs;
21  bool ctx;
22 
24  : arcs(NULL)
25  , rule(NULL)
26  , ctx(false)
27  {}
29  {
30  delete[] arcs;
31  }
32 
34 };
35 
36 struct dfa_t
37 {
38  static const size_t NIL;
39 
40  std::vector<dfa_state_t*> states;
41  const size_t nchars;
42 
43  dfa_t(const nfa_t &nfa, const charset_t &charset, rules_t &rules);
44  ~dfa_t();
45 };
46 
48 {
51 };
52 
53 void minimization(dfa_t &dfa);
54 void fillpoints(const dfa_t &dfa, std::vector<size_t> &fill);
55 
56 } // namespace re2c
57 
58 #endif // _RE2C_IR_DFA_DFA_
std::vector< uint32_t > charset_t
Definition: regexp.h:16
std::vector< dfa_state_t * > states
Definition: dfa.h:40
std::map< rule_rank_t, rule_info_t > rules_t
Definition: rules.h:25
dfa_t(const nfa_t &nfa, const charset_t &charset, rules_t &rules)
void fillpoints(const dfa_t &dfa, std::vector< size_t > &fill)
Definition: fillpoints.cc:126
FORBID_COPY(dfa_state_t)
dfa_minimization_t
Definition: dfa.h:47
const size_t nchars
Definition: dfa.h:41
static const size_t NIL
Definition: dfa.h:38
~dfa_state_t()
Definition: dfa.h:28
bool ctx
Definition: dfa.h:21
size_t * arcs
Definition: dfa.h:19
Definition: bitmap.cc:10
void minimization(dfa_t &dfa)
RuleOp * rule
Definition: dfa.h:20