speed it up, test greediness

This commit is contained in:
Kyryl Melekhin
2022-04-23 17:03:30 +00:00
parent e26cb69a45
commit 688a62c826
2 changed files with 68 additions and 32 deletions

39
test.sh
View File

@@ -172,6 +172,19 @@ aaaaa(aa)aa(aa(a)a)?aa
([0-9])+.(.*)
(([0-9])+)(.)(.*)
(abc|sjd|qwq(hs|qw|oo)|(ty|xx|pp)we)
(a?)?
(a?)?
(a?)??
(a?)(a?)(a?a?)aaa(a?)|(b?)
(a?)(a?)(a?a?)aaa(a?)|(b?)
(a*)??
(a*)|(b*)|(c*)
(a?|a?)|(a*)?
(a?|a?)a|(a*)?
(a?|a?)d|(a*)?
((a*b*c*)|(a*c*b*))+?
((a*b*c*)|(a*c*b*))*?
((a*b*c*)|(a*c*b*))+
"
input="\
abcdef
@@ -345,6 +358,19 @@ h:98: :3234utt;strokeliin:miter;stroke-mirlimit:10;stroke-dasharray:none;strok
650-253-000123434-45551221
650-253-000123434-455512213224hsaqer
ppwe
m
a
aa
aa
aaaaaaaaaaaaaa
a
bbbbbbbbb
aaa
aaa
aaa
bbb
bbb
bbb
"
expect="\
(0,3)
@@ -518,6 +544,19 @@ expect="\
(0,26)(2,3)(4,26)
(0,36)(0,3)(2,3)(3,4)(4,36)
(0,4)(0,4)(?,?)(0,2)
(0,0)(0,0)
(0,1)(0,1)
(0,0)(?,?)
(0,0)(?,?)(?,?)(?,?)(?,?)(0,0)
(0,8)(0,1)(1,2)(2,4)(7,8)(?,?)
(0,0)(?,?)
(0,0)(0,0)(?,?)(?,?)
(0,1)(0,1)(?,?)
(0,2)(0,1)(?,?)
(0,3)(?,?)(0,3)
(0,3)(0,3)(0,3)(?,?)
(0,0)(?,?)(?,?)(?,?)
(0,3)(0,3)(0,3)(?,?)
(0,0)
"