comments added

master
serr 2025-04-01 20:14:42 +03:00
parent ca95ce2a3f
commit 2841810eba
1 changed files with 2 additions and 2 deletions

View File

@ -38,13 +38,13 @@ void yyerror(const char *s) {
"//" { "//" {
int c; int c;
while ((c = input()) != '\n' && c != 0); // Используем input() вместо yyinput() while ((c = input()) != '\n' && c != 0);
if (c == '\n') line_number++; if (c == '\n') line_number++;
} }
"/*" { "/*" {
int c, prev = 0; int c, prev = 0;
while ((c = input()) != 0) { // Используем input() вместо yyinput() while ((c = input()) != 0) {
if (c == '\n') line_number++; if (c == '\n') line_number++;
if (prev == '*' && c == '/') break; if (prev == '*' && c == '/') break;
prev = c; prev = c;