From 5e11a31e4434331e038b97eaaa992ba65e24811a Mon Sep 17 00:00:00 2001 From: Tucker Evans Date: Tue, 15 Oct 2019 19:24:39 -0400 Subject: Update Code generation macros --- pc.h | 3 +-- pc.l | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pc.h b/pc.h index 3614796..844868d 100644 --- a/pc.h +++ b/pc.h @@ -15,7 +15,6 @@ int set_func_types(ptree*, int*, int); int get_call_types(ptree*, int*, int); #define OFFSET_SIZE 8 +#define DEBUG #endif - -#define GENERATE_CODE diff --git a/pc.l b/pc.l index eb8b4ea..d55e54e 100644 --- a/pc.l +++ b/pc.l @@ -43,9 +43,11 @@ output { tmp->func_info->argc = -1; tmp->func_info->argv = NULL; +#ifdef GENERATE_CODE fprintf(stdout, ".data\n"); fprintf(stdout, "int_print:\n\t .asciz \"%%d\\n\"\n"); fprintf(stdout, "float_print:\n\t .asciz \"%%f\\n\"\n.text\n"); +#endif return IO; -- cgit v1.1