progs/app03.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Fri, 02 Jun 2023 15:58:57 +0100
changeset 910 b655ce68983f
parent 400 e4afe3f46c29
permissions -rw-r--r--
added break

abstract class Rexp
case object ZERO extends Rexp
case object ONE extends Rexp
case class CHAR(c: Char) extends Rexp
case class ALT(r1: Rexp, r2: Rexp) extends Rexp 
case class SEQ(r1: Rexp, r2: Rexp) extends Rexp 
case class STAR(r: Rexp) extends Rexp 
case class REC(x: String, r: Rexp) extends Rexp