MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / NFA

Method NFA

extern/re2/re2/nfa.cc:133–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131};
132
133NFA::NFA(Prog* prog) {
134 prog_ = prog;
135 start_ = prog_->start();
136 ncapture_ = 0;
137 longest_ = false;
138 endmatch_ = false;
139 btext_ = NULL;
140 etext_ = NULL;
141 q0_.resize(prog_->size());
142 q1_.resize(prog_->size());
143 // See NFA::AddToThreadq() for why this is so.
144 int nstack = 2*prog_->inst_count(kInstCapture) +
145 prog_->inst_count(kInstEmptyWidth) +
146 prog_->inst_count(kInstNop) + 1; // + 1 for start inst
147 stack_ = PODArray<AddState>(nstack);
148 freelist_ = NULL;
149 match_ = NULL;
150 matched_ = false;
151}
152
153NFA::~NFA() {
154 delete[] match_;

Callers

nothing calls this directly

Calls 4

inst_countMethod · 0.80
startMethod · 0.45
resizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected