Lines Matching refs:post
101 void RegexpGenerator::GeneratePostfix(vector<string>* post, int nstk, in GeneratePostfix() argument
104 RunPostfix(*post); in GeneratePostfix()
115 post->push_back(atoms_[i]); in GeneratePostfix()
116 GeneratePostfix(post, nstk + 1, ops, atoms + 1); in GeneratePostfix()
117 post->pop_back(); in GeneratePostfix()
127 post->push_back(fmt); in GeneratePostfix()
128 GeneratePostfix(post, nstk - nargs + 1, ops + 1, atoms); in GeneratePostfix()
129 post->pop_back(); in GeneratePostfix()
137 bool RegexpGenerator::GenerateRandomPostfix(vector<string> *post, int nstk, in GenerateRandomPostfix() argument
142 RunPostfix(*post); in GenerateRandomPostfix()
157 post->push_back(fmt); in GenerateRandomPostfix()
158 bool ret = GenerateRandomPostfix(post, nstk - nargs + 1, in GenerateRandomPostfix()
160 post->pop_back(); in GenerateRandomPostfix()
168 post->push_back(atoms_[acm_->Uniform(atoms_.size())]); in GenerateRandomPostfix()
169 bool ret = GenerateRandomPostfix(post, nstk + 1, ops, atoms + 1); in GenerateRandomPostfix()
170 post->pop_back(); in GenerateRandomPostfix()
180 void RegexpGenerator::RunPostfix(const vector<string>& post) { in RunPostfix() argument
182 for (int i = 0; i < post.size(); i++) { in RunPostfix()
183 switch (CountArgs(post[i])) { in RunPostfix()
185 LOG(FATAL) << "Bad operator: " << post[i]; in RunPostfix()
187 regexps.push(post[i]); in RunPostfix()
192 regexps.push("(?:" + StringPrintf(post[i].c_str(), a.c_str()) + ")"); in RunPostfix()
201 StringPrintf(post[i].c_str(), a.c_str(), b.c_str()) + in RunPostfix()
211 for (int i = 0; i < post.size(); i++) { in RunPostfix()
212 printf(" %s\n", CEscape(post[i]).c_str()); in RunPostfix()