view regexParser/main.cc @ 184:1da1b2eacb84 pairPro

gather struct
author Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
date Thu, 24 Dec 2015 20:09:21 +0900
parents d97bcab546e8
children ef798db705e9
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)
{
    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);
    return 0;
}