added -debug option to -help output
This commit is contained in:
13
src/runner.h
13
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";
|
||||
char *COLOR_WHITE = "\033[1;37m";
|
||||
|
Reference in New Issue
Block a user