Lines Matching refs:Prog

5 // Compile regular expression to Prog.
7 // Prog and Inst are defined in prog.h.
38 static void Patch(Prog::Inst *inst0, PatchList l, uint32 v);
41 static PatchList Deref(Prog::Inst *inst0, PatchList l);
44 static PatchList Append(Prog::Inst *inst0, PatchList l1, PatchList l2);
57 PatchList PatchList::Deref(Prog::Inst* inst0, PatchList l) {
58 Prog::Inst* ip = &inst0[l.p>>1];
67 void PatchList::Patch(Prog::Inst *inst0, PatchList l, uint32 val) {
69 Prog::Inst* ip = &inst0[l.p>>1];
81 PatchList PatchList::Append(Prog::Inst* inst0, PatchList l1, PatchList l2) {
95 Prog::Inst* ip = &inst0[l.p>>1];
126 // Compiles Regexp to a new Prog.
127 // Caller is responsible for deleting Prog when finished with it.
130 static Prog *Compile(Regexp* re, bool reversed, int64 max_mem);
132 // Compiles alternation of all the re to a new Prog.
134 static Prog* CompileSet(const RE2::Options& options, RE2::Anchor anchor,
211 Prog* Finish();
217 Prog* prog_; // Program being built.
224 Prog::Inst* inst_; // Pointer to first instruction.
239 prog_ = new Prog();
269 Prog::Inst* ip = new Prog::Inst[inst_cap_];
282 Prog::Inst* ip = new Prog::Inst[inst_len_];
310 Prog::Inst* begin = &inst_[a.begin];
438 for (j = i+1; j < 256 && Prog::IsWordChar(i) == Prog::IsWordChar(j); j++)
959 } else if (max_mem <= sizeof(Prog)) {
963 int64 m = (max_mem - sizeof(Prog)) / sizeof(Prog::Inst);
976 if (m > Prog::Inst::kMaxInst)
977 m = Prog::Inst::kMaxInst;
990 Prog* Compiler::Compile(Regexp* re, bool reversed, int64 max_mem) {
1042 Prog* Compiler::Finish() {
1051 // Trim instruction to minimum array and transfer to Prog.
1066 int64 m = max_mem_ - sizeof(Prog) - inst_len_*sizeof(Prog::Inst);
1072 Prog* p = prog_;
1077 // Converts Regexp to Prog.
1078 Prog* Regexp::CompileToProg(int64 max_mem) {
1082 Prog* Regexp::CompileToReverseProg(int64 max_mem) {
1090 // Compiles RE set to Prog.
1091 Prog* Compiler::CompileSet(const RE2::Options& options, RE2::Anchor anchor,
1115 Prog* prog = c.Finish();
1123 prog->SearchDFA(sp, sp, Prog::kAnchored, Prog::kManyMatch,
1133 Prog* Prog::CompileSet(const RE2::Options& options, RE2::Anchor anchor,