summaryrefslogtreecommitdiff
path: root/ast.h
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 /ast.h
parentee78102672afdede839489fa0b1932b64335eaaf (diff)
create general regex simplification passHEADmaster
Move the previous special-case logic for removing 1-1 repeats into this pass.
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/ast.h b/ast.h
index f8183f9..dac6e8a 100644
--- a/ast.h
+++ b/ast.h
@@ -28,7 +28,7 @@ struct atom {
struct repeat counts;
struct atom *child;
} repeat;
- const struct atom *children[2];
+ struct atom *children[2];
const char *literal;
} u;
};
@@ -38,6 +38,8 @@ void dump_atom(const struct atom *a);
void print_regex(const struct atom *a);
+void simplify(struct atom *a);
+
extern struct atom *ast;
#endif