cw2_marking/c4.sc
changeset 1039 86d59b074abe
parent 977 7a02c5b9e0df
--- a/cw2_marking/c4.sc	Fri Sep 18 10:57:24 2026 +0100
+++ b/cw2_marking/c4.sc	Fri Sep 18 10:58:01 2026 +0100
@@ -14,6 +14,7 @@
 // some students eliminated "..." therefore a specific comparison function
 def lsteq(xs: List[Token], ys: List[Token]): Boolean = (xs, ys) match {
   case (Nil, Nil) => true
+  //case (T_STRING("\n")::xs, T_STRING("""\n""")::ys) => lsteq(xs, ys)
   case (T_STRING(s1)::xs, T_STRING(s2)::ys) => 
     (s1 == s2 || s2.drop(1).dropRight(1) == s1) && lsteq(xs, ys)
   case (x::xs, y::ys) => x == y && lsteq(xs, ys)
@@ -117,7 +118,7 @@
 Try(test_string(str)) match {
   case Success(v) if lsteq(v, tks) 
                   => println(s"   Generated the correct token sequence.")
-  case Success(v) => println(s"   Generated $v\n instead of\n $tks\n\n${listcmp(v, tks)}).") ; throw new Exception("Different")
+  case Success(v) => println(s"   Generated\n $v\n\n instead of\n $tks\n\n).") ; throw new Exception("Different")
   case Failure(e) => println(s"   Exception raised.") ; throw(e)
 }