Mercurial > hg > Applications > Grep
view regexParser/main.cc @ 189:fccf7941ecc2 pairPro
fix
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 25 Dec 2015 14:42:31 +0900 |
parents | ef798db705e9 |
children | 3e8e5780ad4a |
line wrap: on
line source
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "regexParser.h" extern NodePtr regex(RegexInfoPtr); extern void printTree(NodePtr); extern TransitionGeneratorPtr generateTransitionList(NodePtr n); int main(int argc, char **argv) { RegexInfo ri; ri.stateNumber = 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); TransitionGeneratorPtr tg = generateTransitionList(n); return 0; }