progs/cw1.scala
changeset 550 71fc4a7a7039
parent 547 81eb43c41416
child 586 451a95e1bc25
--- a/progs/cw1.scala	Sat May 05 10:31:00 2018 +0100
+++ b/progs/cw1.scala	Fri Jun 01 15:28:37 2018 +0100
@@ -232,17 +232,19 @@
 TEST("/f&", COMMENT3)
 TEST("/f& ", COMMENT3)
 
-
-
 //test: ("a" | "aa") ~ ("a" | "aa")*
-for (i <- 1 to 100 by 1) {
-  println(i + " " + "%.5f".format(time_needed(2, matcher(EVIL3, "a" * i))) + " size: " + size(ders(("a" * i).toList, EVIL3)))
-}
-
 val auxEVIL3 = ALT(CHAR('a'), SEQ(CHAR('a'), CHAR('a')))
 val EVIL3 = SEQ(auxEVIL3, STAR(auxEVIL3))
 val EVIL3p = FROMNTIMES(auxEVIL3, 1)
 
+
+for (i <- 1 to 100 by 1) {
+  println(i + " " + "%.5f".format(time_needed(2, matcher(EVIL3, "a" * i))) + " size: " + 
+	  size(ders(("a" * i).toList, EVIL3)))
+}
+
+
+
 val t1 = EVIL3
 val t2 = simp(der('a', t1))
 val t3 = simp(der('a', t2))