diff -r 284ac979f289 -r dca072e2bb7d progs/matcher/re1.sc --- a/progs/matcher/re1.sc Fri Feb 26 08:47:18 2021 +0000 +++ b/progs/matcher/re1.sc Thu May 13 13:10:38 2021 +0100 @@ -30,7 +30,7 @@ } // the derivative of a regular expression w.r.t. a character -def der (c: Char, r: Rexp) : Rexp = r match { +def der(c: Char, r: Rexp) : Rexp = r match { case ZERO => ZERO case ONE => ZERO case CHAR(d) => if (c == d) ONE else ZERO @@ -42,7 +42,7 @@ } // the derivative w.r.t. a string (iterates der) -def ders (s: List[Char], r: Rexp) : Rexp = s match { +def ders(s: List[Char], r: Rexp) : Rexp = s match { case Nil => r case c::s => ders(s, der(c, r)) } @@ -173,4 +173,4 @@ @doc("All tests.") @main -def all() = { test1(); test2() ; test3() } \ No newline at end of file +def all() = { test1(); test2() ; test3() }