Copies insts in state s to the work queue q.
| 794 | |
| 795 | // Copies insts in state s to the work queue q. |
| 796 | void DFA::StateToWorkq(State* s, Workq* q) { |
| 797 | q->clear(); |
| 798 | for (int i = 0; i < s->ninst_; i++) { |
| 799 | if (s->inst_[i] == Mark) { |
| 800 | q->mark(); |
| 801 | } else if (s->inst_[i] == MatchSep) { |
| 802 | // Nothing after this is an instruction! |
| 803 | break; |
| 804 | } else { |
| 805 | // Explore from the head of the list. |
| 806 | AddToQueue(q, s->inst_[i], s->flag_ & kFlagEmptyMask); |
| 807 | } |
| 808 | } |
| 809 | } |
| 810 | |
| 811 | // Adds ip to the work queue, following empty arrows according to flag. |
| 812 | void DFA::AddToQueue(Workq* q, int id, uint32_t flag) { |
nothing calls this directly
no test coverage detected