aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorTeddy <ted.sybil@gmail.com>2014-05-02 01:28:21 +0800
committerTeddy <ted.sybil@gmail.com>2014-05-02 01:28:21 +0800
commit51e150b8240e77120b82c7f6815e9a784b64ceed (patch)
treef4aa6834f30923921499ff44f3e724207f0721c9 /main.c
parentdc0b69f1d2c44f5a45e1ce9eb7f2885ab33cb335 (diff)
complex eight-queen puzzle now works
Diffstat (limited to 'main.c')
-rw-r--r--main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/main.c b/main.c
index 91bcc17..72c8b80 100644
--- a/main.c
+++ b/main.c
@@ -52,11 +52,23 @@ void print_sem() {
/* cnode_debug_print(ast_root, 1); */
}
+void lib_generate() {
+ FILE *f = fopen("lib.s", "r");
+ static char buff[1024];
+ if (f)
+ {
+ size_t size;
+ while ((size = fread(buff, 1, 1024, f)))
+ fwrite(buff, 1, size, stdout);
+ }
+}
+
void print_ssa() {
cibic_init();
yyparse();
semantics_check(ast_root);
ssa_generate();
+ lib_generate();
}
void print_help() {