progs/re1.scala
changeset 261 24531cfaa36a
parent 258 1e4da6d2490c
child 343 539b2e88f5b9
--- a/progs/re1.scala	Sat Sep 27 00:37:02 2014 +0100
+++ b/progs/re1.scala	Sun Sep 28 18:07:58 2014 +0100
@@ -36,7 +36,7 @@
 }
 
 // main matcher function
-def matcher(r: Rexp, s: String) : Boolean = nullable(ders(s.toList, r))
+def matches(r: Rexp, s: String) : Boolean = nullable(ders(s.toList, r))
 
 //example from the homework
 //val r = STAR(ALT(SEQ(CHAR('a'), CHAR('b')), CHAR('b')))
@@ -66,5 +66,5 @@
 }
 
 for (i <- 1 to 29) {
-  println(i + ": " + "%.5f".format(time_needed(1, matcher(EVIL(i), "a" * i))))
+  println(i + ": " + "%.5f".format(time_needed(1, matches(EVIL(i), "a" * i))))
 }