progs/scala/re-bit.scala
changeset 359 fedc16924b76
parent 294 c1de75d20aa4
--- a/progs/scala/re-bit.scala	Wed Sep 18 16:35:57 2019 +0100
+++ b/progs/scala/re-bit.scala	Sat Oct 24 12:13:39 2020 +0100
@@ -324,6 +324,9 @@
 
 val sulzmann = ("a" | "b" | "ab").%
 
+
+println(s"Sulzmann Test: ${alexing(sulzmann, "ab" * 1)}")
+
 println(alexing(sulzmann, "a" * 10))
 println(alexing_simp(sulzmann, "a" * 10))
 
@@ -392,7 +395,7 @@
 def tests_inj(ss: Set[String])(r: Rexp) = {
   clear()
   println(s"Testing ${r}")
-  for (s <- ss.par) yield {
+  for (s <- ss) yield {
     val res1 = Try(Some(alexing(r, s))).getOrElse(None)
     val res2 = Try(Some(alexing_simp(r, s))).getOrElse(None)
     if (res1 != res2) println(s"Disagree on ${r} and ${s}")
@@ -412,7 +415,7 @@
 def tests_alexer(ss: Set[String])(r: Rexp) = {
   clear()
   println(s"Testing ${r}")
-  for (s <- ss.par) yield {
+  for (s <- ss) yield {
     val d = der('b', r)
     val ad = ader('b', internalise(r))
     val res1 = Try(Some(encode(inj(r, 'a', alexing(d, s))))).getOrElse(None)