Lines Matching defs:it
17 // but it omits the details of how the State graph gets constructed as well
71 // If it is false, the DFA runs from text.end() to text.begin(),
73 // If the DFA cannot complete the search (for example, if it is out of
74 // memory), it sets *failed and returns false.
87 // These data structures are logically private, but C++ makes it too
327 // loop is not specialized like the SearchFFF etc. versions, so it
499 // Signals that the rest of the string matches no matter what it is.
510 for (DFA::Workq::iterator it = q->begin(); it != q->end(); ++it) {
511 if (q->is_mark(*it)) {
515 StringAppendF(&s, "%s%d", sep, *it);
562 // the DFA matches, not where it matches in the text. To decide where the
602 // If one is found, returns it. If one is not found, allocates one,
603 // inserts it in the cache, and returns it.
619 for (Workq::iterator it = q->begin(); it != q->end(); ++it) {
620 int id = *it;
634 // the rest of the input is. If it is the highest priority match
636 // to indicate that it's all matches from here out.
639 (it == q->begin() && ip->greedy(prog_))) &&
652 inst[n++] = *it;
698 // If there are no Insts in the list, it's a dead state,
735 // If one is found, returns it. If one is not found, allocates one,
736 // inserts it in the cache, and returns it.
743 StateSet::iterator it = state_cache_.find(&state);
744 if (it != state_cache_.end()) {
746 fprintf(stderr, " -cached-> %s\n", DumpState(*it).c_str());
747 return *it;
775 // Put state in cache and return it.
786 for (StateSet::iterator it = state_cache_.begin();
787 it != state_cache_.end(); ++it)
788 v.push_back(*it);
810 // It is sized to have room for nastack_ == 2*prog->size() + nmark
832 // Otherwise add it. We don't actually keep all the ones
884 // also a new queue to fill in. It's not acceptable to add to the end of
890 // both ^ and $. It is important that callers pass all flags at once:
972 // It is convenient for routines like PossibleMatchRange
975 // so it's pretty easy.
990 // If someone else already computed this, return it.
1061 // (Otherwise it would need one mutex operation per input byte.)
1065 WriteMemoryBarrier(); // Flush ns before linking to it.
1084 // of memory, it will need to drop its read lock and then acquire the
1085 // write lock. Since it cannot then atomically downgrade from write lock
1086 // to read lock, it runs the rest of the search holding the write lock.
1088 // is forced by the Mutex interface.) It's a bit complicated to keep
1090 // that through the search, so instead we encapsulate it in the RWLocker
1145 // When a thread decides to flush the cache, it drops cache_mutex_
1146 // and then re-acquires it for writing. That ensures there are no
1156 // If we already held cache_mutex_ for writing, it means
1179 // It makes a copy of the state's guts outside the cache (before the reset)
1259 // First, the State graph is constructed incrementally: it is possible
1279 // Third, it is common for a DFA for an unanchored match to begin in a
1283 // Instead, it can call memchr to search very quickly for the byte c.
1291 // match is found, it must be noted, but the DFA must continue on in
1297 // Fifth, one algorithm that uses the DFA needs it to run over the
1306 // inline it to create the specialized ones.
1308 // Note that matches are delayed by one byte, to make it easier to
1310 // When s->next[c]->IsMatch(), it means that there is a match ending just
1385 // RunStateOnByte returns ns == NULL if it is out of memory.
1398 // so if resetp != NULL, it means we filled the DFA state
1448 // so adjust p before using it in the match.
1465 // Process one more byte to see if it triggers a match.
1599 // Otherwise it matters whether the character before text is a word character
1605 // StartInfos. The start state for each is filled in the first time it
1890 // and then checking if it covers all of text.
1922 // We only know where it ends, so use the boundary of text
1985 // revisit a given state if it's part of a repeated group, so if the value
2026 // It returns NULL only if the DFA has run out of memory,
2029 // and whether it is interesting graph. Nodes might have