some changes

master
serr 2025-04-01 17:06:31 +03:00
parent 30c0a403e3
commit bd1cc1e786
2 changed files with 6 additions and 6 deletions

View File

@ -1,13 +1,15 @@
%{
#include "c_analyzer.tab.h"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int line_number = 1;
void yyerror(const char *s) {
fprintf(stderr, "\033[91mError at line %i: %s near '%s'\033[0m\n", line_number, s, yytext);
fprintf(stderr,
"\033[91mError at line %i: %s near '%s'\033[0m\n",
line_number,
s,
yytext);
exit(1);
}

View File

@ -1,7 +1,5 @@
%{
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
extern char *yytext;