updated get entry function to get string pointers instead of creating different strings. Also created a define function for top level scopes. Create Entry does not work for top level

This commit is contained in:
Partho Bhattacharya
2025-03-10 11:56:26 -04:00
parent abd24760e0
commit 2f04671123
4 changed files with 50 additions and 4 deletions

View File

@ -75,7 +75,7 @@ fprintf(tok_flag, "%d %d %3d \"%s\"\n", line_number, column_number,tok, yytext);
}
int run(FILE *alpha) {
int token;
cur = CreateScope(NULL, 1, 1);
top = cur = CreateScope(NULL, 1, 1);
// If file is not found
if (alpha == NULL) {