progs/re1.scala
changeset 434 8664ff87cd77
parent 433 c08290ee4f1f
child 440 e14cd32ad497
--- a/progs/re1.scala	Sun Oct 02 14:07:42 2016 +0100
+++ b/progs/re1.scala	Sun Oct 02 15:07:21 2016 +0100
@@ -68,15 +68,20 @@
   (end - start)/(i * 1.0e9)
 }
 
+//test: (a?{n}) (a{n})
 for (i <- 1 to 20) {
   println(i + ": " + "%.5f".format(time_needed(2, matches(EVIL1(i), "a" * i))))
 }
 
-
 for (i <- 1 to 20) {
   println(i + ": " + "%.5f".format(time_needed(2, matches(EVIL1(i), "a" * i))))
 }
 
+//test: (a*)* b
+for (i <- 1 to 6502 by 500) {
+  println(i + " " + "%.5f".format(time_needed(2, matches(EVIL2, "a" * i))))
+}
+
 for (i <- 1 to 6502 by 500) {
   println(i + " " + "%.5f".format(time_needed(2, matches(EVIL2, "a" * i))))
 }