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

Method RunWorkqOnEmptyString

extern/re2/re2/dfa.cc:912–920  ·  view source on GitHub ↗

Runs the work queue, processing the empty strings indicated by flag. For example, flag == kEmptyBeginLine|kEmptyEndLine means to match both ^ and $. It is important that callers pass all flags at once: processing both ^ and $ is not the same as first processing only ^ and then processing only $. Doing the two-step sequence won't match ^$^$^$ but processing ^ and $ simultaneously will (and is the

Source from the content-addressed store, hash-verified

910// ^$^$^$ but processing ^ and $ simultaneously will (and is the behavior
911// exhibited by existing implementations).
912void DFA::RunWorkqOnEmptyString(Workq* oldq, Workq* newq, uint32_t flag) {
913 newq->clear();
914 for (Workq::iterator i = oldq->begin(); i != oldq->end(); ++i) {
915 if (oldq->is_mark(*i))
916 AddToQueue(newq, Mark, flag);
917 else
918 AddToQueue(newq, *i, flag);
919 }
920}
921
922// Runs the work queue, processing the single byte c followed by any empty
923// strings indicated by flag. For example, c == 'a' and flag == kEmptyEndLine,

Callers

nothing calls this directly

Calls 5

AddToQueueFunction · 0.85
is_markMethod · 0.80
clearMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected