Mercurial > hg > Applications > Grep
diff 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 |
line wrap: on
line diff
--- a/regexParser/cerium/CeriumMain.cc Sat Jan 30 21:19:05 2016 +0900 +++ b/regexParser/cerium/CeriumMain.cc Sun Jan 31 15:59:11 2016 +0900 @@ -7,6 +7,7 @@ #include "CeriumGrep.h" #include "subsetConstruction.h" #include "threadedSearch.h" +#include "CeriumMain.h" extern void task_init(); void TMend(TaskManager *); @@ -46,6 +47,20 @@ return tsv; } +ResultPtr resultPrint(ResultPtr r,const char* comment) { + ResultPtr prev = NULL; + printf("%s\n",comment); + for (;r;r = r->next) { + if (r->end == NULL) { + prev = r; + break; + } + fwrite(r->begin,r->end - r->begin-1,1,stdout); + puts("\n"); + } + return prev; +} + void ceriumCreateAnyState(TransitionGeneratorPtr tg) { tg->stateSkip = stateSkip; tg->stateMatch = stateMatch;