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

Method SearchNFA

extern/re2/re2/nfa.cc:631–652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

629}
630
631bool
632Prog::SearchNFA(const StringPiece& text, const StringPiece& context,
633 Anchor anchor, MatchKind kind,
634 StringPiece* match, int nmatch) {
635 if (ExtraDebug)
636 Dump();
637
638 NFA nfa(this);
639 StringPiece sp;
640 if (kind == kFullMatch) {
641 anchor = kAnchored;
642 if (nmatch == 0) {
643 match = &sp;
644 nmatch = 1;
645 }
646 }
647 if (!nfa.Search(text, context, anchor == kAnchored, kind != kFirstMatch, match, nmatch))
648 return false;
649 if (kind == kFullMatch && match[0].end() != text.end())
650 return false;
651 return true;
652}
653
654// For each instruction i in the program reachable from the start, compute the
655// number of instructions reachable from i by following only empty transitions

Callers 8

MatchMethod · 0.80
RunSearchMethod · 0.80
SearchNFAFunction · 0.80
SearchCachedNFAFunction · 0.80
Parse3NFAFunction · 0.80
Parse3CachedNFAFunction · 0.80
Parse1NFAFunction · 0.80
Parse1CachedNFAFunction · 0.80

Calls 3

DumpFunction · 0.85
SearchMethod · 0.45
endMethod · 0.45

Tested by 1

RunSearchMethod · 0.64