| 180 | } |
| 181 | |
| 182 | std::string Prog::DumpByteMap() { |
| 183 | std::string map; |
| 184 | for (int c = 0; c < 256; c++) { |
| 185 | int b = bytemap_[c]; |
| 186 | int lo = c; |
| 187 | while (c < 256-1 && bytemap_[c+1] == b) |
| 188 | c++; |
| 189 | int hi = c; |
| 190 | map += StringPrintf("[%02x-%02x] -> %d\n", lo, hi, b); |
| 191 | } |
| 192 | return map; |
| 193 | } |
| 194 | |
| 195 | // Is ip a guaranteed match at end of text, perhaps after some capturing? |
| 196 | static bool IsMatch(Prog* prog, Prog::Inst* ip) { |