changeset 453 | 36e5752fa191 |
parent 441 | 028816884f70 |
child 454 | edb4ad356c56 |
--- a/progs/re2.scala Mon Oct 17 13:18:34 2016 +0100 +++ b/progs/re2.scala Tue Oct 18 10:43:26 2016 +0100 @@ -29,7 +29,7 @@ else SEQ(der(c, r1), r2) case STAR(r1) => SEQ(der(c, r1), STAR(r1)) case NTIMES(r1, i) => - if (i == 0) ZERO else SEQ(der(c, r1), NTIMES(r1, i - 1)) + if (i == 0) ZERO else der(c, SEQ(r1, NTIMES(r1, i - 1))) } def ders (s: List[Char], r: Rexp) : Rexp = s match {