Mercurial > hg > Members > masakoha > testcode
view c/regexParser/main.cc @ 139:6c258910cacb pairPro
remove some warning and error
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 07 Dec 2015 02:20:13 +0900 |
parents | ccc673449351 |
children | 84a2a5209d3a |
line wrap: on
line source
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "subsetConstraction.h" extern NodePtr regex(RegexInfoPtr); extern void printTree(NodePtr); BitVectorListPtr createBitVectorList(NodePtr); int main(int argc, char **argv) { RegexInfoPtr ri = (RegexInfoPtr)malloc(sizeof(RegexInfo)); TransitionGeneratorPtr tg = (TransitionGeneratorPtr)malloc(sizeof(TransitionGenerator)); ri->nodeNumber = 1; ri->orNum = 0; ri->asterFlag = false; for (int i = 1; i < argc; i++) { if (strcmp(argv[i],"-regex") == 0) { ri->ptr = (unsigned char*)argv[i+1]; i++; } } printf("regex : %s\n",ri->ptr); NodePtr n = regex(ri); printTree(n); return 0; }