changeset 882 | 5fcad75ade92 |
parent 879 | ad9d4a01e072 |
child 913 | eef6a56c185a |
--- a/progs/matcher/re1.sc Sun Oct 02 08:42:01 2022 +0100 +++ b/progs/matcher/re1.sc Sun Oct 09 13:39:34 2022 +0100 @@ -19,9 +19,9 @@ case class SEQ(r1: Rexp, r2: Rexp) extends Rexp // sequence case class STAR(r: Rexp) extends Rexp // star - // nullable function: tests whether a regular // expression can recognise the empty string + def nullable(r: Rexp) : Boolean = r match { case ZERO => false case ONE => true