--- a/re1.scala Wed Oct 31 08:56:08 2012 +0000
+++ b/re1.scala Wed Oct 31 21:46:27 2012 +0000
@@ -1,7 +1,5 @@
-abstract class Rexp {
- def simp : Rexp = this
-}
+abstract class Rexp
case object NULL extends Rexp
case object EMPTY extends Rexp
@@ -45,7 +43,7 @@
// derivative w.r.t. a string (iterates der)
def ders (s: List[Char], r: Rexp) : Rexp = s match {
case Nil => r
- case c::s => ders(s, der(c, r).simp)
+ case c::s => ders(s, der(c, r))
}
// main matcher function
@@ -71,7 +69,7 @@
(end - start)/(i * 1.0e9)
}
-for (i <- 1 to 22) {
+for (i <- 1 to 29) {
println(i + ": " + "%.5f".format(time_needed(1, matcher(RTEST(i), "a" * i))))
}