Mercurial > hg > Members > masakoha > testcode
view c/regexParser/main.cc @ 146:1c74ac7d56ec pairPro
fix
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 15 Dec 2015 16:20:35 +0900 |
parents | 50217a0545e8 |
children | 84d32375383a |
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); int main(int argc, char **argv) { RegexInfoPtr ri = (RegexInfoPtr)malloc(sizeof(RegexInfo)); ri->nodeNumber = 1; 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); TransitionGenerator tg = generateTransitionList(n); return 0; }