summaryrefslogtreecommitdiff
path: root/pattern2regex.c
blob: 669206a2d8c7fbc1babf6b0a07ef7f7177e2f109 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;
}