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
| 910 | // ^$^$^$ but processing ^ and $ simultaneously will (and is the behavior |
| 911 | // exhibited by existing implementations). |
| 912 | void 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, |
nothing calls this directly
no test coverage detected