From 14d6f1b64d55c77192a1693620d2ec728e031efa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thibaut=20VARE=CC=80NE?= Date: 2021年8月26日 12:16:09 +0200 Subject: [PATCH] don't report errors in lexers by default The parser will take care of that anyway. This reduces chatter during initial sync. Errors will still be reported in debug mode. --- ticv01.l | 2 +- ticv02.l | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ticv01.l b/ticv01.l index 12dc4b3..45b9eda 100644 --- a/ticv01.l +++ b/ticv01.l @@ -139,7 +139,7 @@ AUTRE { crc_calc(); ticv01yylval.label = "AUTRE"; return ET_AUTRE; } {DATAC}+ { crc_calc(); ticv01yylval.text = strdup(yytext); return TOK_DATA; } -<*>. { pr_err("spurious character 0x%02hhx\n", *yytext); return *yytext; } +<*>. { if (yy_flex_debug) pr_err("spurious character 0x%02hhx\n", *yytext); return *yytext; } <> { yyterminate(); } %% diff --git a/ticv02.l b/ticv02.l index a81f6ca..3396a88 100644 --- a/ticv02.l +++ b/ticv02.l @@ -157,7 +157,7 @@ PPOINTE { crc_calc(); ticv02yylval.label = "PPOINTE"; return ET_PPOINTE; } {HORODATE} { crc_calc(); ticv02yylval.text = strdup(yytext); return TOK_HDATE; } {DATAC}+ { crc_calc(); ticv02yylval.text = strdup(yytext); return TOK_DATA; } -<*>. { pr_err("spurious character 0x%02hhx\n", *yytext); return *yytext; } +<*>. { if (yy_flex_debug) pr_err("spurious character 0x%02hhx\n", *yytext); return *yytext; } <> { yyterminate(); } %% -- 2.39.5

AltStyle によって変換されたページ (->オリジナル) /