progs/nfa.scala
changeset 145 920f675b4ed1
parent 144 0cb61bed557d
child 482 0f6e3c5a1751
--- a/progs/nfa.scala	Tue Oct 15 22:14:04 2013 +0100
+++ b/progs/nfa.scala	Wed Oct 16 02:07:02 2013 +0100
@@ -212,7 +212,7 @@
 def EVIL(n: Int) = SEQ(NTIMES(OPT("a"), n), NTIMES("a", n))
 
 // test harness for the matcher
-for (i <- 1 to 100) {
+for (i <- 0 to 100 by 5) {
   println(i + ": " + "%.5f".format(time_needed(1, matcher(EVIL(i), "a" * i))))
 }
 
@@ -233,7 +233,7 @@
 def matcher2(r: Rexp, s: String) : Boolean = accepts2(thompson(r), s)
 
 // test harness for the backtracking matcher
-for (i <- 1 to 21) {
+for (i <- 0 to 20 by 1) {
   println(i + ": " + "%.5f".format(time_needed(1, matcher2(EVIL(i), "a" * i))))
 }