diff regexParser/cerium/ppe/Exec.cc @ 298:63213964502a

refactoring ....
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 03 Feb 2016 12:24:34 +0900
parents bcb3b0cd5604
children 27414e6fb33c
line wrap: on
line diff
--- a/regexParser/cerium/ppe/Exec.cc	Tue Feb 02 11:58:59 2016 +0900
+++ b/regexParser/cerium/ppe/Exec.cc	Wed Feb 03 12:24:34 2016 +0900
@@ -11,10 +11,8 @@
 SchedDefineTask1(Exec,blockedGrep);
 
 TSValue blockSearch(TransitionGeneratorPtr tg,Buffer buff,int task_spawned) {
-    TSValue tsv;
+    TSValue tsv = createTSValue(tg,buff);
     BlockOutput blk;
-    tsv.buff = buff;
-    tsv.tg = tg;
     tsv.blk = &blk;
     if (task_spawned == 0) {
         tsv.current = tg->stateStart->tState;
@@ -26,8 +24,6 @@
     tsv.blk->resultEnd = &result;
     unsigned char *end = tsv.buff.buffend;
     tsv.buff.buffend = tsv.buff.buff+1;
-    tsv.matchBegin = tsv.buff.buffptr;
-    tsv.matchEnd = NULL;
     tsv = tSearch(tsv);
     tsv.blk->blockBegin = tsv.current;
     tsv.buff.buffend = end;
@@ -79,3 +75,5 @@
     o_data[2] = (unsigned long)tsv.blk->blockEnd->state;
     return 0;
 }
+
+/* end */