From 0d8eaf423baa533f59504e425532f47c3cb90577 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Sun, 22 Sep 2024 07:42:24 -0300 Subject: [PATCH] Fix issue when file name prefix is numeric , fixes #240 and #271 --- lualib/nelua/utils/pegger.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lualib/nelua/utils/pegger.lua b/lualib/nelua/utils/pegger.lua index 918f92c6..fb02e373 100644 --- a/lualib/nelua/utils/pegger.lua +++ b/lualib/nelua/utils/pegger.lua @@ -128,9 +128,10 @@ function pegger.split_execargs(s) end local filename_to_unitname_patt = re.compile[[ - p <- {~ filebeg? c* ~} + p <- {~ filebeg? numprefix? c* ~} c <- extend -> '' / [_%w] / (%s+ / [_/\.-]) -> '_' / . -> 'X' filebeg <- [./\]+ -> '' + numprefix <- '' -> 'n' [0-9]+ extend <- '.' [_%w]+ !. ]]