Mercurial > hg > Applications > Grep
comparison regexParser/cerium/CeriumMain.cc @ 279:6cc1d9779f45
add CeriumMain.h
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 31 Jan 2016 15:59:11 +0900 |
parents | 99d635926ef3 |
children | 6bbd1cbf90d0 |
comparison
equal
deleted
inserted
replaced
278:99d635926ef3 | 279:6cc1d9779f45 |
---|---|
5 #include "Func.h" | 5 #include "Func.h" |
6 #include "FileMapReduce.h" | 6 #include "FileMapReduce.h" |
7 #include "CeriumGrep.h" | 7 #include "CeriumGrep.h" |
8 #include "subsetConstruction.h" | 8 #include "subsetConstruction.h" |
9 #include "threadedSearch.h" | 9 #include "threadedSearch.h" |
10 #include "CeriumMain.h" | |
10 | 11 |
11 extern void task_init(); | 12 extern void task_init(); |
12 void TMend(TaskManager *); | 13 void TMend(TaskManager *); |
13 static double st_time; | 14 static double st_time; |
14 static double ed_time; | 15 static double ed_time; |
42 tsv.resultEnd = &r->next; | 43 tsv.resultEnd = &r->next; |
43 tsv.current = tsv.tg->stateList->tState; | 44 tsv.current = tsv.tg->stateList->tState; |
44 tsv.buff.buffptr--; | 45 tsv.buff.buffptr--; |
45 tsv = stateSkip(tsv); | 46 tsv = stateSkip(tsv); |
46 return tsv; | 47 return tsv; |
48 } | |
49 | |
50 ResultPtr resultPrint(ResultPtr r,const char* comment) { | |
51 ResultPtr prev = NULL; | |
52 printf("%s\n",comment); | |
53 for (;r;r = r->next) { | |
54 if (r->end == NULL) { | |
55 prev = r; | |
56 break; | |
57 } | |
58 fwrite(r->begin,r->end - r->begin-1,1,stdout); | |
59 puts("\n"); | |
60 } | |
61 return prev; | |
47 } | 62 } |
48 | 63 |
49 void ceriumCreateAnyState(TransitionGeneratorPtr tg) { | 64 void ceriumCreateAnyState(TransitionGeneratorPtr tg) { |
50 tg->stateSkip = stateSkip; | 65 tg->stateSkip = stateSkip; |
51 tg->stateMatch = stateMatch; | 66 tg->stateMatch = stateMatch; |