diff options
Diffstat (limited to 'pattern2regex.c')
-rw-r--r-- | pattern2regex.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pattern2regex.c b/pattern2regex.c new file mode 100644 index 0000000..669206a --- /dev/null +++ b/pattern2regex.c @@ -0,0 +1,20 @@ +#include <stdio.h> + +#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()) dump_atom(ast); + + fclose(yyin); + return 0; +} + |