diff -r 65d1ea0e989f -r 24531cfaa36a progs/re1.scala --- 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)))) }