#include #include "ast.h" #include "lex-pattern.h" #include "parse-pattern.h" int main(int argc, char **argv) { if (argc >= 2) { yyin = fmemopen(argv[1], strlen(argv[1]), "r"); } else { yyin = stdin; } if (!yyparse()) { simplify(ast); print_regex(ast); } fclose(yyin); return 0; }