summaryrefslogtreecommitdiff
path: root/pattern2regex.c
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2017-07-25 21:08:44 -0500
committerBobby Bingham <koorogi@koorogi.info>2017-07-25 21:09:45 -0500
commit0e96b8551b5293ffeadfebc31b85a165b0a74b99 (patch)
tree1057a6bc62f64b9172d3d73a2d4a6cf422cc2f7e /pattern2regex.c
parentee78102672afdede839489fa0b1932b64335eaaf (diff)
create general regex simplification passHEADmaster
Move the previous special-case logic for removing 1-1 repeats into this pass.
Diffstat (limited to 'pattern2regex.c')
-rw-r--r--pattern2regex.c5
1 files changed, 4 insertions, 1 deletions
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;