From 88356645b4a8f63f32e5bc42040bba74f2c76cb5 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Mon, 6 Dec 2021 17:01:22 +0100 Subject: [PATCH] * spot/parsetl/scantl.ll: Avoid strtoul for short delays. --- spot/parsetl/scantl.ll | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/spot/parsetl/scantl.ll b/spot/parsetl/scantl.ll index ff15685f8..fbb7444a7 100644 --- a/spot/parsetl/scantl.ll +++ b/spot/parsetl/scantl.ll @@ -222,8 +222,13 @@ eol2 (\n\r)+|(\r\n)+ "first_match" BEGIN(0); return token::OP_FIRST_MATCH; /* SVA operators */ -"##"[0-9]{1,2} { - yylval->num = strtoul(yytext + 2, 0, 10); +"##"[0-9] { + yylval->num = yytext[2] - '0'; + return token::OP_DELAY_N; + } +"##"[0-9][0-9] { + yylval->num = + yytext[2] * 10 + yytext[3] - '0' * 11; return token::OP_DELAY_N; } "##"[0-9]{3,} {