From 4de036c93497af88641eda7bf82a8f4dbdb63c02 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 5 Sep 2024 23:16:30 +0200 Subject: Don’t use yylineno MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lexer.l | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lexer.l b/src/lexer.l index 3b4a2e2..08c8da2 100644 --- a/src/lexer.l +++ b/src/lexer.l @@ -29,7 +29,6 @@ extern bool interactive; extern const char *current_file; %} -%option yylineno %option nodefault %option noinput nounput noyywrap @@ -70,8 +69,8 @@ ws [ \t] error so that lexing/parsing doesn’t continue right after the offending token but instead on the next line typed by the user. */ . { - user_error("%s:%d: Unrecognized character ‘%c’", - current_file, yylineno, *yytext); + user_error("%s:%d:%d: Unrecognized character ‘%c’", + current_file, yylloc.first_line, yylloc.first_column, *yytext); BEGIN(error); return YYerror; } -- cgit v1.2.3