From f32e9c44789efadc3e38d60c9a3dccb55610caca Mon Sep 17 00:00:00 2001 From: Kyryl Melekhin Date: Thu, 30 Sep 2021 09:21:49 +0000 Subject: [PATCH] fix repetition with ANY --- pike.c | 1 + test.sh | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/pike.c b/pike.c index f4aee1f..669a14d 100644 --- a/pike.c +++ b/pike.c @@ -308,6 +308,7 @@ static int _compilecode(const char **re_loc, rcode *prog, int sizecode) case RSPLIT: case SAVE: case CHAR: + case ANY: i++; icnt++; } diff --git a/test.sh b/test.sh index 811824f..aa6c54d 100755 --- a/test.sh +++ b/test.sh @@ -121,6 +121,8 @@ aaaaa(aa)aa(aa(a)a)?aa ^\\\\.+(((/)\\\\.\\\\.+)+)? ^(http|https|ftp):[/]{2}([a-zA-Z0-9\\\\\\\\.]+\\\\.[a-zA-Z]{2,4})(:[0-9]+)?/?([a-zA-Z0-9\\\\\\\\._?,'/+&%$#=~]*) (\\\\$\\\\([a-zA-Z0-9_]+\\\\))|(([A-Za-z_%.]+):) +.{5} +.{10,15} " input="\ abcdef @@ -243,6 +245,8 @@ aaaaaaaaaaaaaaaaaaaaaaaaa ../../.. https://kyryl.tk/404 OBJ = \$(SRC:.c=.o) +рврыр +рврырdhsjhh " expect="\ (0,3) @@ -365,6 +369,8 @@ expect="\ (0,8)(2,8)(5,8)(5,6) (0,20)(0,5)(8,16)(?,?)(17,20) (8,12)(?,?)(8,12)(8,11) +(0,10) +(0,16) (0,0) "