changeset 467 | b5ec11e89768 |
parent 458 | 896a5f91838d |
child 477 | b78664a24f5d |
--- a/progs/re3.scala Mon Oct 24 14:46:47 2016 +0100 +++ b/progs/re3.scala Sat Oct 29 21:45:44 2016 +0100 @@ -8,6 +8,7 @@ case class STAR(r: Rexp) extends Rexp case class NTIMES(r: Rexp, n: Int) extends Rexp + // nullable function: tests whether the regular // expression can recognise the empty string def nullable (r: Rexp) : Boolean = r match { @@ -47,7 +48,6 @@ case (r1s, ONE) => r1s case (r1s, r2s) => SEQ(r1s, r2s) } - case NTIMES(r1, n) => NTIMES(simp(r1), n) case r => r }