progs/app03.scala
changeset 288 39aeca14af8c
child 400 e4afe3f46c29
equal deleted inserted replaced
287:2c50b8b5886c 288:39aeca14af8c
       
     1 abstract class Rexp
       
     2 case object NULL extends Rexp
       
     3 case object EMPTY extends Rexp
       
     4 case class CHAR(c: Char) extends Rexp
       
     5 case class ALT(r1: Rexp, r2: Rexp) extends Rexp 
       
     6 case class SEQ(r1: Rexp, r2: Rexp) extends Rexp 
       
     7 case class STAR(r: Rexp) extends Rexp 
       
     8 case class REC(x: String, r: Rexp) extends Rexp