Mercurial > hg > Members > masakoha > testcode
comparison regexParser/main.cc @ 167:3bf2c6d6d53e pairPro
move regexparser dir
author | masa |
---|---|
date | Sat, 19 Dec 2015 15:38:45 +0900 |
parents | c/regexParser/main.cc@1fad21fd6028 |
children | 5e8c6857934c |
comparison
equal
deleted
inserted
replaced
166:96854eba17e5 | 167:3bf2c6d6d53e |
---|---|
1 #include <stdio.h> | |
2 #include <stdlib.h> | |
3 #include <string.h> | |
4 #include "subsetConstraction.h" | |
5 | |
6 extern NodePtr regex(RegexInfoPtr); | |
7 extern void printTree(NodePtr); | |
8 | |
9 int main(int argc, char **argv) | |
10 { | |
11 RegexInfoPtr ri = (RegexInfoPtr)malloc(sizeof(RegexInfo)); | |
12 ri->nodeNumber = 1; | |
13 | |
14 for (int i = 1; i < argc; i++) { | |
15 if (strcmp(argv[i],"-regex") == 0) { | |
16 ri->ptr = (unsigned char*)argv[i+1]; i++; | |
17 } | |
18 } | |
19 | |
20 printf("regex : %s\n",ri->ptr); | |
21 NodePtr n = regex(ri); | |
22 printTree(n); | |
23 return 0; | |
24 } |