Lines Matching refs:Prog
24 #include "re2/prog.h"
57 DFA(Prog* prog, Prog::MatchKind kind, int64 max_mem);
60 Prog::MatchKind kind() { return kind_; }
232 Prog::MatchKind kind,
341 Prog* prog_; // The regular expression program to run.
342 Prog::MatchKind kind_; // The kind of DFA.
434 DFA::DFA(Prog* prog, Prog::MatchKind kind, int64 max_mem)
435 : prog_(prog),
447 if (kind_ == Prog::kLongestMatch) {
448 nmark = prog->size();
449 start_unanchored_ = prog->start_unanchored();
451 nastack_ = 2 * prog->size() + nmark;
459 LOG(INFO) << StringPrintf("DFA out of memory: prog size %lld mem %lld",
474 LOG(INFO) << StringPrintf("DFA out of memory: prog size %lld mem %lld",
480 q0_ = new Workq(prog->size(), nmark);
481 q1_ = new Workq(prog->size(), nmark);
575 // current text position. These flag bits are defined in prog.h.
621 if (sawmatch && (kind_ == Prog::kFirstMatch || q->is_mark(id)))
630 Prog::Inst* ip = prog_->inst(id);
637 if (kind_ != Prog::kManyMatch &&
638 (kind_ != Prog::kFirstMatch ||
640 (kind_ != Prog::kLongestMatch || !sawmark) &&
712 if (kind_ == Prog::kLongestMatch) {
810 // It is sized to have room for nastack_ == 2*prog->size() + nmark
814 // (If we're using marks, nmark == prog->size(); otherwise nmark == 0.)
842 Prog::Inst* ip = prog_->inst(id);
911 Prog::MatchKind kind,
925 Prog::Inst* ip = prog_->inst(id);
944 if (kind == Prog::kFirstMatch) {
1024 bool isword = (c != kByteEndText && Prog::IsWordChar(c));
1047 if (c != kByteEndText || kind_ != Prog::kManyMatch)
1510 if (params->matches && kind_ == Prog::kManyMatch) {
1514 Prog::Inst* ip = prog_->inst(s->inst_[i]);
1590 // The regexp program (Prog*) itself has
1632 } else if (Prog::IsWordChar(text.begin()[-1] & 0xFF)) {
1646 } else if (Prog::IsWordChar(text.end()[0] & 0xFF)) {
1803 // prog.h can be used without moving the definition of
1805 // prog->dfa_ = dfa;
1807 // prog->delete_dfa_ = DeleteDFA;
1808 // so that ~Prog can delete the dfa.
1813 DFA* Prog::GetDFA(MatchKind kind) {
1869 bool Prog::SearchDFA(const StringPiece& text, const StringPiece& const_context,
1968 int Prog::BuildEntireDFA(MatchKind kind) {
2116 // PossibleMatchRange for a Prog.
2117 bool Prog::PossibleMatchRange(string* min, string* max, int maxlen) {
2124 dfa_longest_ = new DFA(this, Prog::kLongestMatch, dfa_mem_/2);