added case for missing input of file to main.c
This commit is contained in:
parent
e90cd80fbe
commit
1cfe9485e9
|
@ -38,8 +38,16 @@ int main(void) {
|
|||
|
||||
FILE* input = fopen("program.gem", "r");
|
||||
|
||||
if (input == NULL)
|
||||
{
|
||||
printf("Error opening file!\n");
|
||||
return 1; // Error when opening file
|
||||
}
|
||||
|
||||
yyin = input;
|
||||
|
||||
fclose(input);
|
||||
|
||||
yyparse();
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue