progs/re3.scala
changeset 261 24531cfaa36a
parent 258 1e4da6d2490c
child 341 ac1187b2e5c9
--- a/progs/re3.scala	Sat Sep 27 00:37:02 2014 +0100
+++ b/progs/re3.scala	Sun Sep 28 18:07:58 2014 +0100
@@ -60,7 +60,7 @@
   case c::s => ders(s, simp(der(c, r)))
 }
 
-def matcher(r: Rexp, s: String) : Boolean = nullable(ders(s.toList, r))
+def matches(r: Rexp, s: String) : Boolean = nullable(ders(s.toList, r))
 
 
 //one or zero
@@ -77,7 +77,7 @@
 
 
 for (i <- 1 to 12001 by 500) {
-  println(i + " " + "%.5f".format(time_needed(1, matcher(EVIL(i), "a" * i))))
+  println(i + " " + "%.5f".format(time_needed(1, matches(EVIL(i), "a" * i))))
 }