added code to print out positions of incorrect tokens

This commit is contained in:
Partho Bhattacharya
2025-02-21 15:25:21 -05:00
parent 0a806fd5ba
commit eb3452fec9
2 changed files with 6 additions and 1 deletions

View File

@ -79,6 +79,9 @@ int run(FILE *alpha) {
}
continue;
}
if(token == 1999){
printf("On line number %d and column number %d we have an invalid character:%s\n",line_number,column_number,yytext);
}
column_number += yyleng;
}