--- a/progs/scala/re.scala Mon Jan 19 09:55:58 2015 +0000
+++ b/progs/scala/re.scala Wed Jan 21 12:32:17 2015 +0000
@@ -261,10 +261,17 @@
result
}
-val r = ("a" | "ab") ~ ("bcd" | "c")
-println(lexing(r, "abcd"))
-println(values(r).mkString("\n"))
-println(values(r).map(flatten).mkString("\n"))
+val r1 = ("a" | "ab") ~ ("bcd" | "c")
+println(lexing(r1, "abcd"))
+println(values(r1).mkString("\n"))
+println(values(r1).map(flatten).mkString("\n"))
+
+val r2 = ("" | "a") ~ ("ab" | "b")
+println(lexing(r2, "ab"))
+println(values(r2).mkString("\n"))
+println(values(r2).toList.map(flatten).mkString("\n"))
+
+
// Two Simple Tests
//===================