diff regexParser/main.cc @ 259:6a6546a753cf

tSearch of driver in main.cc (not working)
author Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
date Tue, 26 Jan 2016 13:34:33 +0900
parents 9493800265a8
children 3f3c9902bb6d
line wrap: on
line diff
--- a/regexParser/main.cc	Tue Jan 26 02:30:51 2016 +0900
+++ b/regexParser/main.cc	Tue Jan 26 13:34:33 2016 +0900
@@ -13,6 +13,7 @@
     bool generate = true;
     bool subset = false;
     bool generateSequentialSearch = false;
+    bool tSearch = false;
     char *filename;
 
     RegexInfo ri;
@@ -28,6 +29,8 @@
             generateSequentialSearch = true;
         } else if (strcmp(argv[i],"-file") == 0) {
             filename = argv[i+1]; i++;
+        } else if (strcmp(argv[i],"-tSearch") == 0) {
+            tSearch = true;
         }
     }
     if (!ri.ptr) return 0;
@@ -57,7 +60,8 @@
         int fd = 0;
         st_mmap_t st_mmap = createSt_mmap(filename,fd);
         Buffer buff = createBuffer(st_mmap);
-        grepWalk(tgv.tg,buff);
+        if (tSearch) tSearch(tsv);
+        else grepWalk(tgv.tg,buff);
         close(fd);
     }
     return 0;