--- a/progs/re2.scala Sun Oct 02 14:07:42 2016 +0100
+++ b/progs/re2.scala Sun Oct 02 15:07:21 2016 +0100
@@ -54,15 +54,20 @@
(end - start)/(i * 1.0e9)
}
-for (i <- 1 to 100) {
- println(i + ": " + "%.5f".format(time_needed(1, matches(EVIL1(i), "a" * i))))
-}
-//a bit bolder tests
-for (i <- 1 to 1001 by 50) {
+//test: (a?{n}) (a{n})
+for (i <- 1 to 1101 by 100) {
println(i + " " + "%.5f".format(time_needed(2, matches(EVIL1(i), "a" * i))))
}
+for (i <- 1 to 1101 by 100) {
+ println(i + " " + "%.5f".format(time_needed(2, matches(EVIL1(i), "a" * i))))
+}
+
+//test: (a*)* b
+for (i <- 1 to 4501 by 500) {
+ println(i + " " + "%.5f".format(time_needed(2, matches(EVIL2, "a" * i))))
+}
for (i <- 1 to 4501 by 500) {
println(i + " " + "%.5f".format(time_needed(2, matches(EVIL2, "a" * i))))