--- a/progs/matcher/re3.sc Mon Sep 30 10:47:49 2024 +0100
+++ b/progs/matcher/re3.sc Fri Oct 11 19:13:00 2024 +0100
@@ -184,8 +184,19 @@
}
}
+@main
+def test5() = {
+ println("Test (abcdef){n}")
+ val re = SEQ(CHAR('a'), SEQ(CHAR('b'), SEQ(CHAR('c'), SEQ(CHAR('d'), SEQ(CHAR('e'), CHAR('f'))))))
+
+ for (i <- 0 to 40000 by 5000) {
+ println(f"$i: ${time_needed(1, matcher(NTIMES(re, i), "abcdef" * i))}%.5f")
+ }
+}
+
+
@arg(doc = "Tests that show not all is hunky-dory, but a solution leads too far afield.")
@main
-def fail() = { test3(); test4() }
+def fail() = { test3(); test4(); test5() }