From 0e96b8551b5293ffeadfebc31b85a165b0a74b99 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Tue, 25 Jul 2017 21:08:44 -0500 Subject: create general regex simplification pass Move the previous special-case logic for removing 1-1 repeats into this pass. --- pattern2regex.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pattern2regex.c') diff --git a/pattern2regex.c b/pattern2regex.c index 646b007..c9b1743 100644 --- a/pattern2regex.c +++ b/pattern2regex.c @@ -12,7 +12,10 @@ int main(int argc, char **argv) yyin = stdin; } - if (!yyparse()) print_regex(ast); + if (!yyparse()) { + simplify(ast); + print_regex(ast); + } fclose(yyin); return 0; -- cgit v1.2.3