From 0b33ea4dea5108e6cf431614e9d90da0eb8d7be3 Mon Sep 17 00:00:00 2001 From: Annie Date: Fri, 4 Apr 2025 18:49:04 -0400 Subject: [PATCH] added -debug option to -help output --- src/runner.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/runner.h b/src/runner.h index cc573c5..0483e12 100644 --- a/src/runner.h +++ b/src/runner.h @@ -4,16 +4,18 @@ #define ALPHA_OFFSET 6 #define TOK_LEN 3 #define ST_LEN 2 +#define TC_LEN 2 #define HELP \ "HELP:\nHow to run the alpha compiler:\n./alpha [options] " \ "program\nValid " \ - "options:\n-tok output the token number, token, line number, and " \ + "options:\n-tok output the token number, token, line number, and " \ "column " \ - "number for each of the tokens to the .tok file\n-st output the " \ + "number for each of the tokens to the .tok file\n-st output the " \ "symbol " \ - "table for the program to the .st file\n-help print this message " \ + "table for the program to the .st file\n-help print this message " \ "and exit " \ - "the alpha compiler\n" + "the alpha compiler\n-debug print debugging messages in grammar rules \n" + #define SET_FLAG 1 // Used to set flags for arg types #define INVALID \ "INVALID INPUT: Include a .alpha file or use -help for more inputs \n" @@ -39,6 +41,7 @@ SymbolTable *cur; FILE *alpha_file; FILE *tok_flag = NULL; FILE *st_flag = NULL; +FILE *tc_flag = NULL; bool DEBUG = false; int no_flag = 0; int arg; @@ -77,4 +80,4 @@ char *COLOR_YELLOW = "\033[1;33m"; char *COLOR_LIGHTBLUE = "\033[1;34m"; char *COLOR_LIGHTPURPLE = "\033[1;35m"; char *COLOR_LIGHTCYAN = "\033[1;36m"; -char *COLOR_WHITE = "\033[1;37m"; \ No newline at end of file +char *COLOR_WHITE = "\033[1;37m";